summaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javierm@redhat.com>2022-10-11 18:51:36 +0200
committerJavier Martinez Canillas <javierm@redhat.com>2022-10-13 09:17:05 +0200
commit7fed7fa340691ef4b78f5f3aebde44715128d868 (patch)
tree8eb72a4371ad60119a5414fef1babf485efecb3f /include/drm
parent6c3d9cf400dc085de0bde33dde73d47c71b7b2df (diff)
downloadlinux-7fed7fa340691ef4b78f5f3aebde44715128d868.tar.bz2
drm/crtc-helper: Add a drm_crtc_helper_atomic_check() helper
Provides a default CRTC state check handler for CRTCs that only have one primary plane attached. There are some drivers that duplicate this logic in their helpers, such as simpledrm and ssd130x. Factor out this common code into a CRTC helper and make drivers use it. Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20221011165136.469750-5-javierm@redhat.com
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_crtc_helper.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index a6d520d5b6ca..1840db247f69 100644
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -50,6 +50,8 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
struct drm_display_mode *mode,
int x, int y,
struct drm_framebuffer *old_fb);
+int drm_crtc_helper_atomic_check(struct drm_crtc *crtc,
+ struct drm_atomic_state *state);
bool drm_helper_crtc_in_use(struct drm_crtc *crtc);
bool drm_helper_encoder_in_use(struct drm_encoder *encoder);