disp: msm: dsi: Enable TPG functionality
Allow TPG patterns to be displayed on command mode and video mode panels. Change-Id: Ie9ba9b404ceb965f8a06d1f19e932dd2e051983b Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
This commit is contained in:
@@ -3741,7 +3741,9 @@ error:
|
||||
*
|
||||
* Return: error code.
|
||||
*/
|
||||
int dsi_ctrl_set_tpg_state(struct dsi_ctrl *dsi_ctrl, bool on)
|
||||
int dsi_ctrl_set_tpg_state(struct dsi_ctrl *dsi_ctrl, bool on,
|
||||
enum dsi_test_pattern type, u32 init_val,
|
||||
enum dsi_ctrl_tpg_pattern pattern)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
@@ -3760,19 +3762,13 @@ int dsi_ctrl_set_tpg_state(struct dsi_ctrl *dsi_ctrl, bool on)
|
||||
}
|
||||
|
||||
if (on) {
|
||||
if (dsi_ctrl->host_config.panel_mode == DSI_OP_VIDEO_MODE) {
|
||||
dsi_ctrl->hw.ops.video_test_pattern_setup(&dsi_ctrl->hw,
|
||||
DSI_TEST_PATTERN_INC,
|
||||
0xFFFF);
|
||||
} else {
|
||||
dsi_ctrl->hw.ops.cmd_test_pattern_setup(
|
||||
&dsi_ctrl->hw,
|
||||
DSI_TEST_PATTERN_INC,
|
||||
0xFFFF,
|
||||
0x0);
|
||||
}
|
||||
if (dsi_ctrl->host_config.panel_mode == DSI_OP_VIDEO_MODE)
|
||||
dsi_ctrl->hw.ops.video_test_pattern_setup(&dsi_ctrl->hw, type, init_val);
|
||||
else
|
||||
dsi_ctrl->hw.ops.cmd_test_pattern_setup(&dsi_ctrl->hw, type, init_val, 0x0);
|
||||
}
|
||||
dsi_ctrl->hw.ops.test_pattern_enable(&dsi_ctrl->hw, on);
|
||||
dsi_ctrl->hw.ops.test_pattern_enable(&dsi_ctrl->hw, on, pattern,
|
||||
dsi_ctrl->host_config.panel_mode);
|
||||
|
||||
DSI_CTRL_DEBUG(dsi_ctrl, "Set test pattern state=%d\n", on);
|
||||
dsi_ctrl_update_state(dsi_ctrl, DSI_CTRL_OP_TPG, on);
|
||||
@@ -3781,6 +3777,30 @@ error:
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* dsi_ctrl_trigger_test_pattern() - trigger a command mode frame update with test pattern
|
||||
* @dsi_ctrl: DSI controller handle.
|
||||
*
|
||||
* Trigger a command mode frame update with chosen test pattern.
|
||||
*
|
||||
* Return: error code.
|
||||
*/
|
||||
int dsi_ctrl_trigger_test_pattern(struct dsi_ctrl *dsi_ctrl)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (!dsi_ctrl) {
|
||||
DSI_CTRL_ERR(dsi_ctrl, "Invalid params\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mutex_lock(&dsi_ctrl->ctrl_lock);
|
||||
dsi_ctrl->hw.ops.trigger_cmd_test_pattern(&dsi_ctrl->hw, 0);
|
||||
mutex_unlock(&dsi_ctrl->ctrl_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* dsi_ctrl_set_host_engine_state() - set host engine state
|
||||
* @dsi_ctrl: DSI Controller handle.
|
||||
|
Referens i nytt ärende
Block a user