The trailing underscore for
DRM_FOURCC_STANDALONE_
isn't intentional, right? Should I put all the integer types, or just the ones that are used in that file?
Thanks,
James
On Thu, Dec 3, 2020 at 6:52 AM Daniel Vetter <daniel@xxxxxxxx> wrote:
On Thu, Dec 3, 2020 at 9:18 AM Michel Dänzer <michel@xxxxxxxxxxx> wrote:
>
> On 2020-12-02 8:47 p.m., James Park wrote:
> >
> > If we're trying to cut ties with the drm-uapi folder entirely, the stuff
> > ac_surface.c need includes the AMD_FMT_MOD stuff in drm_fourcc.h,
> > and AMDGPU_TILING_* under amdgpu_drm.h. Is there a better spot for these
> > definitions?
>
> The Mesa src/amd/ code should use platform-neutral abstractions for
> these. This wasn't deemed necessary before, because nobody was trying to
> build these drivers for non-UNIX OSes. But now you are.
I think that's a bit much busy work for not much gain. drm_fourcc.h is
even included as the official source of truth of some khr extensions,
making that header stand-alone and useable cross-platform sounds like
a good idea to me. Something like the below is imo perfectly fine:
diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
index ca48ed0e6bc1..0a121b3efb58 100644
--- a/include/uapi/drm/drm_fourcc.h
+++ b/include/uapi/drm/drm_fourcc.h
@@ -24,7 +24,11 @@
#ifndef DRM_FOURCC_H
#define DRM_FOURCC_H
+#ifndef DRM_FOURCC_STANDALONE_
+/* include the linux uapi types here */
+#else
#include "drm.h"
+#endif
#if defined(__cplusplus)
extern "C" {
Cheers, Daniel
>
>
> --
> Earthling Michel Dänzer | https://redhat.com
> Libre software enthusiast | Mesa and X developer
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel