[1/1] drm/i915/guc: Asynchronous flush of GuC log regions

Submitted by Teres Alexis, Alan Previn on June 7, 2022, 12:23 a.m.

Details

Message ID 20220607002314.1451656-2-alan.previn.teres.alexis@intel.com
State New
Headers show
Series "GuC-Log flush-completes be asynchronous" ( rev: 1 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Teres Alexis, Alan Previn June 7, 2022, 12:23 a.m.
Both error-capture and relay-logging mechanism use the GuC
log infrastructure. That means the KMD must send a log flush
complete notification back to GuC after reading the data out.
This call is currently being sent synchronously.
However, synchronous H2Gs cause problems when the system is
backed up. There is no need for this to be synchronous. The
KMD wasn't even looking at the return status from it. So make
it asynchronous and then there is no issue about time outs.

Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 3 ++-
 drivers/gpu/drm/i915/gt/uc/intel_guc_log.c     | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
index 97a32e610c30..ffcd7a35f8df 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
@@ -1261,7 +1261,8 @@  static int __guc_capture_flushlog_complete(struct intel_guc *guc)
 		GUC_CAPTURE_LOG_BUFFER
 	};
 
-	return intel_guc_send(guc, action, ARRAY_SIZE(action));
+	return intel_guc_send_nb(guc, action, ARRAY_SIZE(action), 0);
+
 }
 
 static void __guc_capture_process_output(struct intel_guc *guc)
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 02311ad90264..25b2d7ce6640 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
@@ -31,7 +31,7 @@  static int guc_action_flush_log_complete(struct intel_guc *guc)
 		GUC_DEBUG_LOG_BUFFER
 	};
 
-	return intel_guc_send(guc, action, ARRAY_SIZE(action));
+	return intel_guc_send_nb(guc, action, ARRAY_SIZE(action), 0);
 }
 
 static int guc_action_flush_log(struct intel_guc *guc)

Comments

On 6/6/2022 17:23, Alan Previn wrote:
> Both error-capture and relay-logging mechanism use the GuC
> log infrastructure. That means the KMD must send a log flush
> complete notification back to GuC after reading the data out.
> This call is currently being sent synchronously.
> However, synchronous H2Gs cause problems when the system is
> backed up. There is no need for this to be synchronous. The
> KMD wasn't even looking at the return status from it. So make
> it asynchronous and then there is no issue about time outs.
>
> Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>

> ---
>   drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 3 ++-
>   drivers/gpu/drm/i915/gt/uc/intel_guc_log.c     | 2 +-
>   2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
> index 97a32e610c30..ffcd7a35f8df 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
> @@ -1261,7 +1261,8 @@ static int __guc_capture_flushlog_complete(struct intel_guc *guc)
>   		GUC_CAPTURE_LOG_BUFFER
>   	};
>   
> -	return intel_guc_send(guc, action, ARRAY_SIZE(action));
> +	return intel_guc_send_nb(guc, action, ARRAY_SIZE(action), 0);
> +
>   }
>   
>   static void __guc_capture_process_output(struct intel_guc *guc)
> 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 02311ad90264..25b2d7ce6640 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> @@ -31,7 +31,7 @@ static int guc_action_flush_log_complete(struct intel_guc *guc)
>   		GUC_DEBUG_LOG_BUFFER
>   	};
>   
> -	return intel_guc_send(guc, action, ARRAY_SIZE(action));
> +	return intel_guc_send_nb(guc, action, ARRAY_SIZE(action), 0);
>   }
>   
>   static int guc_action_flush_log(struct intel_guc *guc)