From: Rahul Sharma Subject: [PATCH] drm/exynos: modify condition in mixer and hdmi resume Date: Thu, 14 Feb 2013 06:44:36 -0500 Message-ID: <1360842276-7185-1-git-send-email-rahul.sharma@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by gabe.freedesktop.org (Postfix) with ESMTP id 67762E5C0E for ; Thu, 14 Feb 2013 03:24:42 -0800 (PST) Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MI7000PBJP1GHX0@mailout2.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 14 Feb 2013 20:24:40 +0900 (KST) Received: from chrome-ubuntu.sisodomain.com ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MI700KOXJN7IT80@mmp2.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 14 Feb 2013 20:24:40 +0900 (KST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org Cc: joshi@samsung.com, prathyush.k@samsung.com List-Id: dri-devel@lists.freedesktop.org From: Prathyush K If mixer is runtime suspended (by DPMS OFF), mixer_suspend does not call mixer_poweroff and just returns. Similarily the mixer_resume should not resume the mixer if mixer is runtime_suspended. It should be done through DPMS ON. The existing check is stopping the resume. This issue is fixed by reversing the condiftion. It also holds good for hdmi driver. Inline with http://lists.freedesktop.org/archives/dri-devel/2013-January/032920.html. Signed-off-by: Prathyush K Signed-off-by: Rahul Sharma --- It is based on exynos-drm-next-todo branch at git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- drivers/gpu/drm/exynos/exynos_mixer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 9e3c2ad..273a6ea 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -2386,7 +2386,7 @@ static int hdmi_resume(struct device *dev) enable_irq(hdata->external_irq); enable_irq(hdata->internal_irq); - if (!pm_runtime_suspended(dev)) { + if (pm_runtime_suspended(dev)) { DRM_DEBUG_KMS("%s : Already resumed\n", __func__); return 0; } diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 5139a43..6404f7e4 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -1265,7 +1265,7 @@ static int mixer_resume(struct device *dev) DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); - if (!pm_runtime_suspended(dev)) { + if (pm_runtime_suspended(dev)) { DRM_DEBUG_KMS("%s : Already resumed\n", __func__); return 0; } -- 1.8.0