Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] drm/rockchip: vop2: dead store to UV offset in vop2_plane_atomic_update() --
commit 6df46f75e1463ad71a6132367733e70876d282fa Author: Chaoyi Chen <[email protected]> drm/rockchip: vop2: Use drm_format_info_min_pitch() for plane offsets This commit updates vop2_plane_atomic_update() to calculate plane horizontal byte offsets using drm_format_info_min_pitch() instead of fb->format->cpp[] to support block-based 10-bit formats. > diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c > b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c > index bfb3841425687..410a8fea3ff4a 100644 > --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c > +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c > @@ -1290,7 +1290,7 @@ static void vop2_plane_atomic_update(struct drm_plane > *plane, > > afbc_en = drm_is_afbc(fb->modifier); > > - offset = (src->x1 >> 16) * fb->format->cpp[0]; > + offset = drm_format_info_min_pitch(fb->format, 0, src->x1 >> 16); > > /* > * AFBC HDR_PTR must set to the zero offset of the framebuffer. > @@ -1309,6 +1309,7 @@ static void vop2_plane_atomic_update(struct drm_plane > *plane, > int hsub = fb->format->hsub; > int vsub = fb->format->vsub; > > + offset = drm_format_info_min_pitch(fb->format, 1, src->x1 >> > 16) / hsub; > offset = (src->x1 >> 16) * fb->format->cpp[1] / hsub; [Severity: High] In vop2_plane_atomic_update() in drivers/gpu/drm/rockchip/rockchip_drm_vop2.c, should the old fb->format->cpp[1] assignment be removed here? Leaving it in place immediately overwrites the offset returned by drm_format_info_min_pitch() when fb->format->is_yuv is true, so planes with a non-zero src->x1 on block-based 10-bit formats will still compute an incorrect uv_mst address. > offset += (src->y1 >> 16) * fb->pitches[1] / vsub; > -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
