diff mbox series

[1/6] drm/i915/guc: Fix GuC relay log debugfs failing open

Message ID 20220509210151.1843173-2-alan.previn.teres.alexis@intel.com (mailing list archive)
State New, archived
Headers show
Series Update GuC relay logging debugfs | expand

Commit Message

Teres Alexis, Alan Previn May 9, 2022, 9:01 p.m. UTC
When GuC-Error-Capture was introduced, we created
buf_in_use as a way to identify if relay logging
had started. It is meant to replace the previous
method where a mmap of the GuC log buffer was
the indicator but not since GuC Error Capture
shares that mapping throughout operation.

However, that method of checking was not updated
when the debugfs guc_log_relay_ctl_open was called.
Fix that check.

Fixes:
   drm/i915/guc: Add capture region into intel_guc_log
   (daff407a083d).

Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
Link: https://patchwork.freedesktop.org/patch/479021/?series=101603&rev=1
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dixit, Ashutosh July 19, 2022, 3:58 a.m. UTC | #1
On Mon, 09 May 2022 14:01:46 -0700, Alan Previn wrote:
>
> When GuC-Error-Capture was introduced, we created
> buf_in_use as a way to identify if relay logging
> had started. It is meant to replace the previous
> method where a mmap of the GuC log buffer was

Let's change mmap to something else since mmap refers to something
different.

> the indicator but not since GuC Error Capture
> shares that mapping throughout operation.
>
> However, that method of checking was not updated
> when the debugfs guc_log_relay_ctl_open was called.

OK guc_log_relay_ctl_open introduced in this series...

The code change itself lgtm, though in general I prefer count's to
bool's.

After tweaking the commit message above this is:

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

> Fix that check.
>
> Fixes:
>    drm/i915/guc: Add capture region into intel_guc_log
>    (daff407a083d).
>
> Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
> Link: https://patchwork.freedesktop.org/patch/479021/?series=101603&rev=1
> ---
>  drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> index 78d2989fe917..09f4d5fbca82 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> @@ -568,7 +568,7 @@ int intel_guc_log_set_level(struct intel_guc_log *log, u32 level)
>
>  bool intel_guc_log_relay_created(const struct intel_guc_log *log)
>  {
> -	return log->buf_addr;
> +	return log->relay.buf_in_use;
>  }
>
>  int intel_guc_log_relay_open(struct intel_guc_log *log)
> --
> 2.25.1
>
Tvrtko Ursulin Dec. 6, 2022, 8:32 a.m. UTC | #2
On 09/05/2022 22:01, Alan Previn wrote:
> When GuC-Error-Capture was introduced, we created
> buf_in_use as a way to identify if relay logging
> had started. It is meant to replace the previous
> method where a mmap of the GuC log buffer was
> the indicator but not since GuC Error Capture
> shares that mapping throughout operation.
> 
> However, that method of checking was not updated
> when the debugfs guc_log_relay_ctl_open was called.
> Fix that check.
> 
> Fixes:
>     drm/i915/guc: Add capture region into intel_guc_log
>     (daff407a083d).

Wrong format of fixes tag - if you want this picked up by any of the 
automated tooling, it won't be. (And you probably do given DG2 is out of 
force probe.)

Regards,

Tvrtko

> Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
> Link: https://patchwork.freedesktop.org/patch/479021/?series=101603&rev=1
> ---
>   drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> index 78d2989fe917..09f4d5fbca82 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> @@ -568,7 +568,7 @@ int intel_guc_log_set_level(struct intel_guc_log *log, u32 level)
>   
>   bool intel_guc_log_relay_created(const struct intel_guc_log *log)
>   {
> -	return log->buf_addr;
> +	return log->relay.buf_in_use;
>   }
>   
>   int intel_guc_log_relay_open(struct intel_guc_log *log)
Tvrtko Ursulin Dec. 6, 2022, 8:35 a.m. UTC | #3
On 06/12/2022 08:32, Tvrtko Ursulin wrote:
> 
> On 09/05/2022 22:01, Alan Previn wrote:
>> When GuC-Error-Capture was introduced, we created
>> buf_in_use as a way to identify if relay logging
>> had started. It is meant to replace the previous
>> method where a mmap of the GuC log buffer was
>> the indicator but not since GuC Error Capture
>> shares that mapping throughout operation.
>>
>> However, that method of checking was not updated
>> when the debugfs guc_log_relay_ctl_open was called.
>> Fix that check.
>>
>> Fixes:
>>     drm/i915/guc: Add capture region into intel_guc_log
>>     (daff407a083d).
> 
> Wrong format of fixes tag - if you want this picked up by any of the 
> automated tooling, it won't be. (And you probably do given DG2 is out of 
> force probe.)

ENOCOFFEE - replying to re-surrected ancient thread so I guess this does 
not matter any more.

Regards,

Tvrtko
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
index 78d2989fe917..09f4d5fbca82 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
@@ -568,7 +568,7 @@  int intel_guc_log_set_level(struct intel_guc_log *log, u32 level)
 
 bool intel_guc_log_relay_created(const struct intel_guc_log *log)
 {
-	return log->buf_addr;
+	return log->relay.buf_in_use;
 }
 
 int intel_guc_log_relay_open(struct intel_guc_log *log)