All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Alan Previn <alan.previn.teres.alexis@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 2/5] drm/i915/guc: Add unaligned wc memcpy for copying GuC Log
Date: Tue, 6 Dec 2022 10:14:26 +0000	[thread overview]
Message-ID: <1f453b64-3444-9d0e-bf9b-668229e763ef@linux.intel.com> (raw)
In-Reply-To: <20221206092100.274195-3-alan.previn.teres.alexis@intel.com>


On 06/12/2022 09:20, Alan Previn wrote:
> Add usage of unaligned wc mempy in read_update_log_buffer
> as newer formats of GuC debug-log-events are no longer
> guaranteed to be exactly 4-dwords long per event.

If this "newer format" applies to DG2 and GuC log has been "productized" 
there (as in we expect to tell users please collect and attach), pick a 
fixes tag so this gets into 6.2.

Regards,

Tvrtko

> Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>   drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 9 ++++++---
>   1 file changed, 6 insertions(+), 3 deletions(-)
> 
> 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 c5a7aecd08ac..2fa952916120 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> @@ -459,13 +459,16 @@ static void _guc_log_copy_debuglogs_for_relay(struct intel_guc_log *log)
>   
>   		/* Just copy the newly written data */
>   		if (read_offset > write_offset) {
> -			i915_memcpy_from_wc(dst_data, src_data, write_offset);
> +			if (!i915_memcpy_from_wc(dst_data, src_data, write_offset))
> +				i915_unaligned_memcpy_from_wc(dst_data, src_data, write_offset);
>   			bytes_to_copy = buffer_size - read_offset;
>   		} else {
>   			bytes_to_copy = write_offset - read_offset;
>   		}
> -		i915_memcpy_from_wc(dst_data + read_offset,
> -				    src_data + read_offset, bytes_to_copy);
> +		if (!i915_memcpy_from_wc(dst_data + read_offset,
> +					 src_data + read_offset, bytes_to_copy))
> +			i915_unaligned_memcpy_from_wc(dst_data + read_offset,
> +						      src_data + read_offset, bytes_to_copy);
>   
>   		src_data += buffer_size;
>   		dst_data += buffer_size;

  reply	other threads:[~2022-12-06 10:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06  9:20 [Intel-gfx] [PATCH v2 0/5] drm/i915/guc: Update GuC relay logging debugfs Alan Previn
2022-12-06  9:20 ` [Intel-gfx] [PATCH v2 1/5] drm/i915/guc: Fix GuC relay log debugfs failing open Alan Previn
2022-12-06  9:20 ` [Intel-gfx] [PATCH v2 2/5] drm/i915/guc: Add unaligned wc memcpy for copying GuC Log Alan Previn
2022-12-06 10:14   ` Tvrtko Ursulin [this message]
2022-12-06 21:35     ` Teres Alexis, Alan Previn
2022-12-07  9:20       ` Teres Alexis, Alan Previn
2022-12-07 10:17         ` Tvrtko Ursulin
2022-12-07 18:15           ` Teres Alexis, Alan Previn
2022-12-06  9:20 ` [Intel-gfx] [PATCH v2 3/5] drm/i915/guc: Provide debugfs for log relay sub-buf info Alan Previn
2022-12-07 16:43   ` Dixit, Ashutosh
2023-03-09 23:29     ` Teres Alexis, Alan Previn
2023-03-14 22:09       ` Teres Alexis, Alan Previn
2022-12-06  9:20 ` [Intel-gfx] [PATCH v2 4/5] drm/i915/guc: Rename GuC log relay debugfs descriptively Alan Previn
2022-12-07 16:50   ` Dixit, Ashutosh
2023-03-09 23:36     ` Teres Alexis, Alan Previn
2023-03-10  5:41       ` Teres Alexis, Alan Previn
2022-12-06  9:21 ` [Intel-gfx] [PATCH v2 5/5] drm/i915/guc: Move guc_log_relay_chan debugfs path to uc Alan Previn
2022-12-07 17:24   ` Dixit, Ashutosh
2023-03-09 23:37     ` Teres Alexis, Alan Previn
2022-12-06 13:42 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/guc: Update GuC relay logging debugfs Patchwork
2022-12-06 17:42 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=1f453b64-3444-9d0e-bf9b-668229e763ef@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=alan.previn.teres.alexis@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.