Commit 8c16b988 authored by Abhinav Kumar's avatar Abhinav Kumar Committed by Dmitry Baryshkov

drm/msm/dpu: introduce separate wb2_format arrays for rgb and yuv

Lets rename the existing wb2_formats array wb2_formats_rgb to indicate
that it has only RGB formats and can be used on any chipset having a WB
block.

Introduce a new wb2_formats_rgb_yuv array to the catalog to
indicate support for YUV formats to writeback in addition to RGB.

Chipsets which have support for CDM block will use the newly added
wb2_formats_rgb_yuv array.

changes in v3:
	- change type of wb2_formats_rgb/wb2_formats_rgb_yuv to u32
	  to fix checkpatch warnings
Signed-off-by: default avatarAbhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/571837/
Link: https://lore.kernel.org/r/20231212205254.12422-15-quic_abhinavk@quicinc.com
[DB: fixed newer catalog entries]
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent 8b45a26f
...@@ -341,8 +341,8 @@ static const struct dpu_wb_cfg sm8650_wb[] = { ...@@ -341,8 +341,8 @@ static const struct dpu_wb_cfg sm8650_wb[] = {
.name = "wb_2", .id = WB_2, .name = "wb_2", .id = WB_2,
.base = 0x65000, .len = 0x2c8, .base = 0x65000, .len = 0x2c8,
.features = WB_SM8250_MASK, .features = WB_SM8250_MASK,
.format_list = wb2_formats, .format_list = wb2_formats_rgb,
.num_formats = ARRAY_SIZE(wb2_formats), .num_formats = ARRAY_SIZE(wb2_formats_rgb),
.xin_id = 6, .xin_id = 6,
.vbif_idx = VBIF_RT, .vbif_idx = VBIF_RT,
.maxlinewidth = 4096, .maxlinewidth = 4096,
......
...@@ -336,8 +336,8 @@ static const struct dpu_wb_cfg sm8250_wb[] = { ...@@ -336,8 +336,8 @@ static const struct dpu_wb_cfg sm8250_wb[] = {
.name = "wb_2", .id = WB_2, .name = "wb_2", .id = WB_2,
.base = 0x65000, .len = 0x2c8, .base = 0x65000, .len = 0x2c8,
.features = WB_SM8250_MASK, .features = WB_SM8250_MASK,
.format_list = wb2_formats, .format_list = wb2_formats_rgb_yuv,
.num_formats = ARRAY_SIZE(wb2_formats), .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv),
.clk_ctrl = DPU_CLK_CTRL_WB2, .clk_ctrl = DPU_CLK_CTRL_WB2,
.xin_id = 6, .xin_id = 6,
.vbif_idx = VBIF_RT, .vbif_idx = VBIF_RT,
......
...@@ -157,8 +157,8 @@ static const struct dpu_wb_cfg sc7180_wb[] = { ...@@ -157,8 +157,8 @@ static const struct dpu_wb_cfg sc7180_wb[] = {
.name = "wb_2", .id = WB_2, .name = "wb_2", .id = WB_2,
.base = 0x65000, .len = 0x2c8, .base = 0x65000, .len = 0x2c8,
.features = WB_SM8250_MASK, .features = WB_SM8250_MASK,
.format_list = wb2_formats, .format_list = wb2_formats_rgb,
.num_formats = ARRAY_SIZE(wb2_formats), .num_formats = ARRAY_SIZE(wb2_formats_rgb),
.clk_ctrl = DPU_CLK_CTRL_WB2, .clk_ctrl = DPU_CLK_CTRL_WB2,
.xin_id = 6, .xin_id = 6,
.vbif_idx = VBIF_RT, .vbif_idx = VBIF_RT,
......
...@@ -303,8 +303,8 @@ static const struct dpu_wb_cfg sm8350_wb[] = { ...@@ -303,8 +303,8 @@ static const struct dpu_wb_cfg sm8350_wb[] = {
.name = "wb_2", .id = WB_2, .name = "wb_2", .id = WB_2,
.base = 0x65000, .len = 0x2c8, .base = 0x65000, .len = 0x2c8,
.features = WB_SM8250_MASK, .features = WB_SM8250_MASK,
.format_list = wb2_formats, .format_list = wb2_formats_rgb,
.num_formats = ARRAY_SIZE(wb2_formats), .num_formats = ARRAY_SIZE(wb2_formats_rgb),
.clk_ctrl = DPU_CLK_CTRL_WB2, .clk_ctrl = DPU_CLK_CTRL_WB2,
.xin_id = 6, .xin_id = 6,
.vbif_idx = VBIF_RT, .vbif_idx = VBIF_RT,
......
...@@ -169,8 +169,8 @@ static const struct dpu_wb_cfg sc7280_wb[] = { ...@@ -169,8 +169,8 @@ static const struct dpu_wb_cfg sc7280_wb[] = {
.name = "wb_2", .id = WB_2, .name = "wb_2", .id = WB_2,
.base = 0x65000, .len = 0x2c8, .base = 0x65000, .len = 0x2c8,
.features = WB_SM8250_MASK, .features = WB_SM8250_MASK,
.format_list = wb2_formats, .format_list = wb2_formats_rgb_yuv,
.num_formats = ARRAY_SIZE(wb2_formats), .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv),
.clk_ctrl = DPU_CLK_CTRL_WB2, .clk_ctrl = DPU_CLK_CTRL_WB2,
.xin_id = 6, .xin_id = 6,
.vbif_idx = VBIF_RT, .vbif_idx = VBIF_RT,
......
...@@ -321,8 +321,8 @@ static const struct dpu_wb_cfg sm8450_wb[] = { ...@@ -321,8 +321,8 @@ static const struct dpu_wb_cfg sm8450_wb[] = {
.name = "wb_2", .id = WB_2, .name = "wb_2", .id = WB_2,
.base = 0x65000, .len = 0x2c8, .base = 0x65000, .len = 0x2c8,
.features = WB_SM8250_MASK, .features = WB_SM8250_MASK,
.format_list = wb2_formats, .format_list = wb2_formats_rgb,
.num_formats = ARRAY_SIZE(wb2_formats), .num_formats = ARRAY_SIZE(wb2_formats_rgb),
.clk_ctrl = DPU_CLK_CTRL_WB2, .clk_ctrl = DPU_CLK_CTRL_WB2,
.xin_id = 6, .xin_id = 6,
.vbif_idx = VBIF_RT, .vbif_idx = VBIF_RT,
......
...@@ -315,8 +315,8 @@ static const struct dpu_wb_cfg sm8550_wb[] = { ...@@ -315,8 +315,8 @@ static const struct dpu_wb_cfg sm8550_wb[] = {
.name = "wb_2", .id = WB_2, .name = "wb_2", .id = WB_2,
.base = 0x65000, .len = 0x2c8, .base = 0x65000, .len = 0x2c8,
.features = WB_SM8250_MASK, .features = WB_SM8250_MASK,
.format_list = wb2_formats, .format_list = wb2_formats_rgb,
.num_formats = ARRAY_SIZE(wb2_formats), .num_formats = ARRAY_SIZE(wb2_formats_rgb),
.xin_id = 6, .xin_id = 6,
.vbif_idx = VBIF_RT, .vbif_idx = VBIF_RT,
.maxlinewidth = 4096, .maxlinewidth = 4096,
......
...@@ -202,7 +202,7 @@ static const u32 rotation_v2_formats[] = { ...@@ -202,7 +202,7 @@ static const u32 rotation_v2_formats[] = {
/* TODO add formats after validation */ /* TODO add formats after validation */
}; };
static const uint32_t wb2_formats[] = { static const u32 wb2_formats_rgb[] = {
DRM_FORMAT_RGB565, DRM_FORMAT_RGB565,
DRM_FORMAT_BGR565, DRM_FORMAT_BGR565,
DRM_FORMAT_RGB888, DRM_FORMAT_RGB888,
...@@ -236,6 +236,41 @@ static const uint32_t wb2_formats[] = { ...@@ -236,6 +236,41 @@ static const uint32_t wb2_formats[] = {
DRM_FORMAT_XBGR4444, DRM_FORMAT_XBGR4444,
}; };
static const u32 wb2_formats_rgb_yuv[] = {
DRM_FORMAT_RGB565,
DRM_FORMAT_BGR565,
DRM_FORMAT_RGB888,
DRM_FORMAT_ARGB8888,
DRM_FORMAT_RGBA8888,
DRM_FORMAT_ABGR8888,
DRM_FORMAT_XRGB8888,
DRM_FORMAT_RGBX8888,
DRM_FORMAT_XBGR8888,
DRM_FORMAT_ARGB1555,
DRM_FORMAT_RGBA5551,
DRM_FORMAT_XRGB1555,
DRM_FORMAT_RGBX5551,
DRM_FORMAT_ARGB4444,
DRM_FORMAT_RGBA4444,
DRM_FORMAT_RGBX4444,
DRM_FORMAT_XRGB4444,
DRM_FORMAT_BGR565,
DRM_FORMAT_BGR888,
DRM_FORMAT_ABGR8888,
DRM_FORMAT_BGRA8888,
DRM_FORMAT_BGRX8888,
DRM_FORMAT_XBGR8888,
DRM_FORMAT_ABGR1555,
DRM_FORMAT_BGRA5551,
DRM_FORMAT_XBGR1555,
DRM_FORMAT_BGRX5551,
DRM_FORMAT_ABGR4444,
DRM_FORMAT_BGRA4444,
DRM_FORMAT_BGRX4444,
DRM_FORMAT_XBGR4444,
DRM_FORMAT_NV12,
};
/************************************************************* /*************************************************************
* SSPP sub blocks config * SSPP sub blocks config
*************************************************************/ *************************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment