Re: [PATCH] drm: Allow drm_fourcc.h without including drm.h

2020-12-07 Thread James Park
I suppose I should do this to avoid fighting with #ifdef DRM_FOURCC_STANDALONE #if defined(__linux__) #include #else #include typedef uint32_t __u32; typedef uint64_t __u64; #endif #else #include "drm.h" #endif I'll wait for more feedback before updating the patch though. On Fri, Dec 4, 2020

Re: [PATCH] drm: Allow drm_fourcc.h without including drm.h

2020-12-07 Thread James Park
The typedefs might also conflict on Linux if DRM_FOURCC_STANDALONE is enabled with whatever LInux declared __u32/__u64 as, but I think the implication is that once DRM_FOURCC_STANDALONE has been declared, that's kind of a promise not to include drm.h. I'm fine with this, but I'm not married to it

Re: [PATCH] drm: Allow drm_fourcc.h without including drm.h

2020-12-04 Thread kernel test robot
Hi James, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-intel/for-linux-next] [also build test WARNING on drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next drm-tip/drm-tip linus/master v5.10-rc6 next-20201204] [If your patch is applied to the

Re: [PATCH] drm: Allow drm_fourcc.h without including drm.h

2020-12-04 Thread kernel test robot
Hi James, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-intel/for-linux-next] [also build test WARNING on drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next drm-tip/drm-tip linus/master drm/drm-next v5.10-rc6 next-20201204] [If your patch is

Re: [PATCH] drm: Allow drm_fourcc.h without including drm.h

2020-12-04 Thread Simon Ser
On Friday, December 4, 2020 5:53 AM, James Park wrote: > +#ifdef DRM_FOURCC_STANDALONE > +#include > > +typedef uint32_t __u32; > +typedef uint64_t __u64; > +#else > #include "drm.h" > +#endif C11 allows duplicate typedefs, but older versions of the standard don't AFAIK. If this is a concern,

[PATCH] drm: Allow drm_fourcc.h without including drm.h

2020-12-04 Thread James Park
Add DRM_FOURCC_STANDALONE guard to skip drm.h dependency. This will allow Mesa to port code to Windows more easily. Signed-off-by: James Park --- include/uapi/drm/drm_fourcc.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/uapi/drm/drm_fourcc.h

[PATCH] drm: Allow drm_fourcc.h without including drm.h

2020-12-04 Thread James Park
Add DRM_FOURCC_STANDALONE guard to skip drm.h dependency. This will allow Mesa to port code to Windows more easily. Signed-off-by: James Park James Park (1): drm: Allow drm_fourcc.h without including drm.h include/uapi/drm/drm_fourcc.h | 6 ++ 1 file changed, 6 insertions(+) -- 2.7.4