Skip to content

Commit

Permalink
Merge branch 'drm-uapi-extern-c-fixes' of https://github.com/evelikov…
Browse files Browse the repository at this point in the history
…/linux into drm-next

Not the biggest fan of doing it this way, but what the hell.

* 'drm-uapi-extern-c-fixes' of https://github.com/evelikov/linux: (22 commits)
  drm/vmwgfx: add extern C guard for the UAPI header
  drm/virgl: add extern C guard for the UAPI header
  drm/via: add extern C guard for the UAPI header
  drm/vc4: add extern C guard for the UAPI header
  drm/tegra: add extern C guard for the UAPI header
  drm/sis: add extern C guard for the UAPI header
  drm/savage: add extern C guard for the UAPI header
  drm/radeon: add extern C guard for the UAPI header
  drm/r128: add extern C guard for the UAPI header
  drm/qxl: add extern C guard for the UAPI header
  drm/omap: add extern C guard for the UAPI header
  drm/nouveau: drop drm/ prefix from include
  drm/nouveau: add extern C guard for the UAPI header
  drm/msm: add extern C guard for the UAPI header
  drm/mga: add extern C guard for the UAPI header
  drm/i915: add extern C guard for the UAPI header
  drm/i810: add extern C guard for the UAPI header
  drm/exynos: add extern C guard for the UAPI header
  drm/etnaviv: add extern C guard for the UAPI header
  drm: add extern C guard for the UAPI headers
  ...
  • Loading branch information
Dave Airlie committed May 17, 2016
2 parents 99ee872 + d3450e0 commit 7c10ddf
Show file tree
Hide file tree
Showing 24 changed files with 202 additions and 1 deletion.
8 changes: 8 additions & 0 deletions include/uapi/drm/amdgpu_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

#define DRM_AMDGPU_GEM_CREATE 0x00
#define DRM_AMDGPU_GEM_MMAP 0x01
#define DRM_AMDGPU_CTX 0x02
Expand Down Expand Up @@ -642,4 +646,8 @@ struct drm_amdgpu_info_hw_ip {
#define AMDGPU_FAMILY_VI 130 /* Iceland, Tonga */
#define AMDGPU_FAMILY_CZ 135 /* Carrizo, Stoney */

#if defined(__cplusplus)
}
#endif

#endif
8 changes: 8 additions & 0 deletions include/uapi/drm/armada_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

#define DRM_ARMADA_GEM_CREATE 0x00
#define DRM_ARMADA_GEM_MMAP 0x02
#define DRM_ARMADA_GEM_PWRITE 0x03
Expand Down Expand Up @@ -44,4 +48,8 @@ struct drm_armada_gem_pwrite {
#define DRM_IOCTL_ARMADA_GEM_PWRITE \
ARMADA_IOCTL(IOW, GEM_PWRITE, gem_pwrite)

#if defined(__cplusplus)
}
#endif

#endif
16 changes: 16 additions & 0 deletions include/uapi/drm/drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ typedef unsigned long drm_handle_t;

#endif

#if defined(__cplusplus)
extern "C" {
#endif

#define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */
#define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */
#define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */
Expand Down Expand Up @@ -691,8 +695,16 @@ struct drm_prime_handle {
__s32 fd;
};

#if defined(__cplusplus)
}
#endif

#include "drm_mode.h"

#if defined(__cplusplus)
extern "C" {
#endif

#define DRM_IOCTL_BASE 'd'
#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr)
#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type)
Expand Down Expand Up @@ -886,4 +898,8 @@ typedef struct drm_scatter_gather drm_scatter_gather_t;
typedef struct drm_set_version drm_set_version_t;
#endif

#if defined(__cplusplus)
}
#endif

#endif
8 changes: 8 additions & 0 deletions include/uapi/drm/drm_fourcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \
((__u32)(c) << 16) | ((__u32)(d) << 24))

Expand Down Expand Up @@ -229,4 +233,8 @@
*/
#define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1)

#if defined(__cplusplus)
}
#endif

#endif /* DRM_FOURCC_H */
8 changes: 8 additions & 0 deletions include/uapi/drm/drm_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

#define DRM_DISPLAY_INFO_LEN 32
#define DRM_CONNECTOR_NAME_LEN 32
#define DRM_DISPLAY_MODE_LEN 32
Expand Down Expand Up @@ -623,4 +627,8 @@ struct drm_mode_destroy_blob {
__u32 blob_id;
};

#if defined(__cplusplus)
}
#endif

#endif
8 changes: 8 additions & 0 deletions include/uapi/drm/drm_sarea.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

/* SAREA area needs to be at least a page */
#if defined(__alpha__)
#define SAREA_MAX 0x2000U
Expand Down Expand Up @@ -83,4 +87,8 @@ typedef struct drm_sarea_frame drm_sarea_frame_t;
typedef struct drm_sarea drm_sarea_t;
#endif

#if defined(__cplusplus)
}
#endif

#endif /* _DRM_SAREA_H_ */
8 changes: 8 additions & 0 deletions include/uapi/drm/etnaviv_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

/* Please note that modifications to all structs defined here are
* subject to backwards-compatibility constraints:
* 1) Do not use pointers, use __u64 instead for 32 bit / 64 bit
Expand Down Expand Up @@ -222,4 +226,8 @@ struct drm_etnaviv_gem_wait {
#define DRM_IOCTL_ETNAVIV_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_USERPTR, struct drm_etnaviv_gem_userptr)
#define DRM_IOCTL_ETNAVIV_GEM_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_WAIT, struct drm_etnaviv_gem_wait)

#if defined(__cplusplus)
}
#endif

#endif /* __ETNAVIV_DRM_H__ */
8 changes: 8 additions & 0 deletions include/uapi/drm/exynos_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

/**
* User-desired buffer creation information structure.
*
Expand Down Expand Up @@ -362,4 +366,8 @@ struct drm_exynos_ipp_event {
__u32 buf_id[EXYNOS_DRM_OPS_MAX];
};

#if defined(__cplusplus)
}
#endif

#endif /* _UAPI_EXYNOS_DRM_H_ */
8 changes: 8 additions & 0 deletions include/uapi/drm/i810_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

/* WARNING: These defines must be the same as what the Xserver uses.
* if you change them, you must change the defines in the Xserver.
*/
Expand Down Expand Up @@ -280,4 +284,8 @@ typedef struct _drm_i810_mc {
unsigned int last_render; /* Last Render Request */
} drm_i810_mc_t;

#if defined(__cplusplus)
}
#endif

#endif /* _I810_DRM_H_ */
8 changes: 8 additions & 0 deletions include/uapi/drm/i915_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

/* Please note that modifications to all structs defined here are
* subject to backwards-compatibility constraints.
*/
Expand Down Expand Up @@ -1170,4 +1174,8 @@ struct drm_i915_gem_context_param {
__u64 value;
};

#if defined(__cplusplus)
}
#endif

#endif /* _UAPI_I915_DRM_H_ */
8 changes: 8 additions & 0 deletions include/uapi/drm/mga_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

/* WARNING: If you change any of these defines, make sure to change the
* defines in the Xserver file (mga_sarea.h)
*/
Expand Down Expand Up @@ -416,4 +420,8 @@ typedef struct drm_mga_getparam {
void __user *value;
} drm_mga_getparam_t;

#if defined(__cplusplus)
}
#endif

#endif
8 changes: 8 additions & 0 deletions include/uapi/drm/msm_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

/* Please note that modifications to all structs defined here are
* subject to backwards-compatibility constraints:
* 1) Do not use pointers, use __u64 instead for 32 bit / 64 bit
Expand Down Expand Up @@ -217,4 +221,8 @@ struct drm_msm_wait_fence {
#define DRM_IOCTL_MSM_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_SUBMIT, struct drm_msm_gem_submit)
#define DRM_IOCTL_MSM_WAIT_FENCE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_WAIT_FENCE, struct drm_msm_wait_fence)

#if defined(__cplusplus)
}
#endif

#endif /* __MSM_DRM_H__ */
10 changes: 9 additions & 1 deletion include/uapi/drm/nouveau_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@

#define DRM_NOUVEAU_EVENT_NVIF 0x80000000

#include <drm/drm.h>
#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

#define NOUVEAU_GEM_DOMAIN_CPU (1 << 0)
#define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1)
Expand Down Expand Up @@ -141,4 +145,8 @@ struct drm_nouveau_gem_cpu_fini {
#define DRM_IOCTL_NOUVEAU_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_FINI, struct drm_nouveau_gem_cpu_fini)
#define DRM_IOCTL_NOUVEAU_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_INFO, struct drm_nouveau_gem_info)

#if defined(__cplusplus)
}
#endif

#endif /* __NOUVEAU_DRM_H__ */
8 changes: 8 additions & 0 deletions include/uapi/drm/omap_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

/* Please note that modifications to all structs defined here are
* subject to backwards-compatibility constraints.
*/
Expand Down Expand Up @@ -114,4 +118,8 @@ struct drm_omap_gem_info {
#define DRM_IOCTL_OMAP_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_FINI, struct drm_omap_gem_cpu_fini)
#define DRM_IOCTL_OMAP_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info)

#if defined(__cplusplus)
}
#endif

#endif /* __OMAP_DRM_H__ */
8 changes: 8 additions & 0 deletions include/uapi/drm/qxl_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

/* Please note that modifications to all structs defined here are
* subject to backwards-compatibility constraints.
*
Expand Down Expand Up @@ -147,4 +151,8 @@ struct drm_qxl_alloc_surf {
DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC_SURF,\
struct drm_qxl_alloc_surf)

#if defined(__cplusplus)
}
#endif

#endif
8 changes: 8 additions & 0 deletions include/uapi/drm/r128_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

/* WARNING: If you change any of these defines, make sure to change the
* defines in the X server file (r128_sarea.h)
*/
Expand Down Expand Up @@ -325,4 +329,8 @@ typedef struct drm_r128_getparam {
void __user *value;
} drm_r128_getparam_t;

#if defined(__cplusplus)
}
#endif

#endif
8 changes: 8 additions & 0 deletions include/uapi/drm/radeon_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

/* WARNING: If you change any of these defines, make sure to change the
* defines in the X server file (radeon_sarea.h)
*/
Expand Down Expand Up @@ -1067,4 +1071,8 @@ struct drm_radeon_info {

#define CIK_TILE_MODE_DEPTH_STENCIL_1D 5

#if defined(__cplusplus)
}
#endif

#endif
8 changes: 8 additions & 0 deletions include/uapi/drm/savage_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

#ifndef __SAVAGE_SAREA_DEFINES__
#define __SAVAGE_SAREA_DEFINES__

Expand Down Expand Up @@ -209,4 +213,8 @@ union drm_savage_cmd_header {
} clear1; /* SAVAGE_CMD_CLEAR data */
};

#if defined(__cplusplus)
}
#endif

#endif
8 changes: 8 additions & 0 deletions include/uapi/drm/sis_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

/* SiS specific ioctls */
#define NOT_USED_0_3
#define DRM_SIS_FB_ALLOC 0x04
Expand Down Expand Up @@ -66,4 +70,8 @@ typedef struct {
unsigned long offset, size;
} drm_sis_fb_t;

#if defined(__cplusplus)
}
#endif

#endif /* __SIS_DRM_H__ */
Loading

0 comments on commit 7c10ddf

Please sign in to comment.