public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Teres Alexis, Alan Previn" <alan.previn.teres.alexis@intel.com>
To: Matthew Brost <matthew.brost@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v7 01/13] drm/i915/guc: Update GuC ADS size for error capture lists
Date: Fri, 11 Mar 2022 01:59:42 -0800	[thread overview]
Message-ID: <00efb6cf-4ea0-7c30-46fa-688e57ac391e@intel.com> (raw)
In-Reply-To: <20220310053055.GA24765@jons-linux-dev-box>

Thanks for reviewing Matt.. On one specific open - have replied below. 
Will fix the others.

...alan

On 3/9/2022 9:30 PM, Matthew Brost wrote:
> On Sat, Feb 26, 2022 at 01:55:29AM -0800, Alan Previn wrote:
> +static int
>> +guc_capture_prep_lists(struct intel_guc *guc)
>>   {
>> +	struct intel_gt *gt = guc_to_gt(guc);
>> +	struct drm_i915_private *i915 = guc_to_gt(guc)->i915;
>> +	u32 ggtt, capture_offset, null_ggtt, total_size = 0;
>> +	struct guc_gt_system_info local_info;
>> +	struct iosys_map info_map;
>> +	u32 null_header[2]={0};
>> +	struct file *file;
>> +	size_t size = 0;
>>   	int i, j;
>> -	u32 addr_ggtt, offset;
>>   
>> -	offset = guc_ads_capture_offset(guc);
>> -	addr_ggtt = intel_guc_ggtt_offset(guc, guc->ads_vma) + offset;
>> +	if (!iosys_map_is_null(&guc->ads_map)) {
>> +		capture_offset = guc_ads_capture_offset(guc);
>> +		ggtt = intel_guc_ggtt_offset(guc, guc->ads_vma) + capture_offset;
> This should just be capture_offset, right? ads_map is CPU mapped
> address that has nothing do with the GGTT address, it is just a pointer
> to the base of the ADS structure that can be accessed through the
> iosys_map* macros.

Good catch Matt...

note that "ggtt" is being used two ways in this function: [1] to memcpy 
content (register lists) and [2] to write a GGTT offset into members of 
ADS structure (the ptr to #1).

For the usage of [1] such as above, you are right, we shouldnt be 
including the vma's offset offsetting from ads_map. But for [2] we need 
both ads-offset + capture-offset.

for clarity, i can change the variable  name from "ggtt" to "ads_offset" 
and then reuse "capture_ggtt" with the rolling lists' ggtt offset.


  reply	other threads:[~2022-03-11 10:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-26  9:55 [Intel-gfx] [PATCH v7 00/13] Add GuC Error Capture Support Alan Previn
2022-02-26  9:55 ` [Intel-gfx] [PATCH v7 01/13] drm/i915/guc: Update GuC ADS size for error capture lists Alan Previn
2022-02-26 20:22   ` Teres Alexis, Alan Previn
2022-02-27 21:02   ` kernel test robot
2022-03-10  5:30   ` Matthew Brost
2022-03-11  9:59     ` Teres Alexis, Alan Previn [this message]
2022-03-11 10:18     ` Teres Alexis, Alan Previn
2022-02-26  9:55 ` [Intel-gfx] [PATCH v7 02/13] drm/i915/guc: Add XE_LP static registers for GuC error capture Alan Previn
2022-03-10  0:05   ` Umesh Nerlige Ramappa
2022-02-26  9:55 ` [Intel-gfx] [PATCH v7 03/13] drm/i915/guc: Add XE_LP steered register lists support Alan Previn
2022-03-10  0:56   ` Umesh Nerlige Ramappa
2022-02-26  9:55 ` [Intel-gfx] [PATCH v7 04/13] drm/i915/guc: Add DG2 registers for GuC error state capture Alan Previn
2022-03-10  1:53   ` Umesh Nerlige Ramappa
2022-02-26  9:55 ` [Intel-gfx] [PATCH v7 05/13] drm/i915/guc: Add Gen9 " Alan Previn
2022-02-26  9:55 ` [Intel-gfx] [PATCH v7 06/13] drm/i915/guc: Add GuC's error state capture output structures Alan Previn
2022-02-26  9:55 ` [Intel-gfx] [PATCH v7 07/13] drm/i915/guc: Update GuC-log relay function names Alan Previn
2022-02-26  9:55 ` [Intel-gfx] [PATCH v7 08/13] drm/i915/guc: Add capture region into intel_guc_log Alan Previn
2022-02-26  9:55 ` [Intel-gfx] [PATCH v7 09/13] drm/i915/guc: Check sizing of guc_capture output Alan Previn
2022-02-28 22:32   ` kernel test robot
2022-02-26  9:55 ` [Intel-gfx] [PATCH v7 10/13] drm/i915/guc: Extract GuC error capture lists on G2H notification Alan Previn
2022-03-11 18:16   ` Umesh Nerlige Ramappa
2022-03-11 22:27     ` Teres Alexis, Alan Previn
2022-02-26  9:55 ` [Intel-gfx] [PATCH v7 11/13] drm/i915/guc: Pre-allocate output nodes for extraction Alan Previn
2022-03-11 19:40   ` Umesh Nerlige Ramappa
2022-03-11 19:46     ` Teres Alexis, Alan Previn
2022-02-26  9:55 ` [Intel-gfx] [PATCH v7 12/13] drm/i915/guc: Plumb GuC-capture into gpu_coredump Alan Previn
2022-02-26  9:55 ` [Intel-gfx] [PATCH v7 13/13] drm/i915/guc: Print the GuC error capture output register list Alan Previn
2022-03-11  5:26   ` Umesh Nerlige Ramappa
2022-02-26 10:11 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Add GuC Error Capture Support (rev7) Patchwork
2022-02-26 10:12 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-26 10:43 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " 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=00efb6cf-4ea0-7c30-46fa-688e57ac391e@intel.com \
    --to=alan.previn.teres.alexis@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.brost@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