[PATCH 2/4] drm/vkms: Add atomic helpers functions
Rodrigo Siqueira
rodrigosiqueiramelo at gmail.com
Wed Jun 20 17:43:38 UTC 2018
This patch adds the struct drm_crtc_helper_funcs with simple
atomic_check and atomic_enable functions.
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo at gmail.com>
---
drivers/gpu/drm/vkms/vkms_crtc.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c
index bf76cd39ece7..84cc05506b09 100644
--- a/drivers/gpu/drm/vkms/vkms_crtc.c
+++ b/drivers/gpu/drm/vkms/vkms_crtc.c
@@ -19,6 +19,22 @@ static const struct drm_crtc_funcs vkms_crtc_funcs = {
.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
};
+static int vkms_crtc_atomic_check(struct drm_crtc *crtc,
+ struct drm_crtc_state *state)
+{
+ return 0;
+}
+
+static void vkms_crtc_atomic_enable(struct drm_crtc *crtc,
+ struct drm_crtc_state *old_state)
+{
+}
+
+static const struct drm_crtc_helper_funcs vkms_crtc_helper_funcs = {
+ .atomic_check = vkms_crtc_atomic_check,
+ .atomic_enable = vkms_crtc_atomic_enable,
+};
+
int vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
struct drm_plane *primary, struct drm_plane *cursor)
{
@@ -31,5 +47,7 @@ int vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
return ret;
}
+ drm_crtc_helper_add(crtc, &vkms_crtc_helper_funcs);
+
return ret;
}
--
2.17.1
More information about the dri-devel
mailing list