Skip to contentSkip to conversation

drm: Consistently use struct drm_mode_rect for FB_DAMAGE_CLIPS

PATCH In review Thomas Zimmermann 2 participants 2 messages Sep 23, 2024

Subsystems (3)
lore
Share & tools
lore

Thomas Zimmermann

author maintainer
#0 lore raw

PATCH 1/1 drm: Consistently use struct drm_mode_rect for FB_DAMAGE_CLIPS

FB_DAMAGE_CLIPS is a plane property for damage handling. Its UAPI should only use UAPI types. Hence replace struct drm_rect with struct drm_mode_rect in drm_atomic_plane_set_property(). Both types are identical in practice, so there's no change in behavior.

Fixes d3b21767821e ("drm: Add a new plane property to send damage during plane update")
Cc Lukasz Spintzyk <[email protected]>
Cc Deepak Rawat <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Thomas Hellstrom <[email protected]>
Cc David Airlie <[email protected]>
Cc Simona Vetter <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc <[email protected]> # v5.0+
---
 drivers/gpu/drm/drm_atomic_uapi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_atomic_uapi.c +1 -1
index 7936c2023955..370dc676e3aa 100644
@@ -543,7 +543,7 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
 					&state->fb_damage_clips,
 					val,
 					-1,
-					sizeof(struct drm_rect),
+					sizeof(struct drm_mode_rect),
 					&replaced);
 		return ret;
 	} else if (property == plane->scaling_filter_property) {
Signature · 1 line
2.46.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 20 lines · Thomas Zimmermann

FB_DAMAGE_CLIPS is a plane property for damage handling. Its UAPI should only use UAPI types. Hence replace struct drm_rect with struct drm_mode_rect in drm_atomic_plane_set_property(). Both types are identical in practice, so there's no change in behavior.

Fixes d3b21767821e ("drm: Add a new plane property to send damage during plane update")
Cc Lukasz Spintzyk <[email protected]>
Cc Deepak Rawat <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Thomas Hellstrom <[email protected]>
Cc David Airlie <[email protected]>
Cc Simona Vetter <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc <[email protected]> # v5.0+
Quoted 4 lines
---
 drivers/gpu/drm/drm_atomic_uapi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 2 lines
With best wishes
Dmitry