dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Das, Nirmoy" <nirmoy.das@intel.com>
To: Matthew Auld <matthew.auld@intel.com>, <intel-gfx@lists.freedesktop.org>
Cc: Chris Wilson <chris.p.wilson@linux.intel.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Improve debug print in vm_fault_ttm
Date: Fri, 23 Sep 2022 09:27:54 +0200	[thread overview]
Message-ID: <1b51233c-6050-5417-0349-fa37a07731d2@intel.com> (raw)
In-Reply-To: <c9e90c5a-eb2d-0414-5b88-9691ba0c02eb@intel.com>


On 9/22/2022 6:38 PM, Matthew Auld wrote:
> On 22/09/2022 13:09, Nirmoy Das wrote:
>> Print the error code returned by __i915_ttm_migrate()
>> for better debuggability.
>>
>> References: https://gitlab.freedesktop.org/drm/intel/-/issues/6889
>> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
>> ---
>>   drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c 
>> b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>> index e3fc38dd5db0..9619c0fe1025 100644
>> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
>> @@ -1034,7 +1034,7 @@ static vm_fault_t vm_fault_ttm(struct vm_fault 
>> *vmf)
>>           }
>>             if (err) {
>> -            drm_dbg(dev, "Unable to make resource CPU accessible\n");
>> +            drm_dbg(dev, "Unable to make resource CPU accessible(err 
>> = %pe)\n", err);
>
> Yeah, looks useful. I think for that bug the object is just too large 
> for the mappable part of lmem, so this just gives -2big or similar on 
> small-bar systems. I presume that the test needs to be updated to 
> account for the cpu_size or so.


Yeah, can't think of any other case. The test need to be updated, going 
to send out igt fixes for this.

>
> With the kernel test robot warning fixed:
> Acked-by: Matthew Auld <matthew.auld@intel.com>


Thanks, I will resend a updated one.

>
> I looked at the GEM_BUG_ON(rq->reserved_space > ring->space), and I 
> think the issue is maybe with emit_pte() using the ring->space to 
> manually figure out the number of dwords it can emit (instead of the 
> usual ring_begin()), which I guess works, but if we are unlucky and 
> get interrupted (like with a very well timed sigbus here), while 
> waiting for more ring space and end up bailing early, we might have 
> trampled over the reserved_space when submitting the request. I guess 
> normally the next ring_begin() would take care of the reserved_space, 
> like when constructing the actual copy packet.


I am not so familiar with the code but sounds logical.


Nirmoy

>
>> dma_resv_unlock(bo->base.resv);
>>               ret = VM_FAULT_SIGBUS;
>>               goto out_rpm;

      reply	other threads:[~2022-09-23  7:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 12:09 [PATCH] drm/i915: Improve debug print in vm_fault_ttm Nirmoy Das
2022-09-22 14:24 ` [Intel-gfx] " kernel test robot
2022-09-22 16:25 ` kernel test robot
2022-09-22 16:38 ` Matthew Auld
2022-09-23  7:27   ` Das, Nirmoy [this message]

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=1b51233c-6050-5417-0349-fa37a07731d2@intel.com \
    --to=nirmoy.das@intel.com \
    --cc=chris.p.wilson@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@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