linux/drivers/gpu/drm/rockchip
Jonas Karlman 76a9a10178 drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full
[ Upstream commit bb0a05acd6 ]

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: 85a359f253 ("drm/rockchip: Add BGR formats to VOP")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Tested-by: Diederik de Haas <didi.debian@cknow.org>
Reviewed-by: Christopher Obbard <chris.obbard@collabora.com>
Tested-by: Christopher Obbard <chris.obbard@collabora.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20231026191500.2994225-1-jonas@kwiboo.se
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2023-12-03 07:33:03 +01:00
..
analogix_dp-rockchip.c drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
cdn-dp-core.c drm/rockchip: cdn-dp: Fix some error handling paths in cdn_dp_probe() 2023-11-20 11:59:12 +01:00
cdn-dp-core.h drm/rockchip: Embed drm_encoder into rockchip_decoder 2022-05-03 11:23:47 +02:00
cdn-dp-reg.c drm/rockchip: cdn-dp: fix sign extension on an int multiply for a u64 result 2021-05-28 20:27:44 +02:00
cdn-dp-reg.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
dw-mipi-dsi-rockchip.c drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
dw_hdmi-rockchip.c drm/rockchip: Convert to platform remove callback returning void 2023-06-08 09:04:12 -07:00
inno_hdmi.c drm-misc-next for 6.6: 2023-07-27 10:49:57 +02:00
inno_hdmi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
Kconfig drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
Makefile drm/rockchip: Add VOP2 driver 2022-05-04 14:05:47 +02:00
rk3066_hdmi.c drm-misc-next for v6.6: 2023-07-17 15:37:57 +02:00
rk3066_hdmi.h drm: rockchip: introduce rk3066 hdmi 2019-03-31 14:24:30 +02:00
rockchip_drm_drv.c drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
rockchip_drm_drv.h drm/fb-helper: Remove unnecessary include statements 2022-11-05 17:12:04 +01:00
rockchip_drm_fb.c drm/rockchip: Don't set struct drm_driver.output_poll_changed 2022-11-05 17:05:53 +01:00
rockchip_drm_fb.h drm: rockchip: remove rockchip_drm_framebuffer_init() function 2022-10-29 18:31:09 +02:00
rockchip_drm_gem.c drm/rockchip: Fix type promotion bug in rockchip_gem_iommu_map() 2023-11-20 11:59:12 +01:00
rockchip_drm_gem.h dma-buf-map: Rename to iosys-map 2022-02-07 16:35:35 -08:00
rockchip_drm_vop.c drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full 2023-12-03 07:33:03 +01:00
rockchip_drm_vop.h drm/rockchip: vop: limit maximum resolution to hardware capabilities 2023-03-09 01:14:24 +01:00
rockchip_drm_vop2.c drm/rockchip: vop2: Add missing call to crtc reset helper 2023-11-20 11:59:09 +01:00
rockchip_drm_vop2.h drm/rockchip: vop: limit maximum resolution to hardware capabilities 2023-03-09 01:14:24 +01:00
rockchip_lvds.c drm/rockchip: Convert to platform remove callback returning void 2023-06-08 09:04:12 -07:00
rockchip_lvds.h drm/rockchip: lvds: Add PX30 support 2020-01-06 11:56:02 +01:00
rockchip_rgb.c drm/rockchip: rgb: add video_port parameter to init function 2023-02-05 15:21:36 +01:00
rockchip_rgb.h drm/rockchip: rgb: add video_port parameter to init function 2023-02-05 15:21:36 +01:00
rockchip_vop2_reg.c drm/rockchip: Convert to platform remove callback returning void 2023-06-08 09:04:12 -07:00
rockchip_vop_reg.c drm/rockchip: Convert to platform remove callback returning void 2023-06-08 09:04:12 -07:00
rockchip_vop_reg.h drm/rockchip: define gamma registers for RK3399 2022-09-15 15:09:10 +02:00