]> git.hungrycats.org Git - linux/commitdiff
drm/panel: simple: Add missing panel_simple_unprepare() calls
authorJonathan Liu <net147@gmail.com>
Mon, 7 Aug 2017 11:55:45 +0000 (21:55 +1000)
committerSasha Levin <alexander.levin@verizon.com>
Fri, 8 Dec 2017 23:01:16 +0000 (18:01 -0500)
[ Upstream commit f3621a8eb59a913612c8e6e37d81f16b649f8b6c ]

During panel removal or system shutdown panel_simple_disable() is called
which disables the panel backlight but the panel is still powered due to
missing calls to panel_simple_unprepare().

Fixes: d02fd93e2cd8 ("drm/panel: simple - Disable panel on shutdown")
Cc: stable@vger.kernel.org # v3.16+
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170807115545.27747-1-net147@gmail.com
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
drivers/gpu/drm/panel/panel-simple.c

index 30904a9b2a4cc993d770ccb8c1a27d76296c4961..91848659b38e496a3e1ec247c62697323514cdfb 100644 (file)
@@ -352,6 +352,7 @@ static int panel_simple_remove(struct device *dev)
        drm_panel_remove(&panel->base);
 
        panel_simple_disable(&panel->base);
+       panel_simple_unprepare(&panel->base);
 
        if (panel->ddc)
                put_device(&panel->ddc->dev);
@@ -367,6 +368,7 @@ static void panel_simple_shutdown(struct device *dev)
        struct panel_simple *panel = dev_get_drvdata(dev);
 
        panel_simple_disable(&panel->base);
+       panel_simple_unprepare(&panel->base);
 }
 
 static const struct drm_display_mode ampire_am800480r3tmqwa1h_mode = {