diff mbox

drm/exynos: fimd: modify condition in fimd resume

Message ID 1356608413-6295-1-git-send-email-prathyush.k@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Prathyush K Dec. 27, 2012, 11:40 a.m. UTC
If fimd is runtime suspended (by DPMS OFF), fimd_suspend does not
call fimd_activate(false) and just returns. Similarily the check in
fimd_resume should not resume if previously runtime_suspended.
Instead the existing check does the opposite. So if fimd was not
runtime suspended, suspend will turn off fimd but resume will not turn
it on.  This patch fixes this issue by reversing the condition.

Signed-off-by: Prathyush K <prathyush.k@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Prathyush K Jan. 4, 2013, 10:32 a.m. UTC | #1
Hi,

Please review this patch.

Regards,
Prathyush


On Thu, Dec 27, 2012 at 5:10 PM, Prathyush K <prathyush.k@samsung.com>wrote:

> If fimd is runtime suspended (by DPMS OFF), fimd_suspend does not
> call fimd_activate(false) and just returns. Similarily the check in
> fimd_resume should not resume if previously runtime_suspended.
> Instead the existing check does the opposite. So if fimd was not
> runtime suspended, suspend will turn off fimd but resume will not turn
> it on.  This patch fixes this issue by reversing the condition.
>
> Signed-off-by: Prathyush K <prathyush.k@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> index bf0d9ba..9accd466 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> @@ -1046,7 +1046,7 @@ static int fimd_resume(struct device *dev)
>          * of pm runtime would still be 1 so in this case, fimd driver
>          * should be on directly not drawing on pm runtime interface.
>          */
> -       if (pm_runtime_suspended(dev)) {
> +       if (!pm_runtime_suspended(dev)) {
>                 int ret;
>
>                 ret = fimd_activate(ctx, true);
> --
> 1.8.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
대인기/Tizen Platform Lab(SR)/삼성전자 Jan. 7, 2013, 4:46 a.m. UTC | #2
2012/12/27 Prathyush K <prathyush.k@samsung.com>:
> If fimd is runtime suspended (by DPMS OFF), fimd_suspend does not
> call fimd_activate(false) and just returns. Similarily the check in

Right and that is our intension. pm suspend should be ignored because
fimd already became off.
And if we want for fimd to be pm suspended after pm runtime suspend
then we should register a callback that resumes (e.g., runtime-pm-get)
the device to pm notifier so that the PM_SLEEP suspends the device
forcibly again. And that seems quite inefficient' you are doing the
same task duplicated.

> fimd_resume should not resume if previously runtime_suspended.
> Instead the existing check does the opposite. So if fimd was not
> runtime suspended, suspend will turn off fimd but resume will not turn

Right, if the fimd wasn't turned off by runtime pm suspend and enerted
pm suspend then the fimd is turned off by pm suspend and then should
be turned on by pm resume again. Actully we have a same patch
internally but we didn't post it. Will apply it.

Thank,
Inki Dae


> it on.  This patch fixes this issue by reversing the condition.
>
> Signed-off-by: Prathyush K <prathyush.k@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> index bf0d9ba..9accd466 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> @@ -1046,7 +1046,7 @@ static int fimd_resume(struct device *dev)
>          * of pm runtime would still be 1 so in this case, fimd driver
>          * should be on directly not drawing on pm runtime interface.
>          */
> -       if (pm_runtime_suspended(dev)) {
> +       if (!pm_runtime_suspended(dev)) {
>                 int ret;
>
>                 ret = fimd_activate(ctx, true);
> --
> 1.8.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index bf0d9ba..9accd466 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -1046,7 +1046,7 @@  static int fimd_resume(struct device *dev)
 	 * of pm runtime would still be 1 so in this case, fimd driver
 	 * should be on directly not drawing on pm runtime interface.
 	 */
-	if (pm_runtime_suspended(dev)) {
+	if (!pm_runtime_suspended(dev)) {
 		int ret;
 
 		ret = fimd_activate(ctx, true);