[Intel-gfx] [PATCH 2/9] drm: Store clipped src/dst coordinatee in drm_plane_state

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Tue Jul 26 16:06:57 UTC 2016


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Pretty much all driver will have need for the clipped plane
coordinates, so let's stuff then into drm_plane_state.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 include/drm/drm_crtc.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 3edeaf88ebc0..00a1868940b8 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -35,6 +35,7 @@
 #include <uapi/drm/drm_mode.h>
 #include <uapi/drm/drm_fourcc.h>
 #include <drm/drm_modeset_lock.h>
+#include <drm/drm_rect.h>
 
 struct drm_device;
 struct drm_mode_set;
@@ -1409,6 +1410,9 @@ struct drm_connector {
  * @src_w: width of visible portion of plane (in 16.16)
  * @src_h: height of visible portion of plane (in 16.16)
  * @rotation: rotation of the plane
+ * @src: clipped source coordinates of the plane (in 16.16)
+ * @dst: clipped destination coordinates of the plane
+ * @visible: visibility of the plane
  * @state: backpointer to global drm_atomic_state
  */
 struct drm_plane_state {
@@ -1429,6 +1433,15 @@ struct drm_plane_state {
 	/* Plane rotation */
 	unsigned int rotation;
 
+	/* Clipped coordinates */
+	struct drm_rect src, dst;
+
+	/*
+	 * Is the plane actually visible? Can be false even
+	 * if fb!=NULL and crtc!=NULL, due to clipping.
+	 */
+	bool visible;
+
 	struct drm_atomic_state *state;
 };
 
-- 
2.7.4



More information about the Intel-gfx mailing list