diff mbox

[07/15] drm/exynos: dsi: Add support for panel prepare and unprepare routines

Message ID 1406828534-10072-8-git-send-email-ajaykumar.rs@samsung.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Ajay Kumar July 31, 2014, 5:42 p.m. UTC
Modify exynos_dsi driver to support the new panel calls:
prepare and unprepare.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_dsi.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

Comments

Thierry Reding Aug. 1, 2014, 9:05 a.m. UTC | #1
On Thu, Jul 31, 2014 at 11:12:06PM +0530, Ajay Kumar wrote:
> Modify exynos_dsi driver to support the new panel calls:
> prepare and unprepare.
> 
> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c |   12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)

And this one as well.

Thierry
Inki Dae Aug. 3, 2014, 7:58 a.m. UTC | #2
2014-08-01 18:05 GMT+09:00 Thierry Reding <thierry.reding@gmail.com>:
> On Thu, Jul 31, 2014 at 11:12:06PM +0530, Ajay Kumar wrote:
>> Modify exynos_dsi driver to support the new panel calls:
>> prepare and unprepare.
>>
>> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
>> ---
>>  drivers/gpu/drm/exynos/exynos_drm_dsi.c |   12 ++++++++++--
>>  1 file changed, 10 insertions(+), 2 deletions(-)
>
> And this one as well.

Acked-by: Inki Dae <inki.dae@samsung.com>

Thanks,
Inki Dae

>
> Thierry
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Andrzej Hajda Aug. 5, 2014, 10:03 a.m. UTC | #3
Hi Ajay,


On 07/31/2014 07:42 PM, Ajay Kumar wrote:
> Modify exynos_dsi driver to support the new panel calls:
> prepare and unprepare.
> 
> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c |   12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index dc7c80b..4834932 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -1351,7 +1351,7 @@ static int exynos_dsi_enable(struct exynos_dsi *dsi)
>  	if (ret < 0)
>  		return ret;
>  
> -	ret = drm_panel_enable(dsi->panel);
> +	ret = drm_panel_prepare(dsi->panel);
>  	if (ret < 0) {
>  		exynos_dsi_poweroff(dsi);
>  		return ret;
> @@ -1360,6 +1360,13 @@ static int exynos_dsi_enable(struct exynos_dsi *dsi)
>  	exynos_dsi_set_display_mode(dsi);
>  	exynos_dsi_set_display_enable(dsi, true);
>  
> +	ret = drm_panel_enable(dsi->panel);
> +	if (ret < 0) {
> +		exynos_dsi_set_display_enable(dsi, false);

I guess drm_panel_unprepare(dsi->panel) should be here.

Regards
Andrzej

> +		exynos_dsi_poweroff(dsi);
> +		return ret;
> +	}
> +
>  	dsi->state |= DSIM_STATE_ENABLED;
>  
>  	return 0;
> @@ -1370,8 +1377,9 @@ static void exynos_dsi_disable(struct exynos_dsi *dsi)
>  	if (!(dsi->state & DSIM_STATE_ENABLED))
>  		return;
>  
> -	exynos_dsi_set_display_enable(dsi, false);
>  	drm_panel_disable(dsi->panel);
> +	exynos_dsi_set_display_enable(dsi, false);
> +	drm_panel_unprepare(dsi->panel);
>  	exynos_dsi_poweroff(dsi);
>  
>  	dsi->state &= ~DSIM_STATE_ENABLED;
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ajay kumar Aug. 5, 2014, 4:11 p.m. UTC | #4
Hi Andreas,


On Tue, Aug 5, 2014 at 3:33 PM, Andrzej Hajda <a.hajda@samsung.com> wrote:
> Hi Ajay,
>
>
> On 07/31/2014 07:42 PM, Ajay Kumar wrote:
>> Modify exynos_dsi driver to support the new panel calls:
>> prepare and unprepare.
>>
>> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
>> ---
>>  drivers/gpu/drm/exynos/exynos_drm_dsi.c |   12 ++++++++++--
>>  1 file changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
>> index dc7c80b..4834932 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
>> @@ -1351,7 +1351,7 @@ static int exynos_dsi_enable(struct exynos_dsi *dsi)
>>       if (ret < 0)
>>               return ret;
>>
>> -     ret = drm_panel_enable(dsi->panel);
>> +     ret = drm_panel_prepare(dsi->panel);
>>       if (ret < 0) {
>>               exynos_dsi_poweroff(dsi);
>>               return ret;
>> @@ -1360,6 +1360,13 @@ static int exynos_dsi_enable(struct exynos_dsi *dsi)
>>       exynos_dsi_set_display_mode(dsi);
>>       exynos_dsi_set_display_enable(dsi, true);
>>
>> +     ret = drm_panel_enable(dsi->panel);
>> +     if (ret < 0) {
>> +             exynos_dsi_set_display_enable(dsi, false);
>
> I guess drm_panel_unprepare(dsi->panel) should be here.
Thanks for pointing it out. I am not sure if Thierry has already
picked this up since Inki has given Acked by.
In that case, you can send it as a fix separately :)

Ajay
>> +             exynos_dsi_poweroff(dsi);
>> +             return ret;
>> +     }
>> +
>>       dsi->state |= DSIM_STATE_ENABLED;
>>
>>       return 0;
>> @@ -1370,8 +1377,9 @@ static void exynos_dsi_disable(struct exynos_dsi *dsi)
>>       if (!(dsi->state & DSIM_STATE_ENABLED))
>>               return;
>>
>> -     exynos_dsi_set_display_enable(dsi, false);
>>       drm_panel_disable(dsi->panel);
>> +     exynos_dsi_set_display_enable(dsi, false);
>> +     drm_panel_unprepare(dsi->panel);
>>       exynos_dsi_poweroff(dsi);
>>
>>       dsi->state &= ~DSIM_STATE_ENABLED;
>>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index dc7c80b..4834932 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1351,7 +1351,7 @@  static int exynos_dsi_enable(struct exynos_dsi *dsi)
 	if (ret < 0)
 		return ret;
 
-	ret = drm_panel_enable(dsi->panel);
+	ret = drm_panel_prepare(dsi->panel);
 	if (ret < 0) {
 		exynos_dsi_poweroff(dsi);
 		return ret;
@@ -1360,6 +1360,13 @@  static int exynos_dsi_enable(struct exynos_dsi *dsi)
 	exynos_dsi_set_display_mode(dsi);
 	exynos_dsi_set_display_enable(dsi, true);
 
+	ret = drm_panel_enable(dsi->panel);
+	if (ret < 0) {
+		exynos_dsi_set_display_enable(dsi, false);
+		exynos_dsi_poweroff(dsi);
+		return ret;
+	}
+
 	dsi->state |= DSIM_STATE_ENABLED;
 
 	return 0;
@@ -1370,8 +1377,9 @@  static void exynos_dsi_disable(struct exynos_dsi *dsi)
 	if (!(dsi->state & DSIM_STATE_ENABLED))
 		return;
 
-	exynos_dsi_set_display_enable(dsi, false);
 	drm_panel_disable(dsi->panel);
+	exynos_dsi_set_display_enable(dsi, false);
+	drm_panel_unprepare(dsi->panel);
 	exynos_dsi_poweroff(dsi);
 
 	dsi->state &= ~DSIM_STATE_ENABLED;