drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 155 ++++++++++++++++++++++++--- drivers/gpu/drm/rockchip/rockchip_drm_vop2.h | 2 +- 2 files changed, 140 insertions(+), 17 deletions(-)
Since commit bec7cbfa7d4f ("drm/rockchip: vop2: Support setting custom
background color") the VOP2 display controller allows configuring the
background color of each video output port.
However, this is currently limited to RGB formats. When operating in
YUV overlay mode, the color must be programmed using YUV format.
Add the necessary RGB-to-YCbCr conversion logic, covering all color
spaces supported by the display controller: BT601L, BT601F, BT709L and
BT2020L.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
Changes in v2:
- Used vop2_convert_csc_mode() helper to address an issue reported by
vcstate->color_space holds a V4L2 colorspace enum
- Rebased onto latest drm-misc-next
- Link to v1: https://patch.msgid.link/20260524-vop2-bg-yuv-v1-0-dcb6a52923f5@collabora.com
To: Sandy Huang <hjc@rock-chips.com>
To: Heiko Stübner <heiko@sntech.de>
To: Andy Yan <andy.yan@rock-chips.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Maxime Ripard <mripard@kernel.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
To: David Airlie <airlied@gmail.com>
To: Simona Vetter <simona@ffwll.ch>
Cc: kernel@collabora.com
Cc: dri-devel@lists.freedesktop.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Sashiko: vop2_rgb16_to_yuv16() expects an enum vop_csc_format, but
---
Cristian Ciocaltea (2):
drm/rockchip: vop2: Rename CSC_BT2020 to CSC_BT2020L
drm/rockchip: vop2: Add YUV support to background color
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 155 ++++++++++++++++++++++++---
drivers/gpu/drm/rockchip/rockchip_drm_vop2.h | 2 +-
2 files changed, 140 insertions(+), 17 deletions(-)
---
base-commit: e84b07e0a30b371117f9a1120a4645c213f39cd9
change-id: 20260524-vop2-bg-yuv-1b0e6a09c579
On Mon, 01 Jun 2026 21:00:02 +0300, Cristian Ciocaltea wrote:
> Since commit bec7cbfa7d4f ("drm/rockchip: vop2: Support setting custom
> background color") the VOP2 display controller allows configuring the
> background color of each video output port.
>
> However, this is currently limited to RGB formats. When operating in
> YUV overlay mode, the color must be programmed using YUV format.
>
> [...]
Applied, thanks!
[1/2] drm/rockchip: vop2: Rename CSC_BT2020 to CSC_BT2020L
commit: 09dfa47fc557f945871dcf279c8e687e55d3550d
[2/2] drm/rockchip: vop2: Add YUV support to background color
commit: 28e670a0885cf2501fd51189ce7b6f5b7cacebf9
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
Something got messed by while preparing the cover letter.
Fixed manually..
On 6/1/26 9:00 PM, Cristian Ciocaltea wrote:
> Since commit bec7cbfa7d4f ("drm/rockchip: vop2: Support setting custom
> background color") the VOP2 display controller allows configuring the
> background color of each video output port.
>
> However, this is currently limited to RGB formats. When operating in
> YUV overlay mode, the color must be programmed using YUV format.
>
> Add the necessary RGB-to-YCbCr conversion logic, covering all color
> spaces supported by the display controller: BT601L, BT601F, BT709L and
> BT2020L.
>
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
> ---
> Changes in v2:
> - Used vop2_convert_csc_mode() helper to address an issue reported by
> Sashiko: vop2_rgb16_to_yuv16() expects an enum vop_csc_format, but
> vcstate->color_space holds a V4L2 colorspace enum
> - Rebased onto latest drm-misc-next
> - Link to v1: https://patch.msgid.link/20260524-vop2-bg-yuv-v1-0-dcb6a52923f5@collabora.com
>
> ---
> Cristian Ciocaltea (2):
> drm/rockchip: vop2: Rename CSC_BT2020 to CSC_BT2020L
> drm/rockchip: vop2: Add YUV support to background color
>
> drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 155 ++++++++++++++++++++++++---
> drivers/gpu/drm/rockchip/rockchip_drm_vop2.h | 2 +-
> 2 files changed, 140 insertions(+), 17 deletions(-)
> ---
> base-commit: e84b07e0a30b371117f9a1120a4645c213f39cd9
> change-id: 20260524-vop2-bg-yuv-1b0e6a09c579
>
© 2016 - 2026 Red Hat, Inc.