[PATCH v5 2/2] drm/xe/xe_gt_idle: add debugfs entry for powergating info

Riana Tauro riana.tauro at intel.com
Mon Sep 9 12:38:07 UTC 2024


Hi Jani

On 9/9/2024 5:32 PM, Jani Nikula wrote:
> On Fri, 06 Sep 2024, Riana Tauro <riana.tauro at intel.com> wrote:
>> @@ -288,6 +300,7 @@ static const struct drm_info_list debugfs_list[] = {
>>   	{"topology", .show = xe_gt_debugfs_simple_show, .data = topology},
>>   	{"steering", .show = xe_gt_debugfs_simple_show, .data = steering},
>>   	{"ggtt", .show = xe_gt_debugfs_simple_show, .data = ggtt},
>> +	{"powergate_info", .show = xe_gt_debugfs_simple_show, .data = powergate_info},
>>   	{"register-save-restore", .show = xe_gt_debugfs_simple_show, .data = register_save_restore},
>>   	{"workarounds", .show = xe_gt_debugfs_simple_show, .data = workarounds},
>>   	{"pat", .show = xe_gt_debugfs_simple_show, .data = pat},
>> diff --git a/drivers/gpu/drm/xe/xe_gt_idle.c b/drivers/gpu/drm/xe/xe_gt_idle.c
>> index 3924f9f3d0a5..85a35ed153a3 100644
>> --- a/drivers/gpu/drm/xe/xe_gt_idle.c
>> +++ b/drivers/gpu/drm/xe/xe_gt_idle.c
>> @@ -53,6 +53,11 @@ pc_to_xe(struct xe_guc_pc *pc)
>>   	return gt_to_xe(gt);
>>   }
>>   
>> +static inline const char *str_up_down(bool v)
>> +{
>> +	return v ? "up" : "down";
>> +}
> 
> Please don't add functions with names that are obviously going to have
> name collisions with core kernel headers. This now conflicts in
> linux-next [1]. Please rename until we can merge the real str_up_down()
> from upstream to drm-xe-next.
> 
> Also, please don't use static inline in .c files. Just let the compiler
> do its thing.
This was suggested in a review comment to have a local copy till the 
function lands in the tree

https://patchwork.freedesktop.org/patch/605708/?series=136477&rev=1

Will remove this and use the function once its merged to drm-xe-next.

Thanks
Riana
> 
> BR,
> Jani.
> 
> 
> [1] https://lore.kernel.org/r/20240909195939.067c1c13@canb.auug.org.au
> 
> 


More information about the Intel-xe mailing list