[PATCH 4/4] drm/xe: Split xe_gt_stat.h

Lucas De Marchi lucas.demarchi at intel.com
Fri Nov 15 23:49:25 UTC 2024


On Thu, Nov 14, 2024 at 12:39:57PM -0500, Rodrigo Vivi wrote:
>On Thu, Nov 14, 2024 at 07:21:48AM -0800, Lucas De Marchi wrote:
>> Follow what's done for the other headers, with the types split into a
>> separate header that can be included by other *_types.h headers.
>>
>> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
>> ---
>>  drivers/gpu/drm/xe/xe_gt_stats.h       |  8 ++------
>>  drivers/gpu/drm/xe/xe_gt_stats_types.h | 15 +++++++++++++++
>>  drivers/gpu/drm/xe/xe_gt_types.h       |  2 +-
>>  3 files changed, 18 insertions(+), 7 deletions(-)
>>  create mode 100644 drivers/gpu/drm/xe/xe_gt_stats_types.h
>>
>> diff --git a/drivers/gpu/drm/xe/xe_gt_stats.h b/drivers/gpu/drm/xe/xe_gt_stats.h
>> index 91d944f6c4e43..38325ef536176 100644
>> --- a/drivers/gpu/drm/xe/xe_gt_stats.h
>> +++ b/drivers/gpu/drm/xe/xe_gt_stats.h
>> @@ -6,15 +6,11 @@
>>  #ifndef _XE_GT_STATS_H_
>>  #define _XE_GT_STATS_H_
>>
>> +#include "xe_gt_stats_types.h"
>> +
>>  struct xe_gt;
>>  struct drm_printer;
>>
>> -enum xe_gt_stats_id {
>> -	XE_GT_STATS_ID_TLB_INVAL,
>> -	/* must be the last entry */
>> -	__XE_GT_STATS_NUM_IDS,
>
>would deserve a doc while moving it here?

it wouldn't show up in the html output unless we also linked it
somewhere in the Documentation/  side. I prefer to do that on top.

>anyway,
>
>Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>

thanks
Lucas De Marchi

>
>> -};
>> -
>>  #ifdef CONFIG_DEBUG_FS
>>  int xe_gt_stats_print_info(struct xe_gt *gt, struct drm_printer *p);
>>  void xe_gt_stats_incr(struct xe_gt *gt, const enum xe_gt_stats_id id, int incr);
>> diff --git a/drivers/gpu/drm/xe/xe_gt_stats_types.h b/drivers/gpu/drm/xe/xe_gt_stats_types.h
>> new file mode 100644
>> index 0000000000000..2fc055e39f273
>> --- /dev/null
>> +++ b/drivers/gpu/drm/xe/xe_gt_stats_types.h
>> @@ -0,0 +1,15 @@
>> +/* SPDX-License-Identifier: MIT */
>> +/*
>> + * Copyright © 2024 Intel Corporation
>> + */
>> +
>> +#ifndef _XE_GT_STATS_TYPES_H_
>> +#define _XE_GT_STATS_TYPES_H_
>> +
>> +enum xe_gt_stats_id {
>> +	XE_GT_STATS_ID_TLB_INVAL,
>> +	/* must be the last entry */
>> +	__XE_GT_STATS_NUM_IDS,
>> +};
>> +
>> +#endif
>> diff --git a/drivers/gpu/drm/xe/xe_gt_types.h b/drivers/gpu/drm/xe/xe_gt_types.h
>> index 20901c01ba29a..6e66bf0e8b3f7 100644
>> --- a/drivers/gpu/drm/xe/xe_gt_types.h
>> +++ b/drivers/gpu/drm/xe/xe_gt_types.h
>> @@ -11,7 +11,7 @@
>>  #include "xe_gt_idle_types.h"
>>  #include "xe_gt_sriov_pf_types.h"
>>  #include "xe_gt_sriov_vf_types.h"
>> -#include "xe_gt_stats.h"
>> +#include "xe_gt_stats_types.h"
>>  #include "xe_hw_engine_types.h"
>>  #include "xe_hw_fence_types.h"
>>  #include "xe_oa_types.h"
>> --
>> 2.47.0
>>


More information about the Intel-xe mailing list