* [PATCH libdrm] xf86drm: Add signed32 rectangle
@ 2018-09-05 23:47 Deepak Rawat
2018-09-07 14:27 ` Emil Velikov
0 siblings, 1 reply; 2+ messages in thread
From: Deepak Rawat @ 2018-09-05 23:47 UTC (permalink / raw)
To: dri-devel, linux-graphics-maintainer, thellstrom, syeh
Cc: Deepak Rawat, lukasz.spintzyk
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.
Signed-off-by: Deepak Rawat <drawat@vmware.com>
---
include/drm/drm_mode.h | 19 +++++++++++++++++++
xf86drmMode.h | 2 ++
2 files changed, 21 insertions(+)
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
index 5f9fadbd..9e7bdc26 100644
--- a/include/drm/drm_mode.h
+++ b/include/drm/drm_mode.h
@@ -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
diff --git a/xf86drmMode.h b/xf86drmMode.h
index 3cd27aee..a066e2b8 100644
--- a/xf86drmMode.h
+++ b/xf86drmMode.h
@@ -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 );
--
2.17.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH libdrm] xf86drm: Add signed32 rectangle
2018-09-05 23:47 [PATCH libdrm] xf86drm: Add signed32 rectangle Deepak Rawat
@ 2018-09-07 14:27 ` Emil Velikov
0 siblings, 0 replies; 2+ messages in thread
From: Emil Velikov @ 2018-09-07 14:27 UTC (permalink / raw)
To: Deepak Rawat
Cc: Thomas Hellstrom, VMware Graphics, lukasz.spintzyk, ML dri-devel
Hi Deepak,
On 6 September 2018 at 00:47, Deepak Rawat <drawat@vmware.com> wrote:
> 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.
>
> --- a/include/drm/drm_mode.h
> +++ b/include/drm/drm_mode.h
Please see include/drm/README for details how include/drm/ should be updated.
> --- a/xf86drmMode.h
> +++ b/xf86drmMode.h
> @@ -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
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-07 14:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-05 23:47 [PATCH libdrm] xf86drm: Add signed32 rectangle Deepak Rawat
2018-09-07 14:27 ` Emil Velikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox