disp: msm: sde: add WB rotation output color formats
MDSS 10.0.0 HW supports rotation of input image with writeback HW but output color formats are restricted to 32 bit uncompressed A5X tile formats. This change exposes the supported WB output color formats to client for WB rotation usecase. Change-Id: Ic52e6ee4ab882b7dad6edd0daa91b593afbcae01 Signed-off-by: Prabhanjan Kandula <quic_pkandula@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
4cca89d615
commit
f3c2c5e37d
@@ -2550,8 +2550,10 @@ static int sde_wb_parse_dt(struct device_node *np, struct sde_mdss_cfg *sde_cfg)
|
|||||||
sde_cfg->mdp[0].clk_ctrls[wb->clk_ctrl].bit_off);
|
sde_cfg->mdp[0].clk_ctrls[wb->clk_ctrl].bit_off);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (test_bit(SDE_FEATURE_WB_ROTATION, sde_cfg->features))
|
if (test_bit(SDE_FEATURE_WB_ROTATION, sde_cfg->features)) {
|
||||||
set_bit(SDE_WB_LINEAR_ROTATION, &wb->features);
|
set_bit(SDE_WB_LINEAR_ROTATION, &wb->features);
|
||||||
|
wb->rot_format_list = sde_cfg->wb_rot_formats;
|
||||||
|
}
|
||||||
|
|
||||||
wb->format_list = sde_cfg->wb_formats;
|
wb->format_list = sde_cfg->wb_formats;
|
||||||
}
|
}
|
||||||
@@ -4668,7 +4670,7 @@ static int sde_hardware_format_caps(struct sde_mdss_cfg *sde_cfg,
|
|||||||
uint32_t hw_rev)
|
uint32_t hw_rev)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
uint32_t dma_list_size, vig_list_size, wb2_list_size;
|
uint32_t dma_list_size, vig_list_size, wb2_list_size, wb_rot_fmt_list_size;
|
||||||
uint32_t virt_vig_list_size, in_rot_list_size = 0;
|
uint32_t virt_vig_list_size, in_rot_list_size = 0;
|
||||||
uint32_t index = 0;
|
uint32_t index = 0;
|
||||||
uint32_t in_rot_restricted_list_size = 0;
|
uint32_t in_rot_restricted_list_size = 0;
|
||||||
@@ -4749,6 +4751,18 @@ static int sde_hardware_format_caps(struct sde_mdss_cfg *sde_cfg,
|
|||||||
index = sde_copy_formats(sde_cfg->wb_formats, wb2_list_size,
|
index = sde_copy_formats(sde_cfg->wb_formats, wb2_list_size,
|
||||||
0, wb2_formats, ARRAY_SIZE(wb2_formats));
|
0, wb2_formats, ARRAY_SIZE(wb2_formats));
|
||||||
|
|
||||||
|
/* WB rotation output formats */
|
||||||
|
wb_rot_fmt_list_size = ARRAY_SIZE(wb_rot_formats);
|
||||||
|
sde_cfg->wb_rot_formats = kcalloc(wb_rot_fmt_list_size,
|
||||||
|
sizeof(struct sde_format_extended), GFP_KERNEL);
|
||||||
|
if (!sde_cfg->wb_rot_formats) {
|
||||||
|
rc = -ENOMEM;
|
||||||
|
goto free_wb;
|
||||||
|
}
|
||||||
|
|
||||||
|
index = sde_copy_formats(sde_cfg->wb_rot_formats, wb_rot_fmt_list_size,
|
||||||
|
0, wb_rot_formats, ARRAY_SIZE(wb_rot_formats));
|
||||||
|
|
||||||
/* Rotation enabled input formats */
|
/* Rotation enabled input formats */
|
||||||
if (IS_SDE_INLINE_ROT_REV_100(sde_cfg->true_inline_rot_rev)) {
|
if (IS_SDE_INLINE_ROT_REV_100(sde_cfg->true_inline_rot_rev)) {
|
||||||
inline_fmt_tbl = true_inline_rot_v1_fmts;
|
inline_fmt_tbl = true_inline_rot_v1_fmts;
|
||||||
@@ -4769,7 +4783,7 @@ static int sde_hardware_format_caps(struct sde_mdss_cfg *sde_cfg,
|
|||||||
if (!sde_cfg->inline_rot_formats) {
|
if (!sde_cfg->inline_rot_formats) {
|
||||||
SDE_ERROR("failed to alloc inline rot format list\n");
|
SDE_ERROR("failed to alloc inline rot format list\n");
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
goto free_wb;
|
goto free_wb_rot;
|
||||||
}
|
}
|
||||||
|
|
||||||
index = sde_copy_formats(sde_cfg->inline_rot_formats,
|
index = sde_copy_formats(sde_cfg->inline_rot_formats,
|
||||||
@@ -4793,6 +4807,8 @@ static int sde_hardware_format_caps(struct sde_mdss_cfg *sde_cfg,
|
|||||||
return 0;
|
return 0;
|
||||||
free_in_rot:
|
free_in_rot:
|
||||||
kfree(sde_cfg->inline_rot_formats);
|
kfree(sde_cfg->inline_rot_formats);
|
||||||
|
free_wb_rot:
|
||||||
|
kfree(sde_cfg->wb_rot_formats);
|
||||||
free_wb:
|
free_wb:
|
||||||
kfree(sde_cfg->wb_formats);
|
kfree(sde_cfg->wb_formats);
|
||||||
free_virt:
|
free_virt:
|
||||||
@@ -5421,6 +5437,7 @@ void sde_hw_catalog_deinit(struct sde_mdss_cfg *sde_cfg)
|
|||||||
kfree(sde_cfg->dma_formats);
|
kfree(sde_cfg->dma_formats);
|
||||||
kfree(sde_cfg->vig_formats);
|
kfree(sde_cfg->vig_formats);
|
||||||
kfree(sde_cfg->wb_formats);
|
kfree(sde_cfg->wb_formats);
|
||||||
|
kfree(sde_cfg->wb_rot_formats);
|
||||||
kfree(sde_cfg->virt_vig_formats);
|
kfree(sde_cfg->virt_vig_formats);
|
||||||
kfree(sde_cfg->inline_rot_formats);
|
kfree(sde_cfg->inline_rot_formats);
|
||||||
|
|
||||||
|
@@ -1487,7 +1487,8 @@ struct sde_intf_cfg {
|
|||||||
* @base register offset of this block
|
* @base register offset of this block
|
||||||
* @features bit mask identifying sub-blocks/features
|
* @features bit mask identifying sub-blocks/features
|
||||||
* @sblk sub-block information
|
* @sblk sub-block information
|
||||||
* @format_list: Pointer to list of supported formats
|
* @format_list: Pointer to list of supported output formats
|
||||||
|
* @rot_format_list: Pointer to list of supported output formats in WB rotation
|
||||||
* @vbif_idx vbif identifier
|
* @vbif_idx vbif identifier
|
||||||
* @xin_id client interface identifier
|
* @xin_id client interface identifier
|
||||||
* @clk_ctrl clock control identifier
|
* @clk_ctrl clock control identifier
|
||||||
@@ -1496,6 +1497,7 @@ struct sde_wb_cfg {
|
|||||||
SDE_HW_BLK_INFO;
|
SDE_HW_BLK_INFO;
|
||||||
const struct sde_wb_sub_blocks *sblk;
|
const struct sde_wb_sub_blocks *sblk;
|
||||||
const struct sde_format_extended *format_list;
|
const struct sde_format_extended *format_list;
|
||||||
|
const struct sde_format_extended *rot_format_list;
|
||||||
u32 vbif_idx;
|
u32 vbif_idx;
|
||||||
u32 xin_id;
|
u32 xin_id;
|
||||||
enum sde_clk_ctrl_type clk_ctrl;
|
enum sde_clk_ctrl_type clk_ctrl;
|
||||||
@@ -1867,6 +1869,7 @@ struct sde_perf_cfg {
|
|||||||
* @dma_formats supported formats for dma pipe
|
* @dma_formats supported formats for dma pipe
|
||||||
* @vig_formats supported formats for vig pipe
|
* @vig_formats supported formats for vig pipe
|
||||||
* @wb_formats supported formats for wb
|
* @wb_formats supported formats for wb
|
||||||
|
* @wb_rot_formats supported output formats for wb rotation operation
|
||||||
* @virt_vig_formats supported formats for virtual vig pipe
|
* @virt_vig_formats supported formats for virtual vig pipe
|
||||||
* @inline_rot_formats supported formats for inline rotation
|
* @inline_rot_formats supported formats for inline rotation
|
||||||
* @inline_rot_restricted_formats restricted formats for inline rotation
|
* @inline_rot_restricted_formats restricted formats for inline rotation
|
||||||
@@ -1985,6 +1988,7 @@ struct sde_mdss_cfg {
|
|||||||
struct sde_format_extended *dma_formats;
|
struct sde_format_extended *dma_formats;
|
||||||
struct sde_format_extended *vig_formats;
|
struct sde_format_extended *vig_formats;
|
||||||
struct sde_format_extended *wb_formats;
|
struct sde_format_extended *wb_formats;
|
||||||
|
struct sde_format_extended *wb_rot_formats;
|
||||||
struct sde_format_extended *virt_vig_formats;
|
struct sde_format_extended *virt_vig_formats;
|
||||||
struct sde_format_extended *inline_rot_formats;
|
struct sde_format_extended *inline_rot_formats;
|
||||||
struct sde_format_extended *inline_rot_restricted_formats;
|
struct sde_format_extended *inline_rot_restricted_formats;
|
||||||
|
@@ -94,6 +94,10 @@ static const struct sde_format_extended wb2_formats[] = {
|
|||||||
{DRM_FORMAT_ARGB8888, 0},
|
{DRM_FORMAT_ARGB8888, 0},
|
||||||
{DRM_FORMAT_RGBA8888, 0},
|
{DRM_FORMAT_RGBA8888, 0},
|
||||||
{DRM_FORMAT_ABGR8888, DRM_FORMAT_MOD_QCOM_COMPRESSED},
|
{DRM_FORMAT_ABGR8888, DRM_FORMAT_MOD_QCOM_COMPRESSED},
|
||||||
|
{DRM_FORMAT_ABGR8888, DRM_FORMAT_MOD_QCOM_TILE},
|
||||||
|
{DRM_FORMAT_XBGR8888, DRM_FORMAT_MOD_QCOM_TILE},
|
||||||
|
{DRM_FORMAT_ABGR2101010, DRM_FORMAT_MOD_QCOM_TILE},
|
||||||
|
{DRM_FORMAT_XBGR2101010, DRM_FORMAT_MOD_QCOM_TILE},
|
||||||
{DRM_FORMAT_XRGB8888, 0},
|
{DRM_FORMAT_XRGB8888, 0},
|
||||||
{DRM_FORMAT_RGBX8888, 0},
|
{DRM_FORMAT_RGBX8888, 0},
|
||||||
{DRM_FORMAT_XBGR8888, DRM_FORMAT_MOD_QCOM_COMPRESSED},
|
{DRM_FORMAT_XBGR8888, DRM_FORMAT_MOD_QCOM_COMPRESSED},
|
||||||
@@ -131,6 +135,14 @@ static const struct sde_format_extended wb2_formats[] = {
|
|||||||
{0, 0},
|
{0, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct sde_format_extended wb_rot_formats[] = {
|
||||||
|
{DRM_FORMAT_ABGR8888, DRM_FORMAT_MOD_QCOM_TILE},
|
||||||
|
{DRM_FORMAT_XBGR8888, DRM_FORMAT_MOD_QCOM_TILE},
|
||||||
|
{DRM_FORMAT_ABGR2101010, DRM_FORMAT_MOD_QCOM_TILE},
|
||||||
|
{DRM_FORMAT_XBGR2101010, DRM_FORMAT_MOD_QCOM_TILE},
|
||||||
|
{0, 0},
|
||||||
|
};
|
||||||
|
|
||||||
static const struct sde_format_extended p010_ubwc_formats[] = {
|
static const struct sde_format_extended p010_ubwc_formats[] = {
|
||||||
P010_UBWC_FMTS,
|
P010_UBWC_FMTS,
|
||||||
};
|
};
|
||||||
|
@@ -532,6 +532,18 @@ int sde_wb_connector_set_info_blob(struct drm_connector *connector,
|
|||||||
sde_kms_info_stop(info);
|
sde_kms_info_stop(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Populate info buffer with WB rotation output formats */
|
||||||
|
format_list = wb_dev->wb_cfg->rot_format_list;
|
||||||
|
if (format_list) {
|
||||||
|
sde_kms_info_start(info, "rot_output_formats");
|
||||||
|
while (format_list->fourcc_format) {
|
||||||
|
sde_kms_info_append_format(info, format_list->fourcc_format,
|
||||||
|
format_list->modifier);
|
||||||
|
++format_list;
|
||||||
|
}
|
||||||
|
sde_kms_info_stop(info);
|
||||||
|
}
|
||||||
|
|
||||||
sde_kms_info_add_keyint(info, "wb_intf_index", wb_dev->wb_idx - WB_0);
|
sde_kms_info_add_keyint(info, "wb_intf_index", wb_dev->wb_idx - WB_0);
|
||||||
sde_kms_info_add_keyint(info, "maxlinewidth", wb_dev->wb_cfg->sblk->maxlinewidth);
|
sde_kms_info_add_keyint(info, "maxlinewidth", wb_dev->wb_cfg->sblk->maxlinewidth);
|
||||||
sde_kms_info_add_keyint(info, "maxlinewidth_linear",
|
sde_kms_info_add_keyint(info, "maxlinewidth_linear",
|
||||||
|
Reference in New Issue
Block a user