From: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Matthew Auld <matthew.auld@intel.com>
Subject: Re: [PATCH] drm/i915/gem: Early rejection of no-aperture map_ggtt
Date: Tue, 5 Nov 2019 17:20:47 +0200 [thread overview]
Message-ID: <bd7ccfa0-cb34-8dec-10cd-27b060d1c340@linux.intel.com> (raw)
In-Reply-To: <20191105145305.14314-1-chris@chris-wilson.co.uk>
On 05/11/2019 16.53, Chris Wilson wrote:
> If the device does not have an aperture through which we can indirectly
> access and detile the buffers, simply reject the ioctl. Later we can
> extend the ioctl to support different modes, but as an extension the
> user must opt in and explicitly control the mmap type (viz
> MMAP_OFFSET_IOCTL).
Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_mman.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> index e3002849844b..d60973603cc1 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> @@ -450,6 +450,9 @@ i915_gem_mmap_gtt(struct drm_file *file,
> struct drm_i915_gem_object *obj;
> int ret;
>
> + if (!i915_ggtt_has_aperture(&to_i915(dev)->ggtt))
> + return -ENODEV;
> +
> obj = i915_gem_object_lookup(file, handle);
> if (!obj)
> return -ENOENT;
>
_______________________________________________
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: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Matthew Auld <matthew.auld@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/gem: Early rejection of no-aperture map_ggtt
Date: Tue, 5 Nov 2019 17:20:47 +0200 [thread overview]
Message-ID: <bd7ccfa0-cb34-8dec-10cd-27b060d1c340@linux.intel.com> (raw)
Message-ID: <20191105152047.1cgSCsIIMmErcT85pOs_FhQaeWapve2bUtq5lJ-NWfc@z> (raw)
In-Reply-To: <20191105145305.14314-1-chris@chris-wilson.co.uk>
On 05/11/2019 16.53, Chris Wilson wrote:
> If the device does not have an aperture through which we can indirectly
> access and detile the buffers, simply reject the ioctl. Later we can
> extend the ioctl to support different modes, but as an extension the
> user must opt in and explicitly control the mmap type (viz
> MMAP_OFFSET_IOCTL).
Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_mman.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> index e3002849844b..d60973603cc1 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> @@ -450,6 +450,9 @@ i915_gem_mmap_gtt(struct drm_file *file,
> struct drm_i915_gem_object *obj;
> int ret;
>
> + if (!i915_ggtt_has_aperture(&to_i915(dev)->ggtt))
> + return -ENODEV;
> +
> obj = i915_gem_object_lookup(file, handle);
> if (!obj)
> return -ENOENT;
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-11-05 15:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 14:53 [PATCH] drm/i915/gem: Early rejection of no-aperture map_ggtt Chris Wilson
2019-11-05 14:53 ` [Intel-gfx] " Chris Wilson
2019-11-05 15:20 ` Abdiel Janulgue [this message]
2019-11-05 15:20 ` Abdiel Janulgue
2019-11-05 17:36 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-11-05 17:36 ` [Intel-gfx] " Patchwork
2019-11-06 10:47 ` ✓ Fi.CI.IGT: " Patchwork
2019-11-06 10:47 ` [Intel-gfx] " Patchwork
2019-11-06 11:57 ` [PATCH] " Joonas Lahtinen
2019-11-06 11:57 ` [Intel-gfx] " Joonas Lahtinen
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=bd7ccfa0-cb34-8dec-10cd-27b060d1c340@linux.intel.com \
--to=abdiel.janulgue@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--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