diff mbox series

[v2] drm/i915: Don't show engine information in fdinfo with GuC submission

Message ID d3ebcf9171361ce6eb25e1b5e5360ee45c5e1885.1649971340.git.ashutosh.dixit@intel.com (mailing list archive)
State New, archived
Headers show
Series [v2] drm/i915: Don't show engine information in fdinfo with GuC submission | expand

Commit Message

Dixit, Ashutosh April 14, 2022, 9:24 p.m. UTC
At present i915 does not fetch busyness information from GuC, resulting in
incorrect busyness values in fdinfo. Because engine information is coupled
with busyness in fdinfo, skip showing client engine information in fdinfo
with GuC submission till fetching busyness is supported in the i915 GuC
submission backend.

v2 (Daniele):
  Make commit title and description more precise
  Add FIXME with brief description at code change
  s/intel_guc_submission_is_used/intel_uc_uses_guc_submission/

Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/5564
Fixes: 055634e4b62f ("drm/i915: Expose client engine utilisation via fdinfo")
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com
Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 drivers/gpu/drm/i915/i915_drm_client.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Daniele Ceraolo Spurio April 15, 2022, 12:14 a.m. UTC | #1
On 4/14/2022 2:24 PM, Ashutosh Dixit wrote:
> At present i915 does not fetch busyness information from GuC, resulting in
> incorrect busyness values in fdinfo. Because engine information is coupled
> with busyness in fdinfo, skip showing client engine information in fdinfo
> with GuC submission till fetching busyness is supported in the i915 GuC
> submission backend.
>
> v2 (Daniele):
>    Make commit title and description more precise
>    Add FIXME with brief description at code change
>    s/intel_guc_submission_is_used/intel_uc_uses_guc_submission/
>
> Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/5564
> Fixes: 055634e4b62f ("drm/i915: Expose client engine utilisation via fdinfo")
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com
> Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>   drivers/gpu/drm/i915/i915_drm_client.c | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drm_client.c b/drivers/gpu/drm/i915/i915_drm_client.c
> index e539f6b23060..6d34065e845f 100644
> --- a/drivers/gpu/drm/i915/i915_drm_client.c
> +++ b/drivers/gpu/drm/i915/i915_drm_client.c
> @@ -145,7 +145,11 @@ void i915_drm_client_fdinfo(struct seq_file *m, struct file *f)
>   		   PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn));
>   	seq_printf(m, "drm-client-id:\t%u\n", client->id);
>   
> -	if (GRAPHICS_VER(i915) < 8)
> +	/*
> +	 * FIXME: temporarily skip showing client engine information with GuC submission

Not sure if this comment deserves to be tagged as FIXME since the code 
isn't working around a bug, just returning early due to a non-supported 
feature. IMO better to drop the FIXME tag, but anyway:

Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>

Daniele

> +	 * till fetching engine busyness is implemented in the GuC submission backend
> +	 */
> +	if (GRAPHICS_VER(i915) < 8 || intel_uc_uses_guc_submission(&i915->gt0.uc))
>   		return;
>   
>   	for (i = 0; i < ARRAY_SIZE(uabi_class_names); i++)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_drm_client.c b/drivers/gpu/drm/i915/i915_drm_client.c
index e539f6b23060..6d34065e845f 100644
--- a/drivers/gpu/drm/i915/i915_drm_client.c
+++ b/drivers/gpu/drm/i915/i915_drm_client.c
@@ -145,7 +145,11 @@  void i915_drm_client_fdinfo(struct seq_file *m, struct file *f)
 		   PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn));
 	seq_printf(m, "drm-client-id:\t%u\n", client->id);
 
-	if (GRAPHICS_VER(i915) < 8)
+	/*
+	 * FIXME: temporarily skip showing client engine information with GuC submission
+	 * till fetching engine busyness is implemented in the GuC submission backend
+	 */
+	if (GRAPHICS_VER(i915) < 8 || intel_uc_uses_guc_submission(&i915->gt0.uc))
 		return;
 
 	for (i = 0; i < ARRAY_SIZE(uabi_class_names); i++)