Skip to content

Commit daaadbc

Browse files
authored
Merge branch 'raspberrypi:rpi-6.18.y' into rpi-6.18.y-drm
2 parents 3f2003c + 01f7332 commit daaadbc

4 files changed

Lines changed: 26 additions & 6 deletions

File tree

.github/workflows/kernel-build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,36 +24,43 @@ jobs:
2424
arch: arm
2525
defconfig: bcm2835_defconfig
2626
kernel: kernel
27+
retention: 5
2728

2829
- name: arm64
2930
arch: arm64
3031
defconfig: defconfig
3132
kernel: kernel8
33+
retention: 5
3234

3335
- name: bcmrpi
3436
arch: arm
3537
defconfig: bcmrpi_defconfig
3638
kernel: kernel
39+
retention: 90
3740

3841
- name: bcm2709
3942
arch: arm
4043
defconfig: bcm2709_defconfig
4144
kernel: kernel7
45+
retention: 90
4246

4347
- name: bcm2711
4448
arch: arm64
4549
defconfig: bcm2711_defconfig
4650
kernel: kernel8
51+
retention: 90
4752

4853
- name: bcm2711_rt
4954
arch: arm64
5055
defconfig: bcm2711_rt_defconfig
5156
kernel: kernel8_rt
57+
retention: 30
5258

5359
- name: bcm2712
5460
arch: arm64
5561
defconfig: bcm2712_defconfig
5662
kernel: kernel_2712
63+
retention: 90
5764

5865
steps:
5966
- name: Install armhf crossbuild toolchain
@@ -100,4 +107,4 @@ jobs:
100107
with:
101108
name: ${{matrix.name}}_build
102109
path: ${{matrix.name}}_build.tar
103-
retention-days: 90
110+
retention-days: ${{matrix.retention}}

drivers/clk/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ config COMMON_CLK_RK808
9090
config COMMON_CLK_RP1
9191
tristate "Raspberry Pi RP1-based clock support"
9292
depends on MISC_RP1 || MFD_RP1 || COMPILE_TEST
93+
select REGMAP_MMIO
9394
default MISC_RP1
9495
help
9596
Enable common clock framework support for Raspberry Pi RP1.

drivers/media/platform/raspberrypi/hevc_dec/hevc_d_h265.c

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,6 +1578,8 @@ static int hevc_d_h265_setup(struct hevc_d_ctx *ctx, struct hevc_d_run *run)
15781578
bool slice_temporal_mvp;
15791579
unsigned int ctb_size_y;
15801580
bool sps_changed = false;
1581+
/* Old (downstream only) bit size meanings */
1582+
bool old_bits = false;
15811583

15821584
de = dec_env_new(ctx);
15831585
if (!de) {
@@ -1646,6 +1648,7 @@ static int hevc_d_h265_setup(struct hevc_d_ctx *ctx, struct hevc_d_run *run)
16461648
de->chroma_stride = de->luma_stride;
16471649
de->frame_chroma_addr = de->frame_luma_addr +
16481650
(ctx->dst_fmt.height * 128);
1651+
old_bits = true;
16491652
break;
16501653
}
16511654

@@ -1776,15 +1779,24 @@ static int hevc_d_h265_setup(struct hevc_d_ctx *ctx, struct hevc_d_run *run)
17761779
for (i = 0; i != run->h265.slice_ents; ++i) {
17771780
const struct v4l2_ctrl_hevc_slice_params *const sh = sh0 + i;
17781781
const bool last_slice = i + 1 == run->h265.slice_ents;
1779-
const u32 byte_size = DIV_ROUND_UP(sh->bit_size, 8);
1782+
unsigned int bit_size = old_bits ? sh->bit_size - 8 * sh->data_byte_offset :
1783+
sh->bit_size;
1784+
const u32 byte_size = DIV_ROUND_UP(bit_size, 8);
17801785
unsigned int j;
17811786

17821787
s->sh = sh;
17831788

1789+
if (old_bits && sh->bit_size <= 8 * sh->data_byte_offset) {
1790+
v4l2_warn(&dev->v4l2_dev,
1791+
"data_byte_offset %d * 8 >= bits %d\n",
1792+
sh->data_byte_offset, sh->bit_size);
1793+
goto fail;
1794+
}
1795+
17841796
if (sh->data_byte_offset + byte_size > run->src->planes[0].bytesused) {
17851797
v4l2_warn(&dev->v4l2_dev,
17861798
"data_byte_offset %d + bits %d (= %d bytes) > bytesused %d\n",
1787-
sh->data_byte_offset, sh->bit_size, byte_size,
1799+
sh->data_byte_offset, bit_size, byte_size,
17881800
run->src->planes[0].bytesused);
17891801
goto fail;
17901802
}
@@ -1794,7 +1806,7 @@ static int hevc_d_h265_setup(struct hevc_d_ctx *ctx, struct hevc_d_run *run)
17941806
* actual size of the buffer (which may well be what is used to set
17951807
* bit_size if the caller isn't being very pedantic).
17961808
*/
1797-
s->data_len = min(sh->bit_size / 8 + 1,
1809+
s->data_len = min(bit_size / 8 + 1,
17981810
run->src->planes[0].bytesused - sh->data_byte_offset);
17991811

18001812
s->slice_qp = 26 + s->pps.init_qp_minus26 + sh->slice_qp_delta;

drivers/media/platform/raspberrypi/hevc_dec/hevc_d_video.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static void hevc_d_prepare_dst_format(struct v4l2_pix_format_mplane *pix_fmt)
144144
case V4L2_PIX_FMT_NV12_COL128:
145145
/* Width rounds up to columns */
146146
width = ALIGN(width, 128);
147-
height = ALIGN(height, 8);
147+
height = ALIGN(height, 16);
148148

149149
/* column height
150150
* Accept suggested shape if at least min & < 2 * min
@@ -158,7 +158,7 @@ static void hevc_d_prepare_dst_format(struct v4l2_pix_format_mplane *pix_fmt)
158158
* columns
159159
*/
160160
width = ALIGN(((width + 2) / 3), 32) * 3;
161-
height = ALIGN(height, 8);
161+
height = ALIGN(height, 16);
162162

163163
/* column height
164164
* Accept suggested shape if at least min & < 2 * min

0 commit comments

Comments
 (0)