dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 2/3] drm: align #include directives with libdrm in uapi headers
Date: Wed, 30 Mar 2016 17:11:41 +0200	[thread overview]
Message-ID: <20160330151141.GJ2510@phenom.ffwll.local> (raw)
In-Reply-To: <CACvgo51Sd-83FwF9H4q7aS72PuLVX_nmD4Kpr_MwPDYH9sf4PQ@mail.gmail.com>

On Wed, Mar 30, 2016 at 04:05:20PM +0100, Emil Velikov wrote:
> On 30 March 2016 at 15:19, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > We can't use <drm/*.h> because that upsets the serach paths in libdrm.
> > Also, drop the circular inclusion in drm_mode.h.
> >
> > v2: Actually change the right headers.
> >
> > Cc: Emil Velikov <emil.l.velikov@gmail.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> >  include/uapi/drm/drm.h      | 2 +-
> >  include/uapi/drm/drm_mode.h | 2 --
> >  2 files changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
> > index d299c7749091..c7ecc3abff03 100644
> > --- a/include/uapi/drm/drm.h
> > +++ b/include/uapi/drm/drm.h
> > @@ -685,7 +685,7 @@ struct drm_prime_handle {
> >         __s32 fd;
> >  };
> >
> > -#include <drm/drm_mode.h>
> > +#include "drm_mode.h"
> >
> >  #define DRM_IOCTL_BASE                 'd'
> >  #define DRM_IO(nr)                     _IO(DRM_IOCTL_BASE,nr)
> > diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> > index c0217434d28d..db106ab01039 100644
> > --- a/include/uapi/drm/drm_mode.h
> > +++ b/include/uapi/drm/drm_mode.h
> > @@ -27,8 +27,6 @@
> >  #ifndef _DRM_MODE_H
> >  #define _DRM_MODE_H
> >
> > -#include "drm.h"
> > -
> I'm thinking about the complete inverse actually.
> 
> Any program that depends on drm_mode.h but does not include it
> explicitly is severely broken. On the other hand, we rely on the drm.h
> to resolve the linux specific types (for non-linux platforms).
> 
> Unfortunately I've not looked how much busted userspace there is in
> either case (this patch vs my suggestion).

Well I was just blindly aligning the #includes to match what we have right
now in libdrm. That's the safest option really. It would be nice to
untangle this, but I think it's too late for that now :(
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-03-30 15:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30 14:19 [PATCH 1/3] drm: Make drm.h uapi header safe for C++ Daniel Vetter
2016-03-30 14:19 ` [PATCH 2/3] drm: align #include directives with libdrm in uapi headers Daniel Vetter
2016-03-30 15:05   ` Emil Velikov
2016-03-30 15:11     ` Daniel Vetter [this message]
2016-03-30 15:22       ` Emil Velikov
2016-03-30 15:54   ` [PATCH] " Daniel Vetter
2016-03-30 16:08     ` Emil Velikov
2016-03-30 14:19 ` [PATCH 3/3] drm: Move DRM_MODE_OBJECT_* to " Daniel Vetter
2016-03-30 16:07   ` Emil Velikov
2016-03-30 17:55     ` Paulo Zanoni
2016-03-30 19:07       ` Daniel Vetter
2016-03-30 14:42 ` [PATCH 1/2] drm: Untangle __KERNEL__ guards Daniel Vetter
2016-03-30 14:42   ` [PATCH 2/2] drm: Make uapi headers C89 pendantic compliant Daniel Vetter
2016-03-30 20:06     ` Emil Velikov
2016-03-31  5:58       ` Daniel Vetter
2016-03-30 15:56   ` [PATCH 1/2] drm: Untangle __KERNEL__ guards Emil Velikov
2016-03-30 19:11     ` Daniel Vetter
2016-03-30 15:12 ` [PATCH] drm: Make drm.h uapi header safe for C++ Daniel Vetter
2016-03-30 15:56   ` Emil Velikov
2016-04-06 15:58 ` [PATCH 1/3] " Gabriel Laskar
2016-04-06 16:35   ` Emil Velikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160330151141.GJ2510@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox