diff options
| author | Chandan Uddaraju <chandanu@codeaurora.org> | 2016-09-22 15:49:21 -0700 |
|---|---|---|
| committer | Chandan Uddaraju <chandanu@codeaurora.org> | 2016-10-07 10:39:16 -0700 |
| commit | a1b989e015ae011f0117a0ecd237337b48813bed (patch) | |
| tree | d05f1c90fd07a278125cad3542c47646b4da1c29 | |
| parent | 2f59726ce78d6477105dba14d131861048ab7e8f (diff) | |
mdss: DisplayPort: add support for color depth and fix workqueue delay
Add changes to have default settings for color depth and
output format in DP controller.
Currently, the workqueue used to handle different events
in controller driver has very high delay in handling events.
Fix this.
Change-Id: I30fc7cb3c57844244ff88167a9b17b32a2fd3a12
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_dp.c | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dp.c b/drivers/video/fbdev/msm/mdss_dp.c index b2a798a5fb13..68b20f440f5c 100644 --- a/drivers/video/fbdev/msm/mdss_dp.c +++ b/drivers/video/fbdev/msm/mdss_dp.c @@ -789,17 +789,34 @@ void mdss_dp_config_ctrl(struct mdss_dp_drv_pdata *dp) cap = &dp->dpcd; - data = dp->lane_cnt - 1; - data <<= 4; + data |= (2 << 13); /* Default-> LSCLK DIV: 1/4 LCLK */ + + /* Color Format */ + switch (dp->panel_data.panel_info.out_format) { + case MDP_Y_CBCR_H2V2: + data |= (1 << 11); /* YUV420 */ + break; + case MDP_Y_CBCR_H2V1: + data |= (2 << 11); /* YUV422 */ + break; + default: + data |= (0 << 11); /* RGB */ + break; + } + + /* Scrambler reset enable */ + if (cap->scrambler_reset) + data |= (1 << 10); + + if (dp->edid.color_depth != 6) + data |= 0x100; /* Default: 8 bits */ + + /* Num of Lanes */ + data |= ((dp->lane_cnt - 1) << 4); if (cap->enhanced_frame) data |= 0x40; - if (dp->edid.color_depth == 8) { - /* 0 == 6 bits, 1 == 8 bits */ - data |= 0x100; /* bit 8 */ - } - if (!timing->interlaced) /* progressive */ data |= 0x04; @@ -1825,8 +1842,7 @@ static void dp_send_events(struct mdss_dp_drv_pdata *dp, u32 events) { spin_lock(&dp->event_lock); dp->current_event = events; - queue_delayed_work(dp->workq, - &dp->dwork, HZ); + queue_delayed_work(dp->workq, &dp->dwork, HZ / 100); spin_unlock(&dp->event_lock); } |
