[i-g-t V2 2/4] include/drm-uapi-experimental: Move i915_drm_local.h to drm-uapi-experimental

Matthew Auld matthew.auld at intel.com
Mon Nov 18 10:42:19 UTC 2024


On 18/11/2024 07:02, Tejas Upadhyay wrote:
> i915_drm_local.h is for temporary local addition of defines before KMD is
> merged upstream and defines replaced with it. We have similar local defines
> requirement for xe as well for some cases. So for common use move
> i915_drm_local.h to drm-uapi-experimental/ and rename it to intel_drm_local.h
> 
> V2(MattA)
>    - Remove include as it is empty now
>    - Add details in commit message
> 
> Signed-off-by: Tejas Upadhyay <tejas.upadhyay at intel.com>
> ---
>   .../drm-uapi-experimental/intel_drm_local.h   | 27 +++++++++++++++++++
>   lib/i915/gem_scheduler.c                      |  1 -
>   lib/i915/intel_memory_region.h                |  1 -
>   lib/igt_gt.h                                  |  2 +-
>   tools/i915-perf/i915_perf_recorder.c          |  2 --
>   5 files changed, 28 insertions(+), 5 deletions(-)
>   create mode 100644 include/drm-uapi-experimental/intel_drm_local.h
> 
> diff --git a/include/drm-uapi-experimental/intel_drm_local.h b/include/drm-uapi-experimental/intel_drm_local.h
> new file mode 100644
> index 000000000..1773c649b
> --- /dev/null
> +++ b/include/drm-uapi-experimental/intel_drm_local.h
> @@ -0,0 +1,27 @@
> +/* SPDX-License-Identifier: MIT */
> +/*
> + * Copyright © 2021 Intel Corporation

Could bump this?

> + */
> +#ifndef _INTEL_DRM_LOCAL_H_
> +#define _INTEL_DRM_LOCAL_H_
> +
> +#if defined(__cplusplus)
> +extern "C" {
> +#endif
> +
> +/*
> + * It is necessary on occasion to add uapi declarations to IGT before they
> + * appear in imported kernel uapi headers. This header is provided for this
> + * purpose.
> +
> + * Early uapi declarations should be added here exactly as they are
> + * expected to appear in the kernel uapi headers, i.e. without the LOCAL_
> + * or local_ prefix and without any #ifndef's. Attempt should be made to
> + * clean these up when kernel uapi headers are sync'd.
> + */
> +
> +#if defined(__cplusplus)
> +}
> +#endif
> +
> +#endif /* _INTEL_DRM_LOCAL_H_ */
> diff --git a/lib/i915/gem_scheduler.c b/lib/i915/gem_scheduler.c
> index 0087df902..e80c775af 100644
> --- a/lib/i915/gem_scheduler.c
> +++ b/lib/i915/gem_scheduler.c
> @@ -28,7 +28,6 @@
>   #include "igt_core.h"
>   #include "ioctl_wrappers.h"
>   
> -#include "i915/i915_drm_local.h"
>   #include "i915/gem_scheduler.h"
>   #include "i915/gem_submission.h"
>   
> diff --git a/lib/i915/intel_memory_region.h b/lib/i915/intel_memory_region.h
> index 9e24bd8fb..4641b18c1 100644
> --- a/lib/i915/intel_memory_region.h
> +++ b/lib/i915/intel_memory_region.h
> @@ -22,7 +22,6 @@
>    */
>   #include "i915_drm.h"
>   #include "igt_collection.h"
> -#include "i915_drm_local.h"
>   
>   #ifndef INTEL_MEMORY_REGION_H
>   #define INTEL_MEMORY_REGION_H
> diff --git a/lib/igt_gt.h b/lib/igt_gt.h
> index d3213123d..82ed22be7 100644
> --- a/lib/igt_gt.h
> +++ b/lib/igt_gt.h
> @@ -24,11 +24,11 @@
>   #ifndef IGT_GT_H
>   #define IGT_GT_H
>   
> +#include "drm-uapi-experimental/intel_drm_local.h"

Could also drop this until needed and include the header only in the 
test file for now?

Anyway,
Reviewed-by: Matthew Auld <matthew.auld at intel.com>

>   #include "igt_debugfs.h"
>   #include "igt_dummyload.h"
>   #include "igt_core.h"
>   
> -#include "i915/i915_drm_local.h"
>   #include "i915_drm.h"
>   
>   struct pci_device;
> diff --git a/tools/i915-perf/i915_perf_recorder.c b/tools/i915-perf/i915_perf_recorder.c
> index ca4354832..3f3692dc8 100644
> --- a/tools/i915-perf/i915_perf_recorder.c
> +++ b/tools/i915-perf/i915_perf_recorder.c
> @@ -44,8 +44,6 @@
>   
>   #include <i915_drm.h>
>   
> -#include "i915/i915_drm_local.h"
> -
>   #include "igt_core.h"
>   #include "intel_chipset.h"
>   #include "i915/perf.h"



More information about the igt-dev mailing list