Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@linux.intel.com>
To: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: intel-gfx@lists.freedesktop.org, saurabhg.gupta@intel.com,
	matthew.d.roper@intel.com, lionel.g.landwerlin@intel.com,
	chris.p.wilson@linux.intel.com, brian.welty@intel.com
Subject: Re: [PATCH v2] drm/i915/gem: Execbuffer objects must have struct pages.
Date: Thu, 14 Mar 2024 14:51:14 +0100	[thread overview]
Message-ID: <ZfMA0gxTBOScdyy3@ashyti-mobl2.lan> (raw)
In-Reply-To: <20240312145506.3091929-1-jonathan.cavitt@intel.com>

Hi Jonathan,

On Tue, Mar 12, 2024 at 07:55:06AM -0700, Jonathan Cavitt wrote:
> We cannot write requests to objects without struct pages, so escape
> early if the requests are bound to objects that lack them.
> 
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>

is this a fix? Do you need

Fixes: 544460c33821 ("drm/i915: Multi-BB execbuf")
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <stable@vger.kernel.org> # v5.16+

?

Andi

> ---
> 
> v2: s/vma-obj/vma->obj
> 
>  drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> index d3a771afb083e..adb4f9e78cb49 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> @@ -3313,6 +3313,13 @@ eb_requests_create(struct i915_execbuffer *eb, struct dma_fence *in_fence,
>  	unsigned int i;
>  
>  	for_each_batch_create_order(eb, i) {
> +		/* Do not write requests to objects without struct pages. */
> +		if (eb->batches[i]->vma &&
> +		    !i915_gem_object_has_struct_page(eb->batches[i]->vma->obj)) {
> +			out_fence = ERR_PTR(-EINVAL);
> +			return out_fence;
> +		}
> +
>  		/* Allocate a request for this batch buffer nice and early. */
>  		eb->requests[i] = i915_request_create(eb_find_context(eb, i));
>  		if (IS_ERR(eb->requests[i])) {
> -- 
> 2.25.1

  parent reply	other threads:[~2024-03-14 13:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 14:55 [PATCH v2] drm/i915/gem: Execbuffer objects must have struct pages Jonathan Cavitt
2024-03-12 19:06 ` ✗ Fi.CI.BAT: failure for drm/i915/gem: Execbuffer objects must have struct pages. (rev2) Patchwork
2024-03-14 13:51 ` Andi Shyti [this message]
2024-03-14 16:41 ` [PATCH v2] drm/i915/gem: Execbuffer objects must have struct pages Nirmoy Das

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=ZfMA0gxTBOScdyy3@ashyti-mobl2.lan \
    --to=andi.shyti@linux.intel.com \
    --cc=brian.welty@intel.com \
    --cc=chris.p.wilson@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jonathan.cavitt@intel.com \
    --cc=lionel.g.landwerlin@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=saurabhg.gupta@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