From: Matthew Auld <matthew.auld@intel.com>
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [CI 2/2] drm/i915: limit the async bind to bind_async_flags
Date: Fri, 4 Mar 2022 17:28:33 +0000 [thread overview]
Message-ID: <3bb37dc6-85a5-eb24-f474-8b393479eab9@intel.com> (raw)
In-Reply-To: <fe19ddd39d48916c382e5bfe1c6a9f720358728b.camel@linux.intel.com>
On 04/03/2022 16:41, Thomas Hellström wrote:
> On Fri, 2022-03-04 at 09:59 +0000, Matthew Auld wrote:
>> If the vm doesn't request async binding, like for example with the
>> dpt,
>> then we should be able to skip the async path and avoid calling
>> i915_vm_lock_objects() altogether. Currently if we have a moving
>> fence
>> set for the BO(even though it might have signalled), we still take
>> the
>> async patch regardless of the bind_async setting, and then later
>> still
>> end up just doing i915_gem_object_wait_moving_fence() anyway.
>>
>> Alternatively we would need to add dummy scratch object which can be
>> locked, just for the dpt.
>>
>> Suggested-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
>> Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
>> ---
>> drivers/gpu/drm/i915/i915_vma.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_vma.c
>> b/drivers/gpu/drm/i915/i915_vma.c
>> index 94fcdb7bd21d..4d4d3659c938 100644
>> --- a/drivers/gpu/drm/i915/i915_vma.c
>> +++ b/drivers/gpu/drm/i915/i915_vma.c
>> @@ -1360,8 +1360,7 @@ int i915_vma_pin_ww(struct i915_vma *vma,
>> struct i915_gem_ww_ctx *ww,
>> if (flags & PIN_GLOBAL)
>> wakeref = intel_runtime_pm_get(&vma->vm->i915-
>>> runtime_pm);
>>
>> - moving = vma->obj ?
>
> Is there a chance that "moving" will be used uninitialized later?
It looks to be initialised with NULL further up.
>
>
>> i915_gem_object_get_moving_fence(vma->obj) : NULL;
>> - if (flags & vma->vm->bind_async_flags || moving) {
>> + if (flags & vma->vm->bind_async_flags) {
>> /* lock VM */
>> err = i915_vm_lock_objects(vma->vm, ww);
>> if (err)
>> @@ -1375,6 +1374,7 @@ int i915_vma_pin_ww(struct i915_vma *vma,
>> struct i915_gem_ww_ctx *ww,
>>
>> work->vm = i915_vm_get(vma->vm);
>>
>> + moving = vma->obj ?
>> i915_gem_object_get_moving_fence(vma->obj) : NULL;
>
> IIRC, with Maarten's recent changes, vma->obj is always non-NULL.
Yup, a number of these seem to have crept back in. I was going to send a
follow up patch to fix all of them at once.
>
> Otherwise LGTM.
> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Thanks.
>
>
>> dma_fence_work_chain(&work->base, moving);
>>
>> /* Allocate enough page directories to used PTE */
>
> /Thomas
>
>
next prev parent reply other threads:[~2022-03-04 17:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-04 9:59 [Intel-gfx] [CI 1/2] drm/i915/fbdev: fixup setting screen_size Matthew Auld
2022-03-04 9:59 ` [Intel-gfx] [CI 2/2] drm/i915: limit the async bind to bind_async_flags Matthew Auld
2022-03-04 16:41 ` Thomas Hellström
2022-03-04 17:28 ` Matthew Auld [this message]
2022-03-04 12:04 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [CI,1/2] drm/i915/fbdev: fixup setting screen_size Patchwork
2022-03-04 17:22 ` [Intel-gfx] [CI 1/2] " Thomas Hellström (Intel)
2022-03-04 23:32 ` [Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [CI,1/2] " 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=3bb37dc6-85a5-eb24-f474-8b393479eab9@intel.com \
--to=matthew.auld@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=thomas.hellstrom@linux.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