|
@@ -22,6 +22,7 @@
|
|
|
#include <drm/drm_gem.h>
|
|
|
#include <drm/drm_gem_framebuffer_helper.h>
|
|
|
#include <drm/drm_modeset_helper.h>
|
|
|
+#include <drm/drm_simple_kms_helper.h>
|
|
|
|
|
|
/**
|
|
|
* DOC: overview
|
|
@@ -265,6 +266,24 @@ int drm_gem_fb_prepare_fb(struct drm_plane *plane,
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(drm_gem_fb_prepare_fb);
|
|
|
|
|
|
+/**
|
|
|
+ * drm_gem_fb_simple_display_pipe_prepare_fb - prepare_fb helper for
|
|
|
+ * &drm_simple_display_pipe
|
|
|
+ * @pipe: Simple display pipe
|
|
|
+ * @plane_state: Plane state
|
|
|
+ *
|
|
|
+ * This function uses drm_gem_fb_prepare_fb() to check if the plane FB has a
|
|
|
+ * &dma_buf attached, extracts the exclusive fence and attaches it to plane
|
|
|
+ * state for the atomic helper to wait on. Drivers can use this as their
|
|
|
+ * &drm_simple_display_pipe_funcs.prepare_fb callback.
|
|
|
+ */
|
|
|
+int drm_gem_fb_simple_display_pipe_prepare_fb(struct drm_simple_display_pipe *pipe,
|
|
|
+ struct drm_plane_state *plane_state)
|
|
|
+{
|
|
|
+ return drm_gem_fb_prepare_fb(&pipe->plane, plane_state);
|
|
|
+}
|
|
|
+EXPORT_SYMBOL(drm_gem_fb_simple_display_pipe_prepare_fb);
|
|
|
+
|
|
|
/**
|
|
|
* drm_gem_fbdev_fb_create - Create a GEM backed &drm_framebuffer for fbdev
|
|
|
* emulation
|