diff options
author | Archit Taneja <architt@codeaurora.org> | 2015-07-15 11:21:13 +0530 |
---|---|---|
committer | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2015-07-27 11:05:47 +0200 |
commit | f8a46972ba59f51cbda34f4e9eee6b4d1fbe2731 (patch) | |
tree | d7516d22186c93cfc984fbebd2b31759c084f4d8 | |
parent | 7b59de360b2a092bf3afe068df52ee17e848fa5a (diff) |
drm/i2c: adv7511: Fix assignment of curr_modeubuntu-qcom-dragonboard410c-15.07
'curr_mode' in adv7511 struct is a pointer that's assigned to the
'adj_mode' pointer in mode_set. 'adj_mode' mode is later removed by
drm framework, causing 'curr_mode' pointing to an invalid mode.
Copy 'adj_mode' to 'curr_mode' in adv7511 to make sure we have the
correct 'curr_mode' with us all the time.
This fixes the issue of display not coming up after a blank/unblank
sequence.
Signed-off-by: Archit Taneja <architt@codeaurora.org>
-rw-r--r-- | drivers/gpu/drm/i2c/adv7511.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/i2c/adv7511.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i2c/adv7511.c b/drivers/gpu/drm/i2c/adv7511.c index d035d6b27e3a..8b07a44aa548 100644 --- a/drivers/gpu/drm/i2c/adv7511.c +++ b/drivers/gpu/drm/i2c/adv7511.c @@ -369,7 +369,7 @@ static void adv7511_set_link_config(struct adv7511 *adv7511, static void adv7511_dsi_config_tgen(struct adv7511 *adv7511) { - struct drm_display_mode *mode = adv7511->curr_mode; + struct drm_display_mode *mode = &adv7511->curr_mode; unsigned int hsw, hfp, hbp, vsw, vfp, vbp; hsw = mode->hsync_end - mode->hsync_start; @@ -837,7 +837,7 @@ static void adv7511_mode_set(struct adv7511 *adv7511, } } - adv7511->curr_mode = adj_mode; + drm_mode_copy(&adv7511->curr_mode, adj_mode); /* * TODO Test first order 4:2:2 to 4:4:4 up conversion method, which is * supposed to give better results. diff --git a/drivers/gpu/drm/i2c/adv7511.h b/drivers/gpu/drm/i2c/adv7511.h index 608fc2152115..90b4e06af18e 100644 --- a/drivers/gpu/drm/i2c/adv7511.h +++ b/drivers/gpu/drm/i2c/adv7511.h @@ -257,7 +257,7 @@ struct adv7511 { enum drm_connector_status status; bool powered; - struct drm_display_mode *curr_mode; + struct drm_display_mode curr_mode; unsigned int f_tmds; unsigned int f_audio; |