headers: Sync up some header guard changes from drm-next.

This pulls in pieces of drm-next d65d31388a23
("Merge tag 'drm-misc-next-fixes-2017-11-07' of
git://anongit.freedesktop.org/drm/drm-misc into drm-next")

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
main
Eric Anholt 2017-11-08 11:06:55 -08:00
parent e38de51799
commit 8d34bba212
10 changed files with 84 additions and 7 deletions

View File

@ -86,10 +86,6 @@ Outdated or Broken Headers
This section contains a list of headers and the respective "issues" they might This section contains a list of headers and the respective "issues" they might
have relative to their kernel equivalent. have relative to their kernel equivalent.
Nearly all headers:
- Missing extern C notation.
Status: Trivial.
Most UMS headers: Most UMS headers:
- Not using fixed size integers - compat ioctls are broken. - Not using fixed size integers - compat ioctls are broken.
Status: ? Status: ?

View File

@ -37,6 +37,10 @@
#include "drm.h" #include "drm.h"
#if defined(__cplusplus)
extern "C" {
#endif
/* WARNING: If you change any of these defines, make sure to change the /* WARNING: If you change any of these defines, make sure to change the
* defines in the Xserver file (mga_sarea.h) * defines in the Xserver file (mga_sarea.h)
*/ */
@ -416,4 +420,8 @@ typedef struct drm_mga_getparam {
void *value; void *value;
} drm_mga_getparam_t; } drm_mga_getparam_t;
#if defined(__cplusplus)
}
#endif
#endif #endif

View File

@ -27,6 +27,12 @@
#define NOUVEAU_DRM_HEADER_PATCHLEVEL 16 #define NOUVEAU_DRM_HEADER_PATCHLEVEL 16
#include "drm.h"
#if defined(__cplusplus)
extern "C" {
#endif
struct drm_nouveau_channel_alloc { struct drm_nouveau_channel_alloc {
uint32_t fb_ctxdma_handle; uint32_t fb_ctxdma_handle;
uint32_t tt_ctxdma_handle; uint32_t tt_ctxdma_handle;
@ -207,4 +213,8 @@ struct drm_nouveau_sarea {
#define DRM_NOUVEAU_GEM_CPU_FINI 0x43 #define DRM_NOUVEAU_GEM_CPU_FINI 0x43
#define DRM_NOUVEAU_GEM_INFO 0x44 #define DRM_NOUVEAU_GEM_INFO 0x44
#if defined(__cplusplus)
}
#endif
#endif /* __NOUVEAU_DRM_H__ */ #endif /* __NOUVEAU_DRM_H__ */

View File

@ -27,6 +27,10 @@
#include <stddef.h> #include <stddef.h>
#include "drm.h" #include "drm.h"
#if defined(__cplusplus)
extern "C" {
#endif
/* Please note that modifications to all structs defined here are /* Please note that modifications to all structs defined here are
* subject to backwards-compatibility constraints. * subject to backwards-compatibility constraints.
* *
@ -149,4 +153,8 @@ struct drm_qxl_alloc_surf {
DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC_SURF,\ DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC_SURF,\
struct drm_qxl_alloc_surf) struct drm_qxl_alloc_surf)
#if defined(__cplusplus)
}
#endif
#endif #endif

View File

@ -33,6 +33,12 @@
#ifndef __R128_DRM_H__ #ifndef __R128_DRM_H__
#define __R128_DRM_H__ #define __R128_DRM_H__
#include "drm.h"
#if defined(__cplusplus)
extern "C" {
#endif
/* WARNING: If you change any of these defines, make sure to change the /* WARNING: If you change any of these defines, make sure to change the
* defines in the X server file (r128_sarea.h) * defines in the X server file (r128_sarea.h)
*/ */
@ -323,4 +329,8 @@ typedef struct drm_r128_getparam {
void *value; void *value;
} drm_r128_getparam_t; } drm_r128_getparam_t;
#if defined(__cplusplus)
}
#endif
#endif #endif

View File

@ -26,6 +26,12 @@
#ifndef __SAVAGE_DRM_H__ #ifndef __SAVAGE_DRM_H__
#define __SAVAGE_DRM_H__ #define __SAVAGE_DRM_H__
#include "drm.h"
#if defined(__cplusplus)
extern "C" {
#endif
#ifndef __SAVAGE_SAREA_DEFINES__ #ifndef __SAVAGE_SAREA_DEFINES__
#define __SAVAGE_SAREA_DEFINES__ #define __SAVAGE_SAREA_DEFINES__
@ -207,4 +213,8 @@ union drm_savage_cmd_header {
} clear1; /* SAVAGE_CMD_CLEAR data */ } clear1; /* SAVAGE_CMD_CLEAR data */
}; };
#if defined(__cplusplus)
}
#endif
#endif #endif

View File

@ -27,6 +27,12 @@
#ifndef __SIS_DRM_H__ #ifndef __SIS_DRM_H__
#define __SIS_DRM_H__ #define __SIS_DRM_H__
#include "drm.h"
#if defined(__cplusplus)
extern "C" {
#endif
/* SiS specific ioctls */ /* SiS specific ioctls */
#define NOT_USED_0_3 #define NOT_USED_0_3
#define DRM_SIS_FB_ALLOC 0x04 #define DRM_SIS_FB_ALLOC 0x04
@ -64,4 +70,8 @@ typedef struct {
unsigned int offset, size; unsigned int offset, size;
} drm_sis_fb_t; } drm_sis_fb_t;
#if defined(__cplusplus)
}
#endif
#endif /* __SIS_DRM_H__ */ #endif /* __SIS_DRM_H__ */

View File

@ -20,10 +20,14 @@
* OTHER DEALINGS IN THE SOFTWARE. * OTHER DEALINGS IN THE SOFTWARE.
*/ */
#ifndef _UAPI_TEGRA_DRM_H_ #ifndef _TEGRA_DRM_H_
#define _UAPI_TEGRA_DRM_H_ #define _TEGRA_DRM_H_
#include <drm.h> #include "drm.h"
#if defined(__cplusplus)
extern "C" {
#endif
#define DRM_TEGRA_GEM_CREATE_TILED (1 << 0) #define DRM_TEGRA_GEM_CREATE_TILED (1 << 0)
#define DRM_TEGRA_GEM_CREATE_BOTTOM_UP (1 << 1) #define DRM_TEGRA_GEM_CREATE_BOTTOM_UP (1 << 1)
@ -198,4 +202,8 @@ struct drm_tegra_gem_get_flags {
#define DRM_IOCTL_TEGRA_GEM_SET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags) #define DRM_IOCTL_TEGRA_GEM_SET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags)
#define DRM_IOCTL_TEGRA_GEM_GET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags) #define DRM_IOCTL_TEGRA_GEM_GET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags)
#if defined(__cplusplus)
}
#endif
#endif #endif

View File

@ -26,6 +26,10 @@
#include "drm.h" #include "drm.h"
#if defined(__cplusplus)
extern "C" {
#endif
/* WARNING: These defines must be the same as what the Xserver uses. /* WARNING: These defines must be the same as what the Xserver uses.
* if you change them, you must change the defines in the Xserver. * if you change them, you must change the defines in the Xserver.
*/ */
@ -272,4 +276,8 @@ typedef struct drm_via_dmablit {
drm_via_blitsync_t sync; drm_via_blitsync_t sync;
} drm_via_dmablit_t; } drm_via_dmablit_t;
#if defined(__cplusplus)
}
#endif
#endif /* _VIA_DRM_H_ */ #endif /* _VIA_DRM_H_ */

View File

@ -30,6 +30,10 @@
#include "drm.h" #include "drm.h"
#if defined(__cplusplus)
extern "C" {
#endif
#define DRM_VMW_MAX_SURFACE_FACES 6 #define DRM_VMW_MAX_SURFACE_FACES 6
#define DRM_VMW_MAX_MIP_LEVELS 24 #define DRM_VMW_MAX_MIP_LEVELS 24
@ -1087,4 +1091,9 @@ union drm_vmw_extended_context_arg {
enum drm_vmw_extended_context req; enum drm_vmw_extended_context req;
struct drm_vmw_context_arg rep; struct drm_vmw_context_arg rep;
}; };
#if defined(__cplusplus)
}
#endif
#endif #endif