Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/panel: simple - Disable panel on shutdown

When a device is shut down, disable the panel to make sure the display
backlight doesn't stay lit.

Signed-off-by: Thierry Reding <treding@nvidia.com>

+19
+19
drivers/gpu/drm/panel/panel-simple.c
··· 262 262 return 0; 263 263 } 264 264 265 + static void panel_simple_shutdown(struct device *dev) 266 + { 267 + struct panel_simple *panel = dev_get_drvdata(dev); 268 + 269 + panel_simple_disable(&panel->base); 270 + } 271 + 265 272 static const struct drm_display_mode auo_b101aw03_mode = { 266 273 .clock = 51450, 267 274 .hdisplay = 1024, ··· 474 467 return panel_simple_remove(&pdev->dev); 475 468 } 476 469 470 + static void panel_simple_platform_shutdown(struct platform_device *pdev) 471 + { 472 + panel_simple_shutdown(&pdev->dev); 473 + } 474 + 477 475 static struct platform_driver panel_simple_platform_driver = { 478 476 .driver = { 479 477 .name = "panel-simple", ··· 487 475 }, 488 476 .probe = panel_simple_platform_probe, 489 477 .remove = panel_simple_platform_remove, 478 + .shutdown = panel_simple_platform_shutdown, 490 479 }; 491 480 492 481 struct panel_desc_dsi { ··· 629 616 return panel_simple_remove(&dsi->dev); 630 617 } 631 618 619 + static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi) 620 + { 621 + panel_simple_shutdown(&dsi->dev); 622 + } 623 + 632 624 static struct mipi_dsi_driver panel_simple_dsi_driver = { 633 625 .driver = { 634 626 .name = "panel-simple-dsi", ··· 642 624 }, 643 625 .probe = panel_simple_dsi_probe, 644 626 .remove = panel_simple_dsi_remove, 627 + .shutdown = panel_simple_dsi_shutdown, 645 628 }; 646 629 647 630 static int __init panel_simple_init(void)