disp: msm: sde: add drm properties required for wb rotation

This change installs required drm properties for writeback
connector to implement rotation with writeback hw in mdss.

Change-Id: I85ed359d06ff4bafee85a4bfa5b8a99774311e60
Signed-off-by: Prabhanjan Kandula <quic_pkandula@quicinc.com>
This commit is contained in:
Prabhanjan Kandula
2022-06-01 01:10:29 -07:00
committed by Gerrit - the friendly Code Review server
parent c14780557f
commit 4cca89d615
5 changed files with 37 additions and 1 deletions

View File

@@ -243,6 +243,7 @@ enum msm_mdp_conn_property {
CONNECTOR_PROP_CACHE_STATE, CONNECTOR_PROP_CACHE_STATE,
CONNECTOR_PROP_DSC_MODE, CONNECTOR_PROP_DSC_MODE,
CONNECTOR_PROP_WB_USAGE_TYPE, CONNECTOR_PROP_WB_USAGE_TYPE,
CONNECTOR_PROP_WB_ROT_TYPE,
/* total # of properties */ /* total # of properties */
CONNECTOR_PROP_COUNT CONNECTOR_PROP_COUNT

View File

@@ -2550,6 +2550,9 @@ 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))
set_bit(SDE_WB_LINEAR_ROTATION, &wb->features);
wb->format_list = sde_cfg->wb_formats; wb->format_list = sde_cfg->wb_formats;
} }

View File

@@ -637,6 +637,7 @@ enum {
* @SDE_WB_DCWB_CTRL Separate DCWB control is available for configuring * @SDE_WB_DCWB_CTRL Separate DCWB control is available for configuring
* @SDE_WB_CWB_DITHER_CTRL CWB dither is available for configuring * @SDE_WB_CWB_DITHER_CTRL CWB dither is available for configuring
* @SDE_WB_PROG_LINE Writeback block supports programmable line ptr * @SDE_WB_PROG_LINE Writeback block supports programmable line ptr
* @SDE_WB_LINEAR_ROTATION Writeback block supports line mode image rotation
* @SDE_WB_MAX maximum value * @SDE_WB_MAX maximum value
*/ */
enum { enum {
@@ -661,6 +662,7 @@ enum {
SDE_WB_DCWB_CTRL, SDE_WB_DCWB_CTRL,
SDE_WB_CWB_DITHER_CTRL, SDE_WB_CWB_DITHER_CTRL,
SDE_WB_PROG_LINE, SDE_WB_PROG_LINE,
SDE_WB_LINEAR_ROTATION,
SDE_WB_MAX SDE_WB_MAX
}; };
@@ -708,7 +710,7 @@ enum {
* @SDE_FEATURE_CWB_DITHER CWB dither is supported * @SDE_FEATURE_CWB_DITHER CWB dither is supported
* @SDE_FEATURE_DEDICATED_CWB Dedicated-CWB supported * @SDE_FEATURE_DEDICATED_CWB Dedicated-CWB supported
* @SDE_FEATURE_DUAL_DEDICATED_CWB Dual Dedicated-CWB supported * @SDE_FEATURE_DUAL_DEDICATED_CWB Dual Dedicated-CWB supported
* @SDE_FEATURE_IDLE_PC Idle Power Collapse supported * @SDE_FEATURE_WB_ROTATION Support for image rotation through WB block
* @SDE_FEATURE_3D_MERGE_RESET 3D merge reset supported * @SDE_FEATURE_3D_MERGE_RESET 3D merge reset supported
* @SDE_FEATURE_DECIMATION Decimation supported * @SDE_FEATURE_DECIMATION Decimation supported
* @SDE_FEATURE_COMBINED_ALPHA Combined Alpha supported * @SDE_FEATURE_COMBINED_ALPHA Combined Alpha supported
@@ -751,6 +753,7 @@ enum sde_mdss_features {
SDE_FEATURE_CWB_DITHER, SDE_FEATURE_CWB_DITHER,
SDE_FEATURE_DEDICATED_CWB, SDE_FEATURE_DEDICATED_CWB,
SDE_FEATURE_DUAL_DEDICATED_CWB, SDE_FEATURE_DUAL_DEDICATED_CWB,
SDE_FEATURE_WB_ROTATION,
SDE_FEATURE_IDLE_PC, SDE_FEATURE_IDLE_PC,
SDE_FEATURE_3D_MERGE_RESET, SDE_FEATURE_3D_MERGE_RESET,
SDE_FEATURE_DECIMATION, SDE_FEATURE_DECIMATION,

View File

@@ -502,11 +502,27 @@ enum sde_sys_cache_state {
* WB_USAGE_WFD: WB connector used for WFD * WB_USAGE_WFD: WB connector used for WFD
* WB_USAGE_CWB: WB connector used for concurrent writeback * WB_USAGE_CWB: WB connector used for concurrent writeback
* WB_USAGE_OFFLINE_WB: WB connector used for 2-pass composition * WB_USAGE_OFFLINE_WB: WB connector used for 2-pass composition
* WB_USAGE_ROT: WB connector used for image rotation for 2 pass composition
*/ */
enum sde_wb_usage_type { enum sde_wb_usage_type {
WB_USAGE_WFD, WB_USAGE_WFD,
WB_USAGE_CWB, WB_USAGE_CWB,
WB_USAGE_OFFLINE_WB, WB_USAGE_OFFLINE_WB,
WB_USAGE_ROT,
};
/**
* enum sde_wb_rot_type: Type of rotation use case of the WB connector
* WB_ROT_NONE : WB Rotation not in use
* WB_ROT_SINGLE: WB Rotation used in single job mode for full image rotation
* WB_ROT_JOB1: WB Rotation used for rotating half image as first-job
* WB_ROT_JOB2: WB Rotation used for rotating half image as second-job
*/
enum sde_wb_rot_type {
WB_ROT_NONE,
WB_ROT_SINGLE,
WB_ROT_JOB1,
WB_ROT_JOB2,
}; };
/** struct sde_format - defines the format configuration which /** struct sde_format - defines the format configuration which

View File

@@ -609,6 +609,14 @@ int sde_wb_connector_post_init(struct drm_connector *connector, void *display)
{WB_USAGE_WFD, "wb_usage_wfd"}, {WB_USAGE_WFD, "wb_usage_wfd"},
{WB_USAGE_CWB, "wb_usage_cwb"}, {WB_USAGE_CWB, "wb_usage_cwb"},
{WB_USAGE_OFFLINE_WB, "wb_usage_offline_wb"}, {WB_USAGE_OFFLINE_WB, "wb_usage_offline_wb"},
{WB_USAGE_ROT, "wb_usage_rot"},
};
static const struct drm_prop_enum_list e_wb_rotate_type[] = {
{WB_ROT_NONE, "wb_rot_none"},
{WB_ROT_SINGLE, "wb_rot_single"},
{WB_ROT_JOB1, "wb_rot_job1"},
{WB_ROT_JOB2, "wb_rot_job2"},
}; };
if (!connector || !display || !wb_dev->wb_cfg || !wb_dev->drm_dev->dev_private) { if (!connector || !display || !wb_dev->wb_cfg || !wb_dev->drm_dev->dev_private) {
@@ -662,6 +670,11 @@ int sde_wb_connector_post_init(struct drm_connector *connector, void *display)
msm_property_install_range(&c_conn->property_info, "dnsc_blur", msm_property_install_range(&c_conn->property_info, "dnsc_blur",
0x0, 0, ~0, 0, CONNECTOR_PROP_DNSC_BLUR); 0x0, 0, ~0, 0, CONNECTOR_PROP_DNSC_BLUR);
if (wb_dev->wb_cfg->features & BIT(SDE_WB_LINEAR_ROTATION))
msm_property_install_enum(&c_conn->property_info, "wb_rotate_type",
0x0, 0, e_wb_rotate_type, ARRAY_SIZE(e_wb_rotate_type),
0, CONNECTOR_PROP_WB_ROT_TYPE);
msm_property_install_enum(&c_conn->property_info, "wb_usage_type", msm_property_install_enum(&c_conn->property_info, "wb_usage_type",
0x0, 0, e_wb_usage_type, ARRAY_SIZE(e_wb_usage_type), 0x0, 0, e_wb_usage_type, ARRAY_SIZE(e_wb_usage_type),
0, CONNECTOR_PROP_WB_USAGE_TYPE); 0, CONNECTOR_PROP_WB_USAGE_TYPE);