From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: Matthew Auld <matthew.auld@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 6/7] drm/i915: don't allocate the ring in stolen if we lack aperture
Date: Tue, 29 Oct 2019 14:46:46 -0700 [thread overview]
Message-ID: <b5e6ac2b-2b3a-d6f8-5df7-7e8f3c870874@intel.com> (raw)
In-Reply-To: <20191029095856.25431-6-matthew.auld@intel.com>
On 10/29/19 2:58 AM, Matthew Auld wrote:
> Since we have no way access it from the CPU. For such cases just
> fallback to internal objects.
>
Since the problem is not limited to rings but it applies to all stolen
objects, wouldn't it be better to just skip the stolen initialization or
return an error from i915_gem_object_create_stolen()?
Daniele
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_ring.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_ring.c b/drivers/gpu/drm/i915/gt/intel_ring.c
> index fa01c1407760..ece20504d240 100644
> --- a/drivers/gpu/drm/i915/gt/intel_ring.c
> +++ b/drivers/gpu/drm/i915/gt/intel_ring.c
> @@ -108,7 +108,9 @@ static struct i915_vma *create_ring_vma(struct i915_ggtt *ggtt, int size)
> struct drm_i915_gem_object *obj;
> struct i915_vma *vma;
>
> - obj = i915_gem_object_create_stolen(i915, size);
> + obj = ERR_PTR(-ENODEV);
> + if (i915_ggtt_has_aperture(ggtt))
> + obj = i915_gem_object_create_stolen(i915, size);
> if (IS_ERR(obj))
> obj = i915_gem_object_create_internal(i915, size);
> if (IS_ERR(obj))
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: Matthew Auld <matthew.auld@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 6/7] drm/i915: don't allocate the ring in stolen if we lack aperture
Date: Tue, 29 Oct 2019 14:46:46 -0700 [thread overview]
Message-ID: <b5e6ac2b-2b3a-d6f8-5df7-7e8f3c870874@intel.com> (raw)
Message-ID: <20191029214646.970WegBm_al168ZnHsd5JBkkef2amG3T-LMSwSasxow@z> (raw)
In-Reply-To: <20191029095856.25431-6-matthew.auld@intel.com>
On 10/29/19 2:58 AM, Matthew Auld wrote:
> Since we have no way access it from the CPU. For such cases just
> fallback to internal objects.
>
Since the problem is not limited to rings but it applies to all stolen
objects, wouldn't it be better to just skip the stolen initialization or
return an error from i915_gem_object_create_stolen()?
Daniele
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_ring.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_ring.c b/drivers/gpu/drm/i915/gt/intel_ring.c
> index fa01c1407760..ece20504d240 100644
> --- a/drivers/gpu/drm/i915/gt/intel_ring.c
> +++ b/drivers/gpu/drm/i915/gt/intel_ring.c
> @@ -108,7 +108,9 @@ static struct i915_vma *create_ring_vma(struct i915_ggtt *ggtt, int size)
> struct drm_i915_gem_object *obj;
> struct i915_vma *vma;
>
> - obj = i915_gem_object_create_stolen(i915, size);
> + obj = ERR_PTR(-ENODEV);
> + if (i915_ggtt_has_aperture(ggtt))
> + obj = i915_gem_object_create_stolen(i915, size);
> if (IS_ERR(obj))
> obj = i915_gem_object_create_internal(i915, size);
> if (IS_ERR(obj))
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-10-29 21:47 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-29 9:58 [PATCH 1/7] drm/i915: define i915_ggtt_has_aperture Matthew Auld
2019-10-29 9:58 ` [Intel-gfx] " Matthew Auld
2019-10-29 9:58 ` [PATCH 2/7] drm/i915: do not map aperture if it is not available Matthew Auld
2019-10-29 9:58 ` [Intel-gfx] " Matthew Auld
2019-10-29 10:04 ` Chris Wilson
2019-10-29 10:04 ` [Intel-gfx] " Chris Wilson
2019-10-29 9:58 ` [PATCH 3/7] drm/i915: set num_fence_regs to 0 if there is no aperture Matthew Auld
2019-10-29 9:58 ` [Intel-gfx] " Matthew Auld
2019-10-29 10:06 ` Chris Wilson
2019-10-29 10:06 ` [Intel-gfx] " Chris Wilson
2019-10-29 21:23 ` Daniele Ceraolo Spurio
2019-10-29 21:23 ` [Intel-gfx] " Daniele Ceraolo Spurio
2019-10-29 21:44 ` Chris Wilson
2019-10-29 21:44 ` [Intel-gfx] " Chris Wilson
2019-10-29 21:50 ` Daniele Ceraolo Spurio
2019-10-29 21:50 ` [Intel-gfx] " Daniele Ceraolo Spurio
2019-10-29 9:58 ` [PATCH 4/7] drm/i915: error capture with no ggtt slot Matthew Auld
2019-10-29 9:58 ` [Intel-gfx] " Matthew Auld
2019-10-29 10:06 ` Chris Wilson
2019-10-29 10:06 ` [Intel-gfx] " Chris Wilson
2019-10-29 9:58 ` [PATCH 5/7] drm/i915: Don't try to place HWS in non-existing mappable region Matthew Auld
2019-10-29 9:58 ` [Intel-gfx] " Matthew Auld
2019-10-29 10:07 ` Chris Wilson
2019-10-29 10:07 ` [Intel-gfx] " Chris Wilson
2019-10-29 9:58 ` [PATCH 6/7] drm/i915: don't allocate the ring in stolen if we lack aperture Matthew Auld
2019-10-29 9:58 ` [Intel-gfx] " Matthew Auld
2019-10-29 10:08 ` Chris Wilson
2019-10-29 10:08 ` [Intel-gfx] " Chris Wilson
2019-10-29 21:46 ` Daniele Ceraolo Spurio [this message]
2019-10-29 21:46 ` Daniele Ceraolo Spurio
2019-10-29 21:51 ` Chris Wilson
2019-10-29 21:51 ` [Intel-gfx] " Chris Wilson
2019-10-29 21:59 ` Daniele Ceraolo Spurio
2019-10-29 21:59 ` [Intel-gfx] " Daniele Ceraolo Spurio
2019-10-29 9:58 ` [PATCH 7/7] drm/i915/selftests: check for missing aperture Matthew Auld
2019-10-29 9:58 ` [Intel-gfx] " Matthew Auld
2019-10-29 10:09 ` Chris Wilson
2019-10-29 10:09 ` [Intel-gfx] " Chris Wilson
2019-10-29 10:02 ` [PATCH 1/7] drm/i915: define i915_ggtt_has_aperture Chris Wilson
2019-10-29 10:02 ` [Intel-gfx] " Chris Wilson
2019-10-29 10:17 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/7] " Patchwork
2019-10-29 10:17 ` [Intel-gfx] " Patchwork
2019-10-29 10:20 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-10-29 10:20 ` [Intel-gfx] " Patchwork
2019-10-29 10:37 ` ✓ Fi.CI.BAT: success " Patchwork
2019-10-29 10:37 ` [Intel-gfx] " Patchwork
2019-10-29 21:16 ` ✓ Fi.CI.IGT: " Patchwork
2019-10-29 21:16 ` [Intel-gfx] " 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=b5e6ac2b-2b3a-d6f8-5df7-7e8f3c870874@intel.com \
--to=daniele.ceraolospurio@intel.com \
--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