diff mbox

[7/7] drm/exynos: dsi: move DSIM_STATE_ENABLED set position

Message ID 1412144353-13114-8-git-send-email-yj44.cho@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

YoungJun Cho Oct. 1, 2014, 6:19 a.m. UTC
The command mode panel should draw image earlier than the display
on command execution to prevent showing garbage GRAM screen data.
So should set dsi->state as DSIM_STATE_ENABLED between calling
exynos_dsi_set_display_enable() and drm_panel_enable() to transmit
image data before executing display on command.
And moves the display on command execution routine from prepare()
to enable() in drm_panel_funcs also.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Inki Dae Nov. 14, 2014, 1:53 a.m. UTC | #1
On 2014? 10? 01? 15:19, YoungJun Cho wrote:
> The command mode panel should draw image earlier than the display
> on command execution to prevent showing garbage GRAM screen data.
> So should set dsi->state as DSIM_STATE_ENABLED between calling
> exynos_dsi_set_display_enable() and drm_panel_enable() to transmit
> image data before executing display on command.
> And moves the display on command execution routine from prepare()
> to enable() in drm_panel_funcs also.

Applied.

Thanks,
Inki Dae

> 
> Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
> Acked-by: Inki Dae <inki.dae@samsung.com>
> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index ded69df..f304a20 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -1366,16 +1366,17 @@ static int exynos_dsi_enable(struct exynos_dsi *dsi)
>  	exynos_dsi_set_display_mode(dsi);
>  	exynos_dsi_set_display_enable(dsi, true);
>  
> +	dsi->state |= DSIM_STATE_ENABLED;
> +
>  	ret = drm_panel_enable(dsi->panel);
>  	if (ret < 0) {
> +		dsi->state &= ~DSIM_STATE_ENABLED;
>  		exynos_dsi_set_display_enable(dsi, false);
>  		drm_panel_unprepare(dsi->panel);
>  		exynos_dsi_poweroff(dsi);
>  		return ret;
>  	}
>  
> -	dsi->state |= DSIM_STATE_ENABLED;
> -
>  	return 0;
>  }
>  
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index ded69df..f304a20 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1366,16 +1366,17 @@  static int exynos_dsi_enable(struct exynos_dsi *dsi)
 	exynos_dsi_set_display_mode(dsi);
 	exynos_dsi_set_display_enable(dsi, true);
 
+	dsi->state |= DSIM_STATE_ENABLED;
+
 	ret = drm_panel_enable(dsi->panel);
 	if (ret < 0) {
+		dsi->state &= ~DSIM_STATE_ENABLED;
 		exynos_dsi_set_display_enable(dsi, false);
 		drm_panel_unprepare(dsi->panel);
 		exynos_dsi_poweroff(dsi);
 		return ret;
 	}
 
-	dsi->state |= DSIM_STATE_ENABLED;
-
 	return 0;
 }