[PATCH] drm: Fix drm.h uapi header for Windows

Pekka Paalanen ppaalanen at gmail.com
Mon Dec 7 10:44:54 UTC 2020


On Mon, 7 Dec 2020 12:35:14 +0200
Pekka Paalanen <ppaalanen at gmail.com> wrote:

> On Mon, 7 Dec 2020 01:08:58 -0800
> James Park <james.park at lagfreegames.com> wrote:
> 
> > I'm not completely sure what you're saying, but doesn't drm_base_types.h
> > (now drm_basic_types.h) make things robust to header order? The patch is in
> > another email. You can also see it here:
> > https://github.com/jpark37/linux/commit/0cc8ae750bfd9eab7e31c7de6aa84f24682f4f18  
> 
> If that is robust (I don't know if it is, I haven't checked), then why
> do you have #ifdef DRM_FOURCC_STANDALONE in it at all?
> 
> Like Simon said:
> 
> On Mon, 07 Dec 2020 10:02:36 +0000
> Simon Ser <contact at emersion.fr> wrote:
> 
> > In my compositors I'd like to globally define DRM_FOURCC_STANDALONE
> > (to make sure I don't miss any #define) but I still may include drm.h
> > in the same files as well.  
> 
> If any project #defines it globally, then what good does checking for
> it do? Why not assume that everyone will always want what
> DRM_FOURCC_STANDALONE would bring?

Sorry! Now I got it.

DRM_FOURCC_STANDALONE is a promise that the user is not relying on
drm_foucc.h to pull in drm.h. Nothing else. That's fine.

But then, the code in the header should be literally

#ifndef DRM_FOURCC_STANDALONE
#include "drm.h"
#endif

without an #else branch.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20201207/c4f02043/attachment.sig>


More information about the dri-devel mailing list