drm/imx: ipuv3-plane: Fix overlay plane width
authorPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 8 Nov 2022 14:14:20 +0000 (15:14 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Fri, 16 Dec 2022 17:40:29 +0000 (18:40 +0100)
commit4333472f8d7befe62359fecb1083cd57a6e07bfc
tree06e8811f9c3739f594f08591f011b57d146cfd5d
parent9afdf98cfdfa2ba8ec068cf08c5fcdc1ed8daf3f
drm/imx: ipuv3-plane: Fix overlay plane width

ipu_src_rect_width() was introduced to support odd screen resolutions
such as 1366x768 by internally rounding up primary plane width to a
multiple of 8 and compensating with reduced horizontal blanking.
This also caused overlay plane width to be rounded up, which was not
intended. Fix overlay plane width by limiting the rounding up to the
primary plane.

drm_rect_width(&new_state->src) >> 16 is the same value as
drm_rect_width(dst) because there is no plane scaling support.

Fixes: 94dfec48fca7 ("drm/imx: Add 8 pixel alignment fix")
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Link: https://lore.kernel.org/r/20221108141420.176696-1-p.zabel@pengutronix.de
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20221108141420.176696-1-p.zabel@pengutronix.de
drivers/gpu/drm/imx/ipuv3-plane.c