Files
linux/drivers/gpu/drm/vc4
Boris Brezillon 326f64c25b drm/vc4: ->x_scaling[1] should never be set to VC4_SCALING_NONE
[ Upstream commit 0560054da5 ]

For the YUV conversion to work properly, ->x_scaling[1] should never
be set to VC4_SCALING_NONE, but vc4_get_scaling_mode() might return
VC4_SCALING_NONE if the horizontal scaling ratio exactly matches the
horizontal subsampling factor. Add a test to turn VC4_SCALING_NONE
into VC4_SCALING_PPF when that happens.

The old ->x_scaling[0] adjustment is dropped as I couldn't find any
mention to this constraint in the spec and it's proven to be
unnecessary (I tested various multi-planar YUV formats with scaling
disabled, and all of them worked fine without this adjustment).

Fixes: fc04023faf ("drm/vc4: Add support for YUV planes.")
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20181109102633.32603-1-boris.brezillon@bootlin.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-12 19:45:57 +01:00
..
2017-07-26 12:15:12 -07:00
2017-02-01 12:51:23 -08:00
2017-08-16 21:35:57 +02:00
2017-07-26 12:15:12 -07:00
2018-02-03 17:39:17 +01:00