Skip to contentSkip to conversation

drm/plane: Clarify our expectations for src/dst rectangles

PATCH In review Maarten Lankhorst 2 participants 5 messages Oct 10, 2019

Subsystems (2)
lore
Share & tools
lore

Maarten Lankhorst

author maintainer
#0 lore raw

PATCH 1/1 drm/plane: Clarify our expectations for src/dst rectangles

The rectangles are usually clipped, but it can be useful to have them unclipped, for example for cursor planes.

---
 include/drm/drm_plane.h | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)
include/drm/drm_plane.h +20 -2
index cd5903ad33f7..94bbbf215100 100644
@@ -183,8 +183,26 @@ struct drm_plane_state {
 	 */
 	struct drm_property_blob *fb_damage_clips;
 
-	/** @src: clipped source coordinates of the plane (in 16.16) */
-	/** @dst: clipped destination coordinates of the plane */
+	/**
+	 * @src:
+	 *
+	 * source coordinates of the plane (in 16.16).
+	 *
+	 * When using drm_atomic_helper_check_plane_state(),
+	 * the coordinates are clipped, but the driver may choose
+	 * to use unclipped coordinates instead.
+	 *
+	 * This can be useful when using a hardcoded size in a cursor plane.
+	 */
+	/**
+	 * @dst:
+	 *
+	 * When using drm_atomic_helper_check_plane_state(),
+	 * the coordinates are clipped, but the driver may choose
+	 * to use unclipped coordinates instead.
+	 *
+	 * This can be useful when using a hardcoded size in a cursor plane.
+	 */
 	struct drm_rect src, dst;
 
 	/**
Signature · 6 lines
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 18 lines · Maarten Lankhorst

The rectangles are usually clipped, but it can be useful to have them unclipped, for example for cursor planes.

---
 include/drm/drm_plane.h | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)
include/drm/drm_plane.h +0 -2
index cd5903ad33f7..94bbbf215100 100644
@@ -183,8 +183,26 @@ struct drm_plane_state {
 	 */
 	struct drm_property_blob *fb_damage_clips;
 
-	/** @src: clipped source coordinates of the plane (in 16.16) */
-	/** @dst: clipped destination coordinates of the plane */

include/drm/drm_plane.h struct drm_plane_state { · line 195

Quoted 10 lines
include/drm/drm_plane.h +10 -0
+	/**
+	 * @src:
+	 *
+	 * source coordinates of the plane (in 16.16).
+	 *
+	 * When using drm_atomic_helper_check_plane_state(),
+	 * the coordinates are clipped, but the driver may choose
+	 * to use unclipped coordinates instead.
+	 *
+	 * This can be useful when using a hardcoded size in a cursor plane.

I would instead say something like "when the hardware performs the clipping automagically".

Quoted 20 lines
include/drm/drm_plane.h +10 -0
+	 */
+	/**
+	 * @dst:
+	 *
+	 * When using drm_atomic_helper_check_plane_state(),
+	 * the coordinates are clipped, but the driver may choose
+	 * to use unclipped coordinates instead.
+	 *
+	 * This can be useful when using a hardcoded size in a cursor plane.
+	 */
 	struct drm_rect src, dst;
 
 	/**
Signature · 6 lines
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#2 lore raw

Op 10-10-2019 om 14:36 schreef Ville Syrjälä:

Quoted 17 lines · Maarten Lankhorst
Quoted 16 lines

The rectangles are usually clipped, but it can be useful to have them unclipped, for example for cursor planes.

---
 include/drm/drm_plane.h | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)
include/drm/drm_plane.h +0 -0
index cd5903ad33f7..94bbbf215100 100644
@@ -183,8 +183,26 @@ struct drm_plane_state {
 	 */
 	struct drm_property_blob *fb_damage_clips;
 
Quoted 14 lines

include/drm/drm_plane.h struct drm_plane_state { · line 195

Quoted 12 lines
include/drm/drm_plane.h +10 -2
-	/** @src: clipped source coordinates of the plane (in 16.16) */
-	/** @dst: clipped destination coordinates of the plane */
+	/**
+	 * @src:
+	 *
+	 * source coordinates of the plane (in 16.16).
+	 *
+	 * When using drm_atomic_helper_check_plane_state(),
+	 * the coordinates are clipped, but the driver may choose
+	 * to use unclipped coordinates instead.
+	 *
+	 * This can be useful when using a hardcoded size in a cursor plane.

I would instead say something like "when the hardware performs the clipping automagically".

With that fixed, r-b?

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reviewed-by
#3 lore raw
Quoted 34 lines · Maarten Lankhorst

Op 10-10-2019 om 14:36 schreef Ville Syrjälä:

Quoted 17 lines · Maarten Lankhorst
Quoted 16 lines

The rectangles are usually clipped, but it can be useful to have them unclipped, for example for cursor planes.

---
 include/drm/drm_plane.h | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)
include/drm/drm_plane.h +0 -0
index cd5903ad33f7..94bbbf215100 100644
@@ -183,8 +183,26 @@ struct drm_plane_state {
 	 */
 	struct drm_property_blob *fb_damage_clips;
 
Quoted 14 lines

include/drm/drm_plane.h struct drm_plane_state { · line 195

Quoted 12 lines
include/drm/drm_plane.h +10 -2
-	/** @src: clipped source coordinates of the plane (in 16.16) */
-	/** @dst: clipped destination coordinates of the plane */
+	/**
+	 * @src:
+	 *
+	 * source coordinates of the plane (in 16.16).
+	 *
+	 * When using drm_atomic_helper_check_plane_state(),
+	 * the coordinates are clipped, but the driver may choose
+	 * to use unclipped coordinates instead.
+	 *
+	 * This can be useful when using a hardcoded size in a cursor plane.

I would instead say something like "when the hardware performs the clipping automagically".

Quoted 1 line

With that fixed, r-b?

Aye

Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#4 lore raw

Op 10-10-2019 om 15:07 schreef Ville Syrjälä:

Quoted 34 lines · Maarten Lankhorst
Quoted 33 lines

Op 10-10-2019 om 14:36 schreef Ville Syrjälä:

Quoted 31 lines · Maarten Lankhorst
Quoted 18 lines

The rectangles are usually clipped, but it can be useful to have them unclipped, for example for cursor planes.

---
 include/drm/drm_plane.h | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)
include/drm/drm_plane.h +0 -2
index cd5903ad33f7..94bbbf215100 100644
@@ -183,8 +183,26 @@ struct drm_plane_state {
 	 */
 	struct drm_property_blob *fb_damage_clips;
 
-	/** @src: clipped source coordinates of the plane (in 16.16) */
-	/** @dst: clipped destination coordinates of the plane */

include/drm/drm_plane.h struct drm_plane_state { · line 195

Quoted 10 lines
include/drm/drm_plane.h +10 -0
+	/**
+	 * @src:
+	 *
+	 * source coordinates of the plane (in 16.16).
+	 *
+	 * When using drm_atomic_helper_check_plane_state(),
+	 * the coordinates are clipped, but the driver may choose
+	 * to use unclipped coordinates instead.
+	 *
+	 * This can be useful when using a hardcoded size in a cursor plane.

I would instead say something like "when the hardware performs the clipping automagically".

Quoted 5 lines
Quoted 1 line

With that fixed, r-b?

Aye

Noticed I dropped the explanation for dst when checking docbook output, fixed and pushed. :)

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel