From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Jason Ekstrand <jason@jlekstrand.net>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/1] drm/i915: Disable pread/pwrite ioctl's for future platforms (v2)
Date: Thu, 11 Mar 2021 19:28:31 -0800 [thread overview]
Message-ID: <87o8fp6of4.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20210311202017.1133327-2-jason@jlekstrand.net>
On Thu, 11 Mar 2021 12:20:17 -0800, Jason Ekstrand wrote:
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index b2e3b5cfccb4a..78ad5a9dd4784 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -374,10 +374,19 @@ int
> i915_gem_pread_ioctl(struct drm_device *dev, void *data,
> struct drm_file *file)
> {
> + struct drm_i915_private *i915 = to_i915(dev);
> struct drm_i915_gem_pread *args = data;
> struct drm_i915_gem_object *obj;
> int ret;
>
> + /* Pread is disallowed for all platforms after TGL-LP */
> + if (INTEL_GEN(i915) >= 12 && !IS_TIGERLAKE(i915))
> + return -EOPNOTSUPP;
> +
> + /* All discrete memory platforms are Gen12 or above */
> + if (WARN_ON(HAS_LMEM(i915)))
> + return -EOPNOTSUPP;
Not sure but you are probably trying to make it explicit that pread/pwrite
are truly gone on dGfx? Because real dGfx are Gen12+ the code will return
from the first if statement and never get to the second if statement. And
there's talk on the relocation thread about tripping fake LMEM here for
platforms prior to Gen12.
So I'd suggest get rid of this second if statement and only retain the
first (for both pread and pwrite) since that seems to be entirely
sufficient.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2021-03-12 3:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 22:40 [Intel-gfx] [PATCH 0/1] drm/i915: Start disabling pread/pwrite ioctl's for future platforms Ashutosh Dixit
2021-01-22 22:40 ` [Intel-gfx] [PATCH 1/1] " Ashutosh Dixit
2021-03-10 21:37 ` Jason Ekstrand
2021-01-23 2:36 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-01-23 13:05 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-01-24 23:54 ` Dixit, Ashutosh
2021-01-25 2:36 ` Vudum, Lakshminarayana
2021-01-25 2:35 ` [Intel-gfx] ✓ Fi.CI.IGT: success " Patchwork
2021-03-11 20:20 ` [Intel-gfx] [PATCH 0/1]drm/i915: Disable pread/pwrite ioctl's for future platforms (v2) Jason Ekstrand
2021-03-11 20:20 ` [Intel-gfx] [PATCH 1/1] drm/i915: " Jason Ekstrand
2021-03-12 3:28 ` Dixit, Ashutosh [this message]
2021-03-12 11:37 ` Maarten Lankhorst
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=87o8fp6of4.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jason@jlekstrand.net \
/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