Skip to contentSkip to conversation

drm/radeon: Drop drm/ prefix for including drm.h in radeon_drm.h

PATCH In review Michel Dänzer 4 participants 7 messages Jul 22, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/radeon: Drop drm/ prefix for including drm.h in radeon_drm.h

From: Michel Dänzer <[email protected]>

This allows radeon_drm.h to be reused verbatim in libdrm.

---
 include/uapi/drm/radeon_drm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/drm/radeon_drm.h +1 -1
index 1ef7666..01aa2a8 100644
@@ -33,7 +33,7 @@
 #ifndef __RADEON_DRM_H__
 #define __RADEON_DRM_H__
 
-#include <drm/drm.h>
+#include "drm.h"
 
 /* WARNING: If you change any of these defines, make sure to change the
  * defines in the X server file (radeon_sarea.h)
Signature · 6 lines
2.1.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH 2/2 drm/amdgpu: Drop drm/ prefix for including drm.h in amdgpu_drm.h

From: Michel Dänzer <[email protected]>

This allows amdgpu_drm.h to be reused verbatim in libdrm.

---
 include/uapi/drm/amdgpu_drm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/drm/amdgpu_drm.h +1 -1
index 780a581..ce4d617 100644
@@ -32,7 +32,7 @@
 #ifndef __AMDGPU_DRM_H__
 #define __AMDGPU_DRM_H__
 
-#include <drm/drm.h>
+#include "drm.h"
 
 #define DRM_AMDGPU_GEM_CREATE		0x00
 #define DRM_AMDGPU_GEM_MMAP		0x01
Signature · 6 lines
2.1.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drm/amdgpu: Drop drm/ prefix for including drm.h in amdgpu_drm.h

Quoted 5 lines · Michel Dänzer

From: Michel Dänzer <[email protected]>

This allows amdgpu_drm.h to be reused verbatim in libdrm.

Quoted 20 lines
---
 include/uapi/drm/amdgpu_drm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/drm/amdgpu_drm.h +1 -2
index 780a581..ce4d617 100644
@@ -32,7 +32,7 @@
 #ifndef __AMDGPU_DRM_H__
 #define __AMDGPU_DRM_H__
 
-#include <drm/drm.h>
+#include "drm.h"
 
 #define DRM_AMDGPU_GEM_CREATE          0x00
 #define DRM_AMDGPU_GEM_MMAP            0x01
--

2.1.4

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to Michel Dänzer
Quoted 5 lines · Michel Dänzer

From: Michel Dänzer <[email protected]>

This allows radeon_drm.h to be reused verbatim in libdrm.

For both patches Reviewed-by: Christian König <[email protected]>

Quoted 9 lines
---
  include/uapi/drm/radeon_drm.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/drm/radeon_drm.h +0 -0
index 1ef7666..01aa2a8 100644

include/uapi/drm/radeon_drm.h line 39

Quoted 8 lines
include/uapi/drm/radeon_drm.h +1 -1
@@ -33,7 +33,7 @@
  #ifndef __RADEON_DRM_H__
  #define __RADEON_DRM_H__
 
-#include <drm/drm.h>
+#include "drm.h"
 
  /* WARNING: If you change any of these defines, make sure to change the
   * defines in the X server file (radeon_sarea.h)

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
Quoted 8 lines · Christian König
Quoted 5 lines · Michel Dänzer

From: Michel Dänzer <[email protected]>

This allows radeon_drm.h to be reused verbatim in libdrm.

For both patches Reviewed-by: Christian König <[email protected]>

#ifdef __KERNEL__
#include <drm/drm.h>
#else
#include <drm.h>
#endif

then run

$ make headers_install

and copy results verbatim to libdrm. That's at least how it's supposed to be done. Might be useful to do that for all headers and sync up latest headers with their copies in libdrm ...
-Daniel

Quoted 21 lines
Quoted 10 lines
---
 include/uapi/drm/radeon_drm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/drm/radeon_drm.h +0 -0
index 1ef7666..01aa2a8 100644

include/uapi/drm/radeon_drm.h line 37

Quoted 6 lines
include/uapi/drm/radeon_drm.h +1 -1
@@ -33,7 +33,7 @@
 #ifndef __RADEON_DRM_H__
 #define __RADEON_DRM_H__
-#include <drm/drm.h>
+#include "drm.h"
 /* WARNING: If you change any of these defines, make sure to change the
  * defines in the X server file (radeon_sarea.h)

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#5 lore raw
Quoted 16 lines · Daniel Vetter
Quoted 8 lines · Christian König
Quoted 5 lines · Michel Dänzer

From: Michel Dänzer <[email protected]>

This allows radeon_drm.h to be reused verbatim in libdrm.

For both patches Reviewed-by: Christian König <[email protected]>

#ifdef __KERNEL__
#include <drm/drm.h>
#else
#include <drm.h>
#endif

Quoted 6 lines

then run

$ make headers_install

and copy results verbatim to libdrm. That's at least how it's supposed to be done.

What's the point of that?

#include "drm.h"

works in the kernel as well as in libdrm.

Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#6 lore raw
Quoted 21 lines · Michel Dänzer
Quoted 20 lines · Daniel Vetter
Quoted 8 lines · Christian König
Quoted 5 lines · Michel Dänzer

From: Michel Dänzer <[email protected]>

This allows radeon_drm.h to be reused verbatim in libdrm.

For both patches Reviewed-by: Christian König <[email protected]>

#ifdef __KERNEL__
#include <drm/drm.h>
#else
#include <drm.h>
#endif

then run

$ make headers_install
Quoted 8 lines
Quoted 2 lines

and copy results verbatim to libdrm. That's at least how it's supposed to be done.

What's the point of that?

#include "drm.h"

works in the kernel as well as in libdrm.

None for this case, was just an example how to handle the userspace headers since you've said verbatim copy. It shouldn't ever be a verbatim copy but always go through make headers_install. And it might make sense to clean this up for all drivers since there's a bunch of random differences in these. Anyway was just an idea.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel