Skip to content
Commit 8e9a6499 authored by Jonas Karlman's avatar Jonas Karlman Committed by Greg Kroah-Hartman
Browse files

drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full

[ Upstream commit bb0a05ac ]

Use of DRM_FORMAT_RGB888 and DRM_FORMAT_BGR888 on e.g. RK3288, RK3328
and RK3399 result in wrong colors being displayed.

The issue can be observed using modetest:

  modetest -s <connector_id>@<crtc_id>:1920x1080-60@RG24
  modetest -s <connector_id>@<crtc_id>:1920x1080-60@BG24

Vendor 4.4 kernel apply an inverted rb swap for these formats on VOP
full framework (IP version 3.x) compared to VOP little framework (2.x).

Fix colors by applying different rb swap for VOP full framework (3.x)
and VOP little framework (2.x) similar to vendor 4.4 kernel.

Fixes: 85a359f2

 ("drm/rockchip: Add BGR formats to VOP")
Signed-off-by: default avatarJonas Karlman <jonas@kwiboo.se>
Tested-by: default avatarDiederik de Haas <didi.debian@cknow.org>
Reviewed-by: default avatarChristopher Obbard <chris.obbard@collabora.com>
Tested-by: default avatarChristopher Obbard <chris.obbard@collabora.com>
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20231026191500.2994225-1-jonas@kwiboo.se


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 84a6e475
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment