Merge "disp: msm: dp: fix tpg configuration to handle widebus"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
e252e85f29
@@ -1407,6 +1407,7 @@ static void dp_catalog_panel_tpg_cfg(struct dp_catalog_panel *panel,
|
|||||||
{
|
{
|
||||||
struct dp_catalog_private *catalog;
|
struct dp_catalog_private *catalog;
|
||||||
struct dp_io_data *io_data;
|
struct dp_io_data *io_data;
|
||||||
|
u32 reg;
|
||||||
|
|
||||||
if (!panel) {
|
if (!panel) {
|
||||||
DP_ERR("invalid input\n");
|
DP_ERR("invalid input\n");
|
||||||
@@ -1428,12 +1429,13 @@ static void dp_catalog_panel_tpg_cfg(struct dp_catalog_panel *panel,
|
|||||||
if (!enable) {
|
if (!enable) {
|
||||||
dp_write(MMSS_DP_TPG_MAIN_CONTROL, 0x0);
|
dp_write(MMSS_DP_TPG_MAIN_CONTROL, 0x0);
|
||||||
dp_write(MMSS_DP_BIST_ENABLE, 0x0);
|
dp_write(MMSS_DP_BIST_ENABLE, 0x0);
|
||||||
dp_write(MMSS_DP_TIMING_ENGINE_EN, 0x0);
|
reg = dp_read(MMSS_DP_TIMING_ENGINE_EN);
|
||||||
|
reg &= ~0x1;
|
||||||
|
dp_write(MMSS_DP_TIMING_ENGINE_EN, reg);
|
||||||
wmb(); /* ensure Timing generator is turned off */
|
wmb(); /* ensure Timing generator is turned off */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dp_write(MMSS_DP_INTF_CONFIG, 0x0);
|
|
||||||
dp_write(MMSS_DP_INTF_HSYNC_CTL,
|
dp_write(MMSS_DP_INTF_HSYNC_CTL,
|
||||||
panel->hsync_ctl);
|
panel->hsync_ctl);
|
||||||
dp_write(MMSS_DP_INTF_VSYNC_PERIOD_F0,
|
dp_write(MMSS_DP_INTF_VSYNC_PERIOD_F0,
|
||||||
@@ -1459,7 +1461,9 @@ static void dp_catalog_panel_tpg_cfg(struct dp_catalog_panel *panel,
|
|||||||
dp_write(MMSS_DP_TPG_VIDEO_CONFIG, 0x5);
|
dp_write(MMSS_DP_TPG_VIDEO_CONFIG, 0x5);
|
||||||
wmb(); /* ensure TPG config is programmed */
|
wmb(); /* ensure TPG config is programmed */
|
||||||
dp_write(MMSS_DP_BIST_ENABLE, 0x1);
|
dp_write(MMSS_DP_BIST_ENABLE, 0x1);
|
||||||
dp_write(MMSS_DP_TIMING_ENGINE_EN, 0x1);
|
reg = dp_read(MMSS_DP_TIMING_ENGINE_EN);
|
||||||
|
reg |= 0x1;
|
||||||
|
dp_write(MMSS_DP_TIMING_ENGINE_EN, reg);
|
||||||
wmb(); /* ensure Timing generator is turned on */
|
wmb(); /* ensure Timing generator is turned on */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1956,7 +1956,7 @@ static void dp_panel_handle_sink_request(struct dp_panel *dp_panel)
|
|||||||
|
|
||||||
static void dp_panel_tpg_config(struct dp_panel *dp_panel, bool enable)
|
static void dp_panel_tpg_config(struct dp_panel *dp_panel, bool enable)
|
||||||
{
|
{
|
||||||
u32 hsync_start_x, hsync_end_x;
|
u32 hsync_start_x, hsync_end_x, hactive;
|
||||||
struct dp_catalog_panel *catalog;
|
struct dp_catalog_panel *catalog;
|
||||||
struct dp_panel_private *panel;
|
struct dp_panel_private *panel;
|
||||||
struct dp_panel_info *pinfo;
|
struct dp_panel_info *pinfo;
|
||||||
@@ -1985,9 +1985,13 @@ static void dp_panel_tpg_config(struct dp_panel *dp_panel, bool enable)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hactive = pinfo->h_active;
|
||||||
|
if (pinfo->widebus_en)
|
||||||
|
hactive >>= 1;
|
||||||
|
|
||||||
/* TPG config */
|
/* TPG config */
|
||||||
catalog->hsync_period = pinfo->h_sync_width + pinfo->h_back_porch +
|
catalog->hsync_period = pinfo->h_sync_width + pinfo->h_back_porch +
|
||||||
pinfo->h_active + pinfo->h_front_porch;
|
hactive + pinfo->h_front_porch;
|
||||||
catalog->vsync_period = pinfo->v_sync_width + pinfo->v_back_porch +
|
catalog->vsync_period = pinfo->v_sync_width + pinfo->v_back_porch +
|
||||||
pinfo->v_active + pinfo->v_front_porch;
|
pinfo->v_active + pinfo->v_front_porch;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user