[PATCH 1/2] drm/plane: Export drm_plane_check_pixel_format()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i915 will make use of this to fail early during framebuffer creation.

Suggested-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@xxxxxxxxx>
---
 drivers/gpu/drm/drm_plane.c |  1 +
 include/drm/drm_plane.h     | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 1fa98bd12003..e834788619d1 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -589,6 +589,7 @@ int drm_plane_check_pixel_format(struct drm_plane *plane,
 
 	return 0;
 }
+EXPORT_SYMBOL(drm_plane_check_pixel_format);
 
 static int __setplane_check(struct drm_plane *plane,
 			    struct drm_crtc *crtc,
diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
index 0a0834bef8bd..8637b5239eb3 100644
--- a/include/drm/drm_plane.h
+++ b/include/drm/drm_plane.h
@@ -763,6 +763,17 @@ static inline struct drm_plane *drm_plane_find(struct drm_device *dev,
 	return mo ? obj_to_plane(mo) : NULL;
 }
 
+/**
+ * drm_plane_check_pixel_format - check format and modifier support.
+ * @plane: plane to check support against.
+ * @format: pixel format to check support for.
+ * @modifier: format modifier to check support for.
+ *
+ * Returns 0 on success or negative error code on failure.
+ */
+int drm_plane_check_pixel_format(struct drm_plane *plane,
+				 u32 format, u64 modifier);
+
 /**
  * drm_for_each_plane_mask - iterate over planes specified by bitmask
  * @plane: the loop cursor
-- 
2.14.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux