Re: [PATCH 13/51] drm: use typedefs and defines from drm.h instead of redundant own definitions
Bryce Harrington <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Dec 18, 2015 at 02:28:52PM +0100, Enrico Weigelt, metux IT consult wrote: > These typedefs and defines are part of the libdrm API and therefore should > be taken from there, instead of own redundant declarations. I wonder if these got added to some particular (now ancient) version of libdrm. If so, and if we're version checking drm may want to update that... I've not compile-checked these changes but confirm that the structs are present in my (Ubuntu 14.04-era) drm/drm.h, so the change seems appropriate. Bryce > Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]> > --- > src/drm/cairo-drm-bo.c | 30 +----------------------------- > 1 file changed, 1 insertion(+), 29 deletions(-) > > diff --git a/src/drm/cairo-drm-bo.c b/src/drm/cairo-drm-bo.c > index a5b59f2..9f4d915 100644 > --- a/src/drm/cairo-drm-bo.c > +++ b/src/drm/cairo-drm-bo.c > @@ -36,38 +36,10 @@ > > #include <sys/ioctl.h> > #include <errno.h> > +#include <drm/drm.h> > > #define ERR_DEBUG(x) x > > -struct drm_gem_close { > - /** Handle of the object to be closed. */ > - uint32_t handle; > - uint32_t pad; > -}; > - > -struct drm_gem_flink { > - /** Handle for the object being named */ > - uint32_t handle; > - > - /** Returned global name */ > - uint32_t name; > -}; > - > -struct drm_gem_open { > - /** Name of object being opened */ > - uint32_t name; > - > - /** Returned handle for the object */ > - uint32_t handle; > - > - /** Returned size of the object */ > - uint64_t size; > -}; > - > -#define DRM_IOCTL_GEM_CLOSE DRM_IOW (0x09, struct drm_gem_close) > -#define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink) > -#define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open) > - > cairo_status_t > _cairo_drm_bo_open_for_name (const cairo_drm_device_t *dev, > cairo_drm_bo_t *bo, > -- > 2.6.4.442.g545299f > > -- > cairo mailing list > [email protected] > http://lists.cairographics.org/mailman/listinfo/cairo -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo