xf86drm: Add signed32 rectangle
Subsystems (2)
PATCH 1/1 xf86drm: Add signed32 rectangle
With drm subsystem using struct drm_rect to manage rectangular area this export it to user-space.
Currently used by drm_mode_atomic blob property FB_DAMAGE_CLIPS.
--- include/drm/drm_mode.h | 19 +++++++++++++++++++ xf86drmMode.h | 2 ++ 2 files changed, 21 insertions(+)
include/drm/drm_mode.h +19 -0
@@ -855,6 +855,25 @@ struct drm_mode_revoke_lease {__u32 lessee_id; }; +/** +* struct drm_mode_rect - two dimensional rectangle +* @x1: horizontal starting coordinate (inclusive) +* @y1: vertical starting coordinate (inclusive) +* @x2: horizontal ending coordinate (exclusive) +* @y2: vertical ending coordinate (exclusive) +* +* With drm subsystem using struct drm_rect to manage rectangular area this +* export it to user-space. +* +* Currently used by drm_mode_atomic blob property FB_DAMAGE_CLIPS. +*/ +struct drm_mode_rect { +__s32 x1; +__s32 y1; +__s32 x2; +__s32 y2; +}; +#if defined(__cplusplus) }#endif
xf86drmMode.h +2 -0
@@ -338,6 +338,8 @@ typedef struct _drmModePlaneRes {uint32_t *planes; } drmModePlaneRes, *drmModePlaneResPtr; +typedef struct drm_mode_rect drmModeRect , *drmModeRectPtr ; +extern void drmModeFreeModeInfo (drmModeModeInfoPtr ptr );extern void drmModeFreeResources (drmModeResPtr ptr );extern void drmModeFreeFB (drmModeFBPtr ptr );
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Deepak,
include/drm/drm_mode.h
Quoted 8 lines · Deepak Rawat
With drm subsystem using struct
drm_rectto manage rectangular area this export it to user-space.Currently used by
drm_mode_atomicblob propertyFB_DAMAGE_CLIPS.include/drm/drm_mode.h +0
-0
Please see include/drm/README for details how include/drm/ should be updated.
xf86drmMode.h typedef struct _drmModePlaneRes { · line 342
Quoted 8 lines
xf86drmMode.h +2
-0@@ -338,6 +338,8 @@ typedef struct _drmModePlaneRes {uint32_t *planes; } drmModePlaneRes, *drmModePlaneResPtr; +typedef struct drm_mode_rect drmModeRect , *drmModeRectPtr ; +
Since there's no API which (directly) uses drmModeRect I'd stick with the original name and drop the typedef?
Otherwise it's fairly confusing to have it as-is.
HTH
Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel