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

Jani Nikula jani.nikula at linux.intel.com
Mon Sep 9 12:02:03 UTC 2024


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.

BR,
Jani.


[1] https://lore.kernel.org/r/20240909195939.067c1c13@canb.auug.org.au


-- 
Jani Nikula, Intel


More information about the Intel-xe mailing list