aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/mxsfb/mxsfb_drv.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
index 68d79f5dc0d3..5199a1febc01 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
@@ -418,6 +418,26 @@ static int mxsfb_remove(struct platform_device *pdev)
418 return 0; 418 return 0;
419} 419}
420 420
421#ifdef CONFIG_PM_SLEEP
422static int mxsfb_suspend(struct device *dev)
423{
424 struct drm_device *drm = dev_get_drvdata(dev);
425
426 return drm_mode_config_helper_suspend(drm);
427}
428
429static int mxsfb_resume(struct device *dev)
430{
431 struct drm_device *drm = dev_get_drvdata(dev);
432
433 return drm_mode_config_helper_resume(drm);
434}
435#endif
436
437static const struct dev_pm_ops mxsfb_pm_ops = {
438 SET_SYSTEM_SLEEP_PM_OPS(mxsfb_suspend, mxsfb_resume)
439};
440
421static struct platform_driver mxsfb_platform_driver = { 441static struct platform_driver mxsfb_platform_driver = {
422 .probe = mxsfb_probe, 442 .probe = mxsfb_probe,
423 .remove = mxsfb_remove, 443 .remove = mxsfb_remove,
@@ -425,6 +445,7 @@ static struct platform_driver mxsfb_platform_driver = {
425 .driver = { 445 .driver = {
426 .name = "mxsfb", 446 .name = "mxsfb",
427 .of_match_table = mxsfb_dt_ids, 447 .of_match_table = mxsfb_dt_ids,
448 .pm = &mxsfb_pm_ops,
428 }, 449 },
429}; 450};
430 451