mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
drm/rockchip: vop2: rename and correct supported format
Signed-off-by: Sandy Huang <hjc@rock-chips.com> Change-Id: Ie9b78a26446ce8fc413f2595df6414c1454f03f9
This commit is contained in:
committed by
Huang Jiachai
parent
3023f3acc5
commit
cf58ab4406
@@ -30,7 +30,7 @@
|
||||
#define VOP_REG_MASK(off, _mask, s) \
|
||||
_VOP_REG(off, _mask, s, true)
|
||||
|
||||
static const uint32_t formats_win_full_10bit[] = {
|
||||
static const uint32_t formats_for_cluster[] = {
|
||||
DRM_FORMAT_XRGB2101010,
|
||||
DRM_FORMAT_ARGB2101010,
|
||||
DRM_FORMAT_XBGR2101010,
|
||||
@@ -53,14 +53,11 @@ static const uint32_t formats_win_full_10bit[] = {
|
||||
#endif
|
||||
DRM_FORMAT_YUV420_8BIT, /* yuv420_8bit non-Linear mode only */
|
||||
DRM_FORMAT_YUV420_10BIT, /* yuv420_10bit non-Linear mode only */
|
||||
DRM_FORMAT_YVYU, /* yuv422_8bit[YVYU] linear mode or non-Linear mode */
|
||||
DRM_FORMAT_VYUY, /* yuv422_8bit[VYUY] linear mode or non-Linear mode */
|
||||
DRM_FORMAT_YUYV, /* yuv422_8bit[YUYV] linear mode or non-Linear mode */
|
||||
DRM_FORMAT_UYVY, /* yuv422_8bit[UYVY] linear mode or non-Linear mode */
|
||||
DRM_FORMAT_YUYV, /* yuv422_8bit non-Linear mode only*/
|
||||
DRM_FORMAT_Y210, /* yuv422_10bit non-Linear mode only */
|
||||
};
|
||||
|
||||
static const uint32_t formats_win_full_10bit_yuyv[] = {
|
||||
static const uint32_t formats_for_esmart[] = {
|
||||
DRM_FORMAT_XRGB8888,
|
||||
DRM_FORMAT_ARGB8888,
|
||||
DRM_FORMAT_XBGR8888,
|
||||
@@ -77,13 +74,35 @@ static const uint32_t formats_win_full_10bit_yuyv[] = {
|
||||
DRM_FORMAT_NV20, /* yuv422_10bit linear mode, 2 plane, no padding */
|
||||
DRM_FORMAT_NV30, /* yuv444_10bit linear mode, 2 plane, no padding */
|
||||
#endif
|
||||
DRM_FORMAT_YVYU, /* yuv422_8bit[YVYU] linear mode or non-Linear mode */
|
||||
DRM_FORMAT_VYUY, /* yuv422_8bit[VYUY] linear mode or non-Linear mode */
|
||||
DRM_FORMAT_YUYV, /* yuv422_8bit[YUYV] linear mode or non-Linear mode */
|
||||
DRM_FORMAT_UYVY, /* yuv422_8bit[UYVY] linear mode or non-Linear mode */
|
||||
DRM_FORMAT_YVYU, /* yuv422_8bit[YVYU] linear mode */
|
||||
DRM_FORMAT_VYUY, /* yuv422_8bit[VYUY] linear mode */
|
||||
DRM_FORMAT_YUYV, /* yuv422_8bit[YUYV] linear mode */
|
||||
DRM_FORMAT_UYVY, /* yuv422_8bit[UYVY] linear mode */
|
||||
};
|
||||
|
||||
static const uint32_t formats_win_lite[] = {
|
||||
/* RK356x can't support uv swap for YUYV and UYVY */
|
||||
static const uint32_t formats_for_rk356x_esmart[] = {
|
||||
DRM_FORMAT_XRGB8888,
|
||||
DRM_FORMAT_ARGB8888,
|
||||
DRM_FORMAT_XBGR8888,
|
||||
DRM_FORMAT_ABGR8888,
|
||||
DRM_FORMAT_RGB888,
|
||||
DRM_FORMAT_BGR888,
|
||||
DRM_FORMAT_RGB565,
|
||||
DRM_FORMAT_BGR565,
|
||||
DRM_FORMAT_NV12, /* yuv420_8bit linear mode, 2 plane */
|
||||
DRM_FORMAT_NV16, /* yuv422_8bit linear mode, 2 plane */
|
||||
DRM_FORMAT_NV24, /* yuv444_8bit linear mode, 2 plane */
|
||||
DRM_FORMAT_NV15, /* yuv420_10bit linear mode, 2 plane, no padding */
|
||||
#ifdef CONFIG_NO_GKI
|
||||
DRM_FORMAT_NV20, /* yuv422_10bit linear mode, 2 plane, no padding */
|
||||
DRM_FORMAT_NV30, /* yuv444_10bit linear mode, 2 plane, no padding */
|
||||
#endif
|
||||
DRM_FORMAT_YUYV, /* yuv422_8bit[YUYV] linear mode */
|
||||
DRM_FORMAT_UYVY, /* yuv422_8bit[UYVY] linear mode */
|
||||
};
|
||||
|
||||
static const uint32_t formats_for_smart[] = {
|
||||
DRM_FORMAT_XRGB8888,
|
||||
DRM_FORMAT_ARGB8888,
|
||||
DRM_FORMAT_XBGR8888,
|
||||
@@ -1805,8 +1824,8 @@ static const struct vop2_win_data rk3568_vop_win_data[] = {
|
||||
.name = "Smart0-win0",
|
||||
.phys_id = ROCKCHIP_VOP2_SMART0,
|
||||
.base = 0x400,
|
||||
.formats = formats_win_lite,
|
||||
.nformats = ARRAY_SIZE(formats_win_lite),
|
||||
.formats = formats_for_smart,
|
||||
.nformats = ARRAY_SIZE(formats_for_smart),
|
||||
.format_modifiers = format_modifiers,
|
||||
.layer_sel_id = 3,
|
||||
.supported_rotations = DRM_MODE_REFLECT_Y,
|
||||
@@ -1827,8 +1846,8 @@ static const struct vop2_win_data rk3568_vop_win_data[] = {
|
||||
{
|
||||
.name = "Smart1-win0",
|
||||
.phys_id = ROCKCHIP_VOP2_SMART1,
|
||||
.formats = formats_win_lite,
|
||||
.nformats = ARRAY_SIZE(formats_win_lite),
|
||||
.formats = formats_for_smart,
|
||||
.nformats = ARRAY_SIZE(formats_for_smart),
|
||||
.format_modifiers = format_modifiers,
|
||||
.base = 0x600,
|
||||
.layer_sel_id = 7,
|
||||
@@ -1850,8 +1869,8 @@ static const struct vop2_win_data rk3568_vop_win_data[] = {
|
||||
{
|
||||
.name = "Esmart1-win0",
|
||||
.phys_id = ROCKCHIP_VOP2_ESMART1,
|
||||
.formats = formats_win_full_10bit_yuyv,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit_yuyv),
|
||||
.formats = formats_for_rk356x_esmart,
|
||||
.nformats = ARRAY_SIZE(formats_for_rk356x_esmart),
|
||||
.format_modifiers = format_modifiers,
|
||||
.base = 0x200,
|
||||
.layer_sel_id = 6,
|
||||
@@ -1873,8 +1892,8 @@ static const struct vop2_win_data rk3568_vop_win_data[] = {
|
||||
{
|
||||
.name = "Esmart0-win0",
|
||||
.phys_id = ROCKCHIP_VOP2_ESMART0,
|
||||
.formats = formats_win_full_10bit_yuyv,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit_yuyv),
|
||||
.formats = formats_for_rk356x_esmart,
|
||||
.nformats = ARRAY_SIZE(formats_for_rk356x_esmart),
|
||||
.format_modifiers = format_modifiers,
|
||||
.base = 0x0,
|
||||
.layer_sel_id = 2,
|
||||
@@ -1897,8 +1916,8 @@ static const struct vop2_win_data rk3568_vop_win_data[] = {
|
||||
.name = "Cluster0-win0",
|
||||
.phys_id = ROCKCHIP_VOP2_CLUSTER0,
|
||||
.base = 0x00,
|
||||
.formats = formats_win_full_10bit,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit),
|
||||
.formats = formats_for_cluster,
|
||||
.nformats = ARRAY_SIZE(formats_for_cluster),
|
||||
.format_modifiers = format_modifiers_afbc,
|
||||
.layer_sel_id = 0,
|
||||
.supported_rotations = DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_270 |
|
||||
@@ -1920,8 +1939,8 @@ static const struct vop2_win_data rk3568_vop_win_data[] = {
|
||||
.phys_id = ROCKCHIP_VOP2_CLUSTER0,
|
||||
.base = 0x80,
|
||||
.layer_sel_id = -1,
|
||||
.formats = formats_win_full_10bit,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit),
|
||||
.formats = formats_for_cluster,
|
||||
.nformats = ARRAY_SIZE(formats_for_cluster),
|
||||
.format_modifiers = format_modifiers_afbc,
|
||||
.supported_rotations = DRM_MODE_REFLECT_X | DRM_MODE_REFLECT_Y,
|
||||
.hsu_filter_mode = VOP2_SCALE_UP_BIC,
|
||||
@@ -1939,8 +1958,8 @@ static const struct vop2_win_data rk3568_vop_win_data[] = {
|
||||
.name = "Cluster1-win0",
|
||||
.phys_id = ROCKCHIP_VOP2_CLUSTER1,
|
||||
.base = 0x00,
|
||||
.formats = formats_win_full_10bit,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit),
|
||||
.formats = formats_for_cluster,
|
||||
.nformats = ARRAY_SIZE(formats_for_cluster),
|
||||
.format_modifiers = format_modifiers_afbc,
|
||||
.layer_sel_id = 1,
|
||||
.supported_rotations = DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_270 |
|
||||
@@ -1961,8 +1980,8 @@ static const struct vop2_win_data rk3568_vop_win_data[] = {
|
||||
.name = "Cluster1-win1",
|
||||
.phys_id = ROCKCHIP_VOP2_CLUSTER1,
|
||||
.layer_sel_id = -1,
|
||||
.formats = formats_win_full_10bit,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit),
|
||||
.formats = formats_for_cluster,
|
||||
.nformats = ARRAY_SIZE(formats_for_cluster),
|
||||
.format_modifiers = format_modifiers_afbc,
|
||||
.base = 0x80,
|
||||
.supported_rotations = DRM_MODE_REFLECT_X | DRM_MODE_REFLECT_Y,
|
||||
@@ -2204,8 +2223,8 @@ static const struct vop2_win_data rk3588_vop_win_data[] = {
|
||||
.phys_id = ROCKCHIP_VOP2_CLUSTER0,
|
||||
.splice_win_id = ROCKCHIP_VOP2_CLUSTER1,
|
||||
.base = 0x00,
|
||||
.formats = formats_win_full_10bit,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit),
|
||||
.formats = formats_for_cluster,
|
||||
.nformats = ARRAY_SIZE(formats_for_cluster),
|
||||
.format_modifiers = format_modifiers_afbc,
|
||||
.layer_sel_id = 0,
|
||||
.supported_rotations = DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_270 |
|
||||
@@ -2231,8 +2250,8 @@ static const struct vop2_win_data rk3588_vop_win_data[] = {
|
||||
.phys_id = ROCKCHIP_VOP2_CLUSTER0,
|
||||
.base = 0x80,
|
||||
.layer_sel_id = -1,
|
||||
.formats = formats_win_full_10bit,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit),
|
||||
.formats = formats_for_cluster,
|
||||
.nformats = ARRAY_SIZE(formats_for_cluster),
|
||||
.format_modifiers = format_modifiers_afbc,
|
||||
.supported_rotations = DRM_MODE_REFLECT_X | DRM_MODE_REFLECT_Y,
|
||||
.hsu_filter_mode = VOP2_SCALE_UP_BIC,
|
||||
@@ -2253,8 +2272,8 @@ static const struct vop2_win_data rk3588_vop_win_data[] = {
|
||||
.name = "Cluster1-win0",
|
||||
.phys_id = ROCKCHIP_VOP2_CLUSTER1,
|
||||
.base = 0x00,
|
||||
.formats = formats_win_full_10bit,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit),
|
||||
.formats = formats_for_cluster,
|
||||
.nformats = ARRAY_SIZE(formats_for_cluster),
|
||||
.format_modifiers = format_modifiers_afbc,
|
||||
.layer_sel_id = 1,
|
||||
.supported_rotations = DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_270 |
|
||||
@@ -2279,8 +2298,8 @@ static const struct vop2_win_data rk3588_vop_win_data[] = {
|
||||
.name = "Cluster1-win1",
|
||||
.phys_id = ROCKCHIP_VOP2_CLUSTER1,
|
||||
.layer_sel_id = -1,
|
||||
.formats = formats_win_full_10bit,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit),
|
||||
.formats = formats_for_cluster,
|
||||
.nformats = ARRAY_SIZE(formats_for_cluster),
|
||||
.format_modifiers = format_modifiers_afbc,
|
||||
.base = 0x80,
|
||||
.supported_rotations = DRM_MODE_REFLECT_X | DRM_MODE_REFLECT_Y,
|
||||
@@ -2304,8 +2323,8 @@ static const struct vop2_win_data rk3588_vop_win_data[] = {
|
||||
.pd_id = VOP2_PD_CLUSTER2,
|
||||
.splice_win_id = ROCKCHIP_VOP2_CLUSTER3,
|
||||
.base = 0x00,
|
||||
.formats = formats_win_full_10bit,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit),
|
||||
.formats = formats_for_cluster,
|
||||
.nformats = ARRAY_SIZE(formats_for_cluster),
|
||||
.format_modifiers = format_modifiers_afbc,
|
||||
.layer_sel_id = 4,
|
||||
.supported_rotations = DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_270 |
|
||||
@@ -2329,8 +2348,8 @@ static const struct vop2_win_data rk3588_vop_win_data[] = {
|
||||
.name = "Cluster2-win1",
|
||||
.phys_id = ROCKCHIP_VOP2_CLUSTER2,
|
||||
.layer_sel_id = -1,
|
||||
.formats = formats_win_full_10bit,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit),
|
||||
.formats = formats_for_cluster,
|
||||
.nformats = ARRAY_SIZE(formats_for_cluster),
|
||||
.format_modifiers = format_modifiers_afbc,
|
||||
.base = 0x80,
|
||||
.supported_rotations = DRM_MODE_REFLECT_X | DRM_MODE_REFLECT_Y,
|
||||
@@ -2353,8 +2372,8 @@ static const struct vop2_win_data rk3588_vop_win_data[] = {
|
||||
.phys_id = ROCKCHIP_VOP2_CLUSTER3,
|
||||
.pd_id = VOP2_PD_CLUSTER3,
|
||||
.base = 0x00,
|
||||
.formats = formats_win_full_10bit,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit),
|
||||
.formats = formats_for_cluster,
|
||||
.nformats = ARRAY_SIZE(formats_for_cluster),
|
||||
.format_modifiers = format_modifiers_afbc,
|
||||
.layer_sel_id = 5,
|
||||
.supported_rotations = DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_270 |
|
||||
@@ -2378,8 +2397,8 @@ static const struct vop2_win_data rk3588_vop_win_data[] = {
|
||||
.name = "Cluster3-win1",
|
||||
.phys_id = ROCKCHIP_VOP2_CLUSTER3,
|
||||
.layer_sel_id = -1,
|
||||
.formats = formats_win_full_10bit,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit),
|
||||
.formats = formats_for_cluster,
|
||||
.nformats = ARRAY_SIZE(formats_for_cluster),
|
||||
.format_modifiers = format_modifiers_afbc,
|
||||
.base = 0x80,
|
||||
.supported_rotations = DRM_MODE_REFLECT_X | DRM_MODE_REFLECT_Y,
|
||||
@@ -2402,8 +2421,8 @@ static const struct vop2_win_data rk3588_vop_win_data[] = {
|
||||
.phys_id = ROCKCHIP_VOP2_ESMART0,
|
||||
.pd_id = VOP2_PD_ESMART0,
|
||||
.splice_win_id = ROCKCHIP_VOP2_ESMART1,
|
||||
.formats = formats_win_full_10bit_yuyv,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit_yuyv),
|
||||
.formats = formats_for_esmart,
|
||||
.nformats = ARRAY_SIZE(formats_for_esmart),
|
||||
.format_modifiers = format_modifiers,
|
||||
.base = 0x0,
|
||||
.layer_sel_id = 2,
|
||||
@@ -2431,8 +2450,8 @@ static const struct vop2_win_data rk3588_vop_win_data[] = {
|
||||
.pd_id = VOP2_PD_ESMART0,
|
||||
.splice_win_id = ROCKCHIP_VOP2_ESMART3,
|
||||
.base = 0x400,
|
||||
.formats = formats_win_full_10bit_yuyv,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit_yuyv),
|
||||
.formats = formats_for_esmart,
|
||||
.nformats = ARRAY_SIZE(formats_for_esmart),
|
||||
.format_modifiers = format_modifiers,
|
||||
.layer_sel_id = 6,
|
||||
.supported_rotations = DRM_MODE_REFLECT_Y,
|
||||
@@ -2457,8 +2476,8 @@ static const struct vop2_win_data rk3588_vop_win_data[] = {
|
||||
.name = "Esmart1-win0",
|
||||
.phys_id = ROCKCHIP_VOP2_ESMART1,
|
||||
.pd_id = VOP2_PD_ESMART0,
|
||||
.formats = formats_win_full_10bit_yuyv,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit_yuyv),
|
||||
.formats = formats_for_esmart,
|
||||
.nformats = ARRAY_SIZE(formats_for_esmart),
|
||||
.format_modifiers = format_modifiers,
|
||||
.base = 0x200,
|
||||
.layer_sel_id = 3,
|
||||
@@ -2484,8 +2503,8 @@ static const struct vop2_win_data rk3588_vop_win_data[] = {
|
||||
.name = "Esmart3-win0",
|
||||
.phys_id = ROCKCHIP_VOP2_ESMART3,
|
||||
.pd_id = VOP2_PD_ESMART0,
|
||||
.formats = formats_win_full_10bit_yuyv,
|
||||
.nformats = ARRAY_SIZE(formats_win_full_10bit_yuyv),
|
||||
.formats = formats_for_esmart,
|
||||
.nformats = ARRAY_SIZE(formats_for_esmart),
|
||||
.format_modifiers = format_modifiers,
|
||||
.base = 0x600,
|
||||
.layer_sel_id = 7,
|
||||
|
||||
Reference in New Issue
Block a user