Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@linux.intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
	intel-xe@lists.freedesktop.org
Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>,
	Tvrtko Ursulin <tursulin@ursulin.net>
Subject: Re: [PATCH 3/7] drm/xe: Promote xe_hw_engine_class_to_str()
Date: Tue, 16 Apr 2024 11:36:03 +0200	[thread overview]
Message-ID: <22cc7c5d-3fea-4a5e-ada3-1d2d0d5fb18e@linux.intel.com> (raw)
In-Reply-To: <20240416030454.3739862-4-lucas.demarchi@intel.com>


On 4/16/2024 5:04 AM, Lucas De Marchi wrote:
> Move it out of the sysfs compilation unit so it can be re-used in other
> places.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_hw_engine.c             | 18 ++++++++++++++++++
>   drivers/gpu/drm/xe/xe_hw_engine.h             |  2 ++
>   drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 18 ------------------
>   3 files changed, 20 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c
> index a688bb2d96ce..8f72f324eee7 100644
> --- a/drivers/gpu/drm/xe/xe_hw_engine.c
> +++ b/drivers/gpu/drm/xe/xe_hw_engine.c
> @@ -959,3 +959,21 @@ bool xe_hw_engine_is_reserved(struct xe_hw_engine *hwe)
>   	return xe->info.has_usm && hwe->class == XE_ENGINE_CLASS_COPY &&
>   		hwe->instance == gt->usm.reserved_bcs_instance;
>   }
> +
> +const char *xe_hw_engine_class_to_str(enum xe_engine_class class)
> +{
> +	switch (class) {
> +	case XE_ENGINE_CLASS_RENDER:
> +		return "rcs";
> +	case XE_ENGINE_CLASS_VIDEO_DECODE:
> +		return "vcs";
> +	case XE_ENGINE_CLASS_VIDEO_ENHANCE:
> +		return "vecs";
> +	case XE_ENGINE_CLASS_COPY:
> +		return "bcs";
> +	case XE_ENGINE_CLASS_COMPUTE:
> +		return "ccs";
> +	default:
> +		return NULL;
> +	}
> +}
> diff --git a/drivers/gpu/drm/xe/xe_hw_engine.h b/drivers/gpu/drm/xe/xe_hw_engine.h
> index 71968ee2f600..843de159e47c 100644
> --- a/drivers/gpu/drm/xe/xe_hw_engine.h
> +++ b/drivers/gpu/drm/xe/xe_hw_engine.h
> @@ -67,4 +67,6 @@ static inline bool xe_hw_engine_is_valid(struct xe_hw_engine *hwe)
>   	return hwe->name;
>   }
>   
> +const char *xe_hw_engine_class_to_str(enum xe_engine_class class);
> +
>   #endif
> diff --git a/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c b/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
> index c5084d94c442..4e9db6299c7c 100644
> --- a/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
> +++ b/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
> @@ -624,24 +624,6 @@ static void hw_engine_class_sysfs_fini(struct drm_device *drm, void *arg)
>   	kobject_put(kobj);
>   }
>   
> -static const char *xe_hw_engine_class_to_str(enum xe_engine_class class)
> -{
> -	switch (class) {
> -	case XE_ENGINE_CLASS_RENDER:
> -		return "rcs";
> -	case XE_ENGINE_CLASS_VIDEO_DECODE:
> -		return "vcs";
> -	case XE_ENGINE_CLASS_VIDEO_ENHANCE:
> -		return "vecs";
> -	case XE_ENGINE_CLASS_COPY:
> -		return "bcs";
> -	case XE_ENGINE_CLASS_COMPUTE:
> -		return "ccs";
> -	default:
> -		return NULL;
> -	}
> -}
> -
>   /**
>    * xe_hw_engine_class_sysfs_init - Init HW engine classes on GT.
>    * @gt: Xe GT.

  reply	other threads:[~2024-04-16  9:36 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16  3:04 [PATCH 0/7] drm/xe: Per client usage Lucas De Marchi
2024-04-16  3:04 ` [PATCH 1/7] drm/xe/lrc: Add helper to capture context timestamp Lucas De Marchi
2024-04-16  3:04 ` [PATCH 2/7] drm/xe: Add helper to capture context runtime Lucas De Marchi
2024-04-16  5:26   ` Vivekanandan, Balasubramani
2024-04-16 13:42     ` Lucas De Marchi
2024-04-16 15:45       ` Vivekanandan, Balasubramani
2024-04-16 15:53         ` Lucas De Marchi
2024-04-16  3:04 ` [PATCH 3/7] drm/xe: Promote xe_hw_engine_class_to_str() Lucas De Marchi
2024-04-16  9:36   ` Nirmoy Das [this message]
2024-04-19 18:36     ` Zeng, Oak
2024-04-16  3:04 ` [PATCH 4/7] drm/xe: Add XE_ENGINE_CLASS_OTHER to str conversion Lucas De Marchi
2024-04-16  9:37   ` Nirmoy Das
2024-04-16  3:04 ` [PATCH 5/7] drm/xe: Add helper to capture engine timestamp Lucas De Marchi
2024-04-16 22:56   ` Umesh Nerlige Ramappa
2024-04-17  3:14     ` Lucas De Marchi
2024-04-18 18:24       ` Umesh Nerlige Ramappa
2024-04-16  3:04 ` [PATCH 6/7] drm/xe/client: Print runtime to fdinfo Lucas De Marchi
2024-04-16 23:20   ` Umesh Nerlige Ramappa
2024-04-17  3:11     ` Lucas De Marchi
2024-04-18 23:12       ` Umesh Nerlige Ramappa
2024-04-19 13:25         ` Lucas De Marchi
2024-04-16  3:04 ` [PATCH 7/7] HACK: simple gputop-like impl in python Lucas De Marchi
2024-04-16  3:17 ` ✓ CI.Patch_applied: success for drm/xe: Per client usage Patchwork
2024-04-16  3:17 ` ✗ CI.checkpatch: warning " Patchwork
2024-04-16  3:18 ` ✓ CI.KUnit: success " Patchwork
2024-04-16  3:30 ` ✓ CI.Build: " Patchwork
2024-04-16  3:32 ` ✓ CI.Hooks: " Patchwork
2024-04-16  3:34 ` ✓ CI.checksparse: " Patchwork
2024-04-16  3:59 ` ✗ CI.BAT: failure " Patchwork
2024-04-16  8:37 ` [PATCH 0/7] " Tvrtko Ursulin
2024-04-16 13:30   ` Lucas De Marchi
2024-04-16 13:51     ` Lucas De Marchi
2024-04-16 14:22       ` Tvrtko Ursulin
2024-04-16 18:29         ` Lucas De Marchi
2024-04-17  8:51           ` Tvrtko Ursulin
2024-04-17 19:05             ` Lucas De Marchi
2024-04-17 20:35               ` Umesh Nerlige Ramappa
2024-04-17 23:19                 ` Lucas De Marchi
2024-04-18  8:09                   ` Tvrtko Ursulin
2024-04-19 10:44                   ` Tvrtko Ursulin
2024-04-19 23:51                     ` Umesh Nerlige Ramappa
2024-04-22 10:40                       ` Tvrtko Ursulin
2024-04-22 17:17                         ` Umesh Nerlige Ramappa
2024-04-23  8:44                           ` Tvrtko Ursulin
2024-04-24  0:40                             ` Lucas De Marchi
2024-04-16 22:12 ` ✗ CI.FULL: failure for " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22cc7c5d-3fea-4a5e-ada3-1d2d0d5fb18e@linux.intel.com \
    --to=nirmoy.das@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=tursulin@ursulin.net \
    --cc=umesh.nerlige.ramappa@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox