[Intel-xe] [PATCH 3/3] drm/xe/guc: Include only required GuC ABI headers
Matthew Brost
matthew.brost at intel.com
Wed Nov 29 09:27:07 UTC 2023
On Tue, Nov 28, 2023 at 09:32:03PM +0100, Michal Wajdeczko wrote:
> On i915 we were adding new GuC ABI headers directly to guc_fwif.h
Let's maybe even try to kill guc_fwif.h sooner or later.
This is going in the right direction, with that:
Reviewed-by: Matthew Brost <matthew.brost at intel.com>
> file since we were replacing old definitions from that file.
>
> On xe driver we could do more and better by including ABI headers
> only in files that need those definitions.
>
> Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/741
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Jani Nikula <jani.nikula at intel.com>
> ---
> drivers/gpu/drm/xe/xe_gt_pagefault.c | 1 +
> drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 1 +
> drivers/gpu/drm/xe/xe_guc.c | 2 ++
> drivers/gpu/drm/xe/xe_guc_ct.c | 2 ++
> drivers/gpu/drm/xe/xe_guc_fwif.h | 6 ------
> drivers/gpu/drm/xe/xe_guc_hwconfig.c | 1 +
> drivers/gpu/drm/xe/xe_guc_pc.c | 2 ++
> drivers/gpu/drm/xe/xe_guc_submit.c | 2 ++
> 8 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_pagefault.c b/drivers/gpu/drm/xe/xe_gt_pagefault.c
> index 03c1ab0ab0ca..a33f4a37bf2d 100644
> --- a/drivers/gpu/drm/xe/xe_gt_pagefault.c
> +++ b/drivers/gpu/drm/xe/xe_gt_pagefault.c
> @@ -12,6 +12,7 @@
> #include <drm/drm_managed.h>
> #include <drm/ttm/ttm_execbuf_util.h>
>
> +#include "abi/guc_actions_abi.h"
> #include "xe_bo.h"
> #include "xe_gt.h"
> #include "xe_gt_tlb_invalidation.h"
> diff --git a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
> index a28f31c05b1b..7eef23a00d77 100644
> --- a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
> +++ b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
> @@ -5,6 +5,7 @@
>
> #include "xe_gt_tlb_invalidation.h"
>
> +#include "abi/guc_actions_abi.h"
> #include "xe_device.h"
> #include "xe_gt.h"
> #include "xe_guc.h"
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index 08142d8ee052..e6f680efb29e 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -7,6 +7,8 @@
>
> #include <drm/drm_managed.h>
>
> +#include "abi/guc_actions_abi.h"
> +#include "abi/guc_errors_abi.h"
> #include "generated/xe_wa_oob.h"
> #include "regs/xe_gt_regs.h"
> #include "regs/xe_guc_regs.h"
> diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
> index c44e75074695..6295d916e39f 100644
> --- a/drivers/gpu/drm/xe/xe_guc_ct.c
> +++ b/drivers/gpu/drm/xe/xe_guc_ct.c
> @@ -11,6 +11,8 @@
>
> #include <drm/drm_managed.h>
>
> +#include "abi/guc_actions_abi.h"
> +#include "abi/guc_klvs_abi.h"
> #include "xe_bo.h"
> #include "xe_device.h"
> #include "xe_gt.h"
> diff --git a/drivers/gpu/drm/xe/xe_guc_fwif.h b/drivers/gpu/drm/xe/xe_guc_fwif.h
> index 4216a6d9e478..4dd5a88a7826 100644
> --- a/drivers/gpu/drm/xe/xe_guc_fwif.h
> +++ b/drivers/gpu/drm/xe/xe_guc_fwif.h
> @@ -8,13 +8,7 @@
>
> #include <linux/bits.h>
>
> -#include "abi/guc_actions_abi.h"
> -#include "abi/guc_actions_slpc_abi.h"
> -#include "abi/guc_communication_ctb_abi.h"
> -#include "abi/guc_communication_mmio_abi.h"
> -#include "abi/guc_errors_abi.h"
> #include "abi/guc_klvs_abi.h"
> -#include "abi/guc_messages_abi.h"
>
> #define G2H_LEN_DW_SCHED_CONTEXT_MODE_SET 4
> #define G2H_LEN_DW_DEREGISTER_CONTEXT 3
> diff --git a/drivers/gpu/drm/xe/xe_guc_hwconfig.c b/drivers/gpu/drm/xe/xe_guc_hwconfig.c
> index 57d325ec8ce3..98bb9bb30705 100644
> --- a/drivers/gpu/drm/xe/xe_guc_hwconfig.c
> +++ b/drivers/gpu/drm/xe/xe_guc_hwconfig.c
> @@ -7,6 +7,7 @@
>
> #include <drm/drm_managed.h>
>
> +#include "abi/guc_actions_abi.h"
> #include "xe_bo.h"
> #include "xe_device.h"
> #include "xe_gt.h"
> diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c
> index e9dd6c3d750b..2919c6aea403 100644
> --- a/drivers/gpu/drm/xe/xe_guc_pc.c
> +++ b/drivers/gpu/drm/xe/xe_guc_pc.c
> @@ -9,6 +9,8 @@
>
> #include <drm/drm_managed.h>
>
> +#include "abi/guc_actions_abi.h"
> +#include "abi/guc_actions_slpc_abi.h"
> #include "regs/xe_gt_regs.h"
> #include "regs/xe_regs.h"
> #include "xe_bo.h"
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> index 97e87c701af5..46b132ee1d3a 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -13,6 +13,8 @@
>
> #include <drm/drm_managed.h>
>
> +#include "abi/guc_actions_abi.h"
> +#include "abi/guc_klvs_abi.h"
> #include "regs/xe_lrc_layout.h"
> #include "xe_assert.h"
> #include "xe_devcoredump.h"
> --
> 2.25.1
>
More information about the Intel-xe
mailing list