Files
LibreELEC.tv/packages/linux/patches/rockchip/rockchip-0003-LOCAL-drm-rockchip-vop2-rk3588-change-Esmart-Cluster.patch
Christian Hewitt f490093c51 linux: update rockchip Linux 6.17.y patchset
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
2025-09-22 13:54:47 +00:00

174 lines
5.5 KiB
Diff

From 7208a81ed270156cca1df8ed6e7c4d5c2510d070 Mon Sep 17 00:00:00 2001
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Wed, 16 Jul 2025 05:09:07 +0000
Subject: [PATCH 003/113] LOCAL: drm/rockchip: vop2: rk3588: change
Esmart/Cluster ordering
Order Esmart planes before Cluster planes so Kodi (which currently
lacks the ability to dymanically order planes using zpos) can show
the OSD on-top of Video rather then behind.
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
---
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 136 +++++++++----------
1 file changed, 68 insertions(+), 68 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
index 45c5e3987813..42a4833a90a3 100644
--- a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
+++ b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
@@ -1119,6 +1119,74 @@ static const struct vop2_video_port_data rk3588_vop_video_ports[] = {
*/
static const struct vop2_win_data rk3588_vop_win_data[] = {
{
+ .name = "Esmart0-win0",
+ .phys_id = ROCKCHIP_VOP2_ESMART0,
+ .possible_vp_mask = BIT(0) | BIT(1) | BIT(2) | BIT(3),
+ .formats = formats_esmart,
+ .nformats = ARRAY_SIZE(formats_esmart),
+ .format_modifiers = format_modifiers,
+ .base = 0x1800,
+ .layer_sel_id = { 2, 2, 2, 2 },
+ .supported_rotations = DRM_MODE_REFLECT_Y,
+ .type = DRM_PLANE_TYPE_OVERLAY,
+ .axi_bus_id = 0,
+ .axi_yrgb_r_id = 0x0a,
+ .axi_uv_r_id = 0x0b,
+ .max_upscale_factor = 8,
+ .max_downscale_factor = 8,
+ .dly = { 23, 45, 48 },
+ }, {
+ .name = "Esmart1-win0",
+ .phys_id = ROCKCHIP_VOP2_ESMART1,
+ .possible_vp_mask = BIT(0) | BIT(1) | BIT(2) | BIT(3),
+ .formats = formats_esmart,
+ .nformats = ARRAY_SIZE(formats_esmart),
+ .format_modifiers = format_modifiers,
+ .base = 0x1a00,
+ .layer_sel_id = { 3, 3, 3, 3 },
+ .supported_rotations = DRM_MODE_REFLECT_Y,
+ .type = DRM_PLANE_TYPE_OVERLAY,
+ .axi_bus_id = 0,
+ .axi_yrgb_r_id = 0x0c,
+ .axi_uv_r_id = 0x01,
+ .max_upscale_factor = 8,
+ .max_downscale_factor = 8,
+ .dly = { 23, 45, 48 },
+ }, {
+ .name = "Esmart2-win0",
+ .phys_id = ROCKCHIP_VOP2_ESMART2,
+ .base = 0x1c00,
+ .possible_vp_mask = BIT(0) | BIT(1) | BIT(2) | BIT(3),
+ .formats = formats_esmart,
+ .nformats = ARRAY_SIZE(formats_esmart),
+ .format_modifiers = format_modifiers,
+ .layer_sel_id = { 6, 6, 6, 6 },
+ .supported_rotations = DRM_MODE_REFLECT_Y,
+ .type = DRM_PLANE_TYPE_OVERLAY,
+ .axi_bus_id = 1,
+ .axi_yrgb_r_id = 0x0a,
+ .axi_uv_r_id = 0x0b,
+ .max_upscale_factor = 8,
+ .max_downscale_factor = 8,
+ .dly = { 23, 45, 48 },
+ }, {
+ .name = "Esmart3-win0",
+ .phys_id = ROCKCHIP_VOP2_ESMART3,
+ .possible_vp_mask = BIT(0) | BIT(1) | BIT(2) | BIT(3),
+ .formats = formats_esmart,
+ .nformats = ARRAY_SIZE(formats_esmart),
+ .format_modifiers = format_modifiers,
+ .base = 0x1e00,
+ .layer_sel_id = { 7, 7, 7, 7 },
+ .supported_rotations = DRM_MODE_REFLECT_Y,
+ .type = DRM_PLANE_TYPE_OVERLAY,
+ .axi_bus_id = 1,
+ .axi_yrgb_r_id = 0x0c,
+ .axi_uv_r_id = 0x0d,
+ .max_upscale_factor = 8,
+ .max_downscale_factor = 8,
+ .dly = { 23, 45, 48 },
+ }, {
.name = "Cluster0-win0",
.phys_id = ROCKCHIP_VOP2_CLUSTER0,
.base = 0x1000,
@@ -1194,74 +1262,6 @@ static const struct vop2_win_data rk3588_vop_win_data[] = {
.max_downscale_factor = 4,
.dly = { 4, 26, 29 },
.feature = WIN_FEATURE_AFBDC | WIN_FEATURE_CLUSTER,
- }, {
- .name = "Esmart0-win0",
- .phys_id = ROCKCHIP_VOP2_ESMART0,
- .possible_vp_mask = BIT(0) | BIT(1) | BIT(2) | BIT(3),
- .formats = formats_esmart,
- .nformats = ARRAY_SIZE(formats_esmart),
- .format_modifiers = format_modifiers,
- .base = 0x1800,
- .layer_sel_id = { 2, 2, 2, 2 },
- .supported_rotations = DRM_MODE_REFLECT_Y,
- .type = DRM_PLANE_TYPE_OVERLAY,
- .axi_bus_id = 0,
- .axi_yrgb_r_id = 0x0a,
- .axi_uv_r_id = 0x0b,
- .max_upscale_factor = 8,
- .max_downscale_factor = 8,
- .dly = { 23, 45, 48 },
- }, {
- .name = "Esmart1-win0",
- .phys_id = ROCKCHIP_VOP2_ESMART1,
- .possible_vp_mask = BIT(0) | BIT(1) | BIT(2) | BIT(3),
- .formats = formats_esmart,
- .nformats = ARRAY_SIZE(formats_esmart),
- .format_modifiers = format_modifiers,
- .base = 0x1a00,
- .layer_sel_id = { 3, 3, 3, 3 },
- .supported_rotations = DRM_MODE_REFLECT_Y,
- .type = DRM_PLANE_TYPE_OVERLAY,
- .axi_bus_id = 0,
- .axi_yrgb_r_id = 0x0c,
- .axi_uv_r_id = 0x01,
- .max_upscale_factor = 8,
- .max_downscale_factor = 8,
- .dly = { 23, 45, 48 },
- }, {
- .name = "Esmart2-win0",
- .phys_id = ROCKCHIP_VOP2_ESMART2,
- .base = 0x1c00,
- .possible_vp_mask = BIT(0) | BIT(1) | BIT(2) | BIT(3),
- .formats = formats_esmart,
- .nformats = ARRAY_SIZE(formats_esmart),
- .format_modifiers = format_modifiers,
- .layer_sel_id = { 6, 6, 6, 6 },
- .supported_rotations = DRM_MODE_REFLECT_Y,
- .type = DRM_PLANE_TYPE_OVERLAY,
- .axi_bus_id = 1,
- .axi_yrgb_r_id = 0x0a,
- .axi_uv_r_id = 0x0b,
- .max_upscale_factor = 8,
- .max_downscale_factor = 8,
- .dly = { 23, 45, 48 },
- }, {
- .name = "Esmart3-win0",
- .phys_id = ROCKCHIP_VOP2_ESMART3,
- .possible_vp_mask = BIT(0) | BIT(1) | BIT(2) | BIT(3),
- .formats = formats_esmart,
- .nformats = ARRAY_SIZE(formats_esmart),
- .format_modifiers = format_modifiers,
- .base = 0x1e00,
- .layer_sel_id = { 7, 7, 7, 7 },
- .supported_rotations = DRM_MODE_REFLECT_Y,
- .type = DRM_PLANE_TYPE_OVERLAY,
- .axi_bus_id = 1,
- .axi_yrgb_r_id = 0x0c,
- .axi_uv_r_id = 0x0d,
- .max_upscale_factor = 8,
- .max_downscale_factor = 8,
- .dly = { 23, 45, 48 },
},
};
--
2.34.1