117 lines
4.1 KiB
Diff
117 lines
4.1 KiB
Diff
From 215737e37d07ade8952048339e37aec6c6f82223 Mon Sep 17 00:00:00 2001
|
|
From: Andy Yan <andy.yan@rock-chips.com>
|
|
Date: Wed, 18 Oct 2023 17:43:39 +0800
|
|
Subject: [PATCH] drm/rockchip: vop2: rename window formats to show window type
|
|
using them
|
|
|
|
formats_win_full_10bit is for cluster window,
|
|
formats_win_full_10bit_yuyv is for rk356x esmart, rk3588 esmart window
|
|
will support more format.
|
|
formats_win_lite is for smart window.
|
|
|
|
Rename it based the windows type may let meaning is clearer
|
|
|
|
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
|
|
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
|
Link: https://patchwork.freedesktop.org/patch/msgid/20231018094339.2476142-1-andyshrk@163.com
|
|
---
|
|
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 30 ++++++++++----------
|
|
1 file changed, 15 insertions(+), 15 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
|
|
+++ b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
|
|
@@ -15,7 +15,7 @@
|
|
|
|
#include "rockchip_drm_vop2.h"
|
|
|
|
-static const uint32_t formats_win_full_10bit[] = {
|
|
+static const uint32_t formats_cluster[] = {
|
|
DRM_FORMAT_XRGB2101010,
|
|
DRM_FORMAT_ARGB2101010,
|
|
DRM_FORMAT_XBGR2101010,
|
|
@@ -34,7 +34,7 @@ static const uint32_t formats_win_full_1
|
|
DRM_FORMAT_Y210, /* yuv422_10bit non-Linear mode only */
|
|
};
|
|
|
|
-static const uint32_t formats_win_full_10bit_yuyv[] = {
|
|
+static const uint32_t formats_rk356x_esmart[] = {
|
|
DRM_FORMAT_XRGB8888,
|
|
DRM_FORMAT_ARGB8888,
|
|
DRM_FORMAT_XBGR8888,
|
|
@@ -54,7 +54,7 @@ static const uint32_t formats_win_full_1
|
|
DRM_FORMAT_VYUY, /* yuv422_8bit[VYUY] linear mode */
|
|
};
|
|
|
|
-static const uint32_t formats_win_lite[] = {
|
|
+static const uint32_t formats_smart[] = {
|
|
DRM_FORMAT_XRGB8888,
|
|
DRM_FORMAT_ARGB8888,
|
|
DRM_FORMAT_XBGR8888,
|
|
@@ -153,8 +153,8 @@ static const struct vop2_win_data rk3568
|
|
.name = "Smart0-win0",
|
|
.phys_id = ROCKCHIP_VOP2_SMART0,
|
|
.base = 0x1c00,
|
|
- .formats = formats_win_lite,
|
|
- .nformats = ARRAY_SIZE(formats_win_lite),
|
|
+ .formats = formats_smart,
|
|
+ .nformats = ARRAY_SIZE(formats_smart),
|
|
.format_modifiers = format_modifiers,
|
|
.layer_sel_id = 3,
|
|
.supported_rotations = DRM_MODE_REFLECT_Y,
|
|
@@ -165,8 +165,8 @@ static const struct vop2_win_data rk3568
|
|
}, {
|
|
.name = "Smart1-win0",
|
|
.phys_id = ROCKCHIP_VOP2_SMART1,
|
|
- .formats = formats_win_lite,
|
|
- .nformats = ARRAY_SIZE(formats_win_lite),
|
|
+ .formats = formats_smart,
|
|
+ .nformats = ARRAY_SIZE(formats_smart),
|
|
.format_modifiers = format_modifiers,
|
|
.base = 0x1e00,
|
|
.layer_sel_id = 7,
|
|
@@ -178,8 +178,8 @@ static const struct vop2_win_data rk3568
|
|
}, {
|
|
.name = "Esmart1-win0",
|
|
.phys_id = ROCKCHIP_VOP2_ESMART1,
|
|
- .formats = formats_win_full_10bit_yuyv,
|
|
- .nformats = ARRAY_SIZE(formats_win_full_10bit_yuyv),
|
|
+ .formats = formats_rk356x_esmart,
|
|
+ .nformats = ARRAY_SIZE(formats_rk356x_esmart),
|
|
.format_modifiers = format_modifiers,
|
|
.base = 0x1a00,
|
|
.layer_sel_id = 6,
|
|
@@ -191,8 +191,8 @@ static const struct vop2_win_data rk3568
|
|
}, {
|
|
.name = "Esmart0-win0",
|
|
.phys_id = ROCKCHIP_VOP2_ESMART0,
|
|
- .formats = formats_win_full_10bit_yuyv,
|
|
- .nformats = ARRAY_SIZE(formats_win_full_10bit_yuyv),
|
|
+ .formats = formats_rk356x_esmart,
|
|
+ .nformats = ARRAY_SIZE(formats_rk356x_esmart),
|
|
.format_modifiers = format_modifiers,
|
|
.base = 0x1800,
|
|
.layer_sel_id = 2,
|
|
@@ -205,8 +205,8 @@ static const struct vop2_win_data rk3568
|
|
.name = "Cluster0-win0",
|
|
.phys_id = ROCKCHIP_VOP2_CLUSTER0,
|
|
.base = 0x1000,
|
|
- .formats = formats_win_full_10bit,
|
|
- .nformats = ARRAY_SIZE(formats_win_full_10bit),
|
|
+ .formats = formats_cluster,
|
|
+ .nformats = ARRAY_SIZE(formats_cluster),
|
|
.format_modifiers = format_modifiers_afbc,
|
|
.layer_sel_id = 0,
|
|
.supported_rotations = DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_270 |
|
|
@@ -220,8 +220,8 @@ static const struct vop2_win_data rk3568
|
|
.name = "Cluster1-win0",
|
|
.phys_id = ROCKCHIP_VOP2_CLUSTER1,
|
|
.base = 0x1200,
|
|
- .formats = formats_win_full_10bit,
|
|
- .nformats = ARRAY_SIZE(formats_win_full_10bit),
|
|
+ .formats = formats_cluster,
|
|
+ .nformats = ARRAY_SIZE(formats_cluster),
|
|
.format_modifiers = format_modifiers_afbc,
|
|
.layer_sel_id = 1,
|
|
.supported_rotations = DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_270 |
|