aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_fb_cma_helper.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-07-02 16:21:35 +1000
committerDave Airlie <airlied@redhat.com>2016-07-02 16:21:35 +1000
commitdac2c48ca5ac9bb2d6339aaa733c60d5b801ee86 (patch)
tree3b288b03448dc0e514de3101e9d9c4498947f084 /drivers/gpu/drm/drm_fb_cma_helper.c
parentBack-merge tag 'v4.7-rc5' into drm-next (diff)
parentdrm/fsl-dcu: disable vblank events on CRTC disable (diff)
downloadlinux-dev-dac2c48ca5ac9bb2d6339aaa733c60d5b801ee86.tar.xz
linux-dev-dac2c48ca5ac9bb2d6339aaa733c60d5b801ee86.zip
Merge branch 'for-next' of http://git.agner.ch/git/linux-drm-fsl-dcu into drm-next
The patchset contains a new helper in drm_fb_cma_helper.c for suspend/ resume when using cma backed framebuffers. * 'for-next' of http://git.agner.ch/git/linux-drm-fsl-dcu: drm/fsl-dcu: disable vblank events on CRTC disable drm/fsl-dcu: implement suspend/resume using atomic helpers drm/fsl-dcu: use clk helpers drm/fsl-dcu: move layer initialization to plane file drm/fsl-dcu: store layer registers in soc_data drm/fb_cma_helper: add suspend helper
Diffstat (limited to 'drivers/gpu/drm/drm_fb_cma_helper.c')
-rw-r--r--drivers/gpu/drm/drm_fb_cma_helper.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c
index c0b0c718994a..1fd6eac1400c 100644
--- a/drivers/gpu/drm/drm_fb_cma_helper.c
+++ b/drivers/gpu/drm/drm_fb_cma_helper.c
@@ -596,3 +596,18 @@ void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma)
drm_fb_helper_hotplug_event(&fbdev_cma->fb_helper);
}
EXPORT_SYMBOL_GPL(drm_fbdev_cma_hotplug_event);
+
+/**
+ * drm_fbdev_cma_set_suspend - wrapper around drm_fb_helper_set_suspend
+ * @fbdev_cma: The drm_fbdev_cma struct, may be NULL
+ * @state: desired state, zero to resume, non-zero to suspend
+ *
+ * Calls drm_fb_helper_set_suspend, which is a wrapper around
+ * fb_set_suspend implemented by fbdev core.
+ */
+void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, int state)
+{
+ if (fbdev_cma)
+ drm_fb_helper_set_suspend(&fbdev_cma->fb_helper, state);
+}
+EXPORT_SYMBOL(drm_fbdev_cma_set_suspend);