lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1531472085-25174-1-git-send-email-Anson.Huang@nxp.com>
Date:   Fri, 13 Jul 2018 16:54:45 +0800
From:   Anson Huang <Anson.Huang@....com>
To:     marex@...x.de, airlied@...ux.ie, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Cc:     Linux-imx@....com
Subject: [PATCH] drm: mxsfb: fix runtime PM handling

As display power domain is combined with lcdif node
on some i.MX platforms like i.MX6SL, when lcdif driver
is enabled, the mxsfb_load is called to enable runtime
pm, and a pair of pm_runtime_get_sync and
pm_runtime_put_sync are also called, that will cause
generic power domain driver to disable lcdif power domain
and lcdif is no longer working, the lcdif power
should ONLY be turned off when display is disabled,
so move the pm_runtime_put_sync to mxsfb_unload
and remove the pm_runtime_get_sync in mxsfb_unload
as well, in this way, when display is enabled, the
lcdif power will be always ON until the display
is disabled.

Signed-off-by: Anson Huang <Anson.Huang@....com>
---
 drivers/gpu/drm/mxsfb/mxsfb_drv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
index ffe5137..1ba179b 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
@@ -235,7 +235,6 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags)
 
 	pm_runtime_get_sync(drm->dev);
 	ret = drm_irq_install(drm, platform_get_irq(pdev, 0));
-	pm_runtime_put_sync(drm->dev);
 
 	if (ret < 0) {
 		dev_err(drm->dev, "Failed to install IRQ handler\n");
@@ -264,6 +263,7 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags)
 err_irq:
 	drm_panel_detach(mxsfb->panel);
 err_vblank:
+	pm_runtime_put_sync(drm->dev);
 	pm_runtime_disable(drm->dev);
 
 	return ret;
@@ -279,7 +279,6 @@ static void mxsfb_unload(struct drm_device *drm)
 	drm_kms_helper_poll_fini(drm);
 	drm_mode_config_cleanup(drm);
 
-	pm_runtime_get_sync(drm->dev);
 	drm_irq_uninstall(drm);
 	pm_runtime_put_sync(drm->dev);
 
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ