From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Kenneth Graunke <kenneth@whitecape.org>
Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org,
stable@vger.kernel.org
Subject: Re: [PATCH] drm/i915: Drop support for I915_EXEC_CONSTANTS_* execbuf parameters.
Date: Wed, 15 Feb 2017 14:59:32 +0200 [thread overview]
Message-ID: <1487163572.8490.29.camel@linux.intel.com> (raw)
In-Reply-To: <20170215104007.GU18048@nuc-i3427.alporthouse.com>
On ke, 2017-02-15 at 10:40 +0000, Chris Wilson wrote:
> On Wed, Feb 15, 2017 at 01:34:46AM -0800, Kenneth Graunke wrote:
> >
> > This patch makes the I915_PARAM_HAS_EXEC_CONSTANTS getparam return 0
> > (indicating the optional feature is not supported), and makes execbuf
> > always return -EINVAL if the flags are used.
> >
> > Apparently, no userspace ever shipped which used this optional feature:
> > I checked the git history of Mesa, xf86-video-intel, libva, and Beignet,
> > and there were zero commits showing a use of these flags. Kernel commit
> > 72bfa19c8deb4 apparently introduced the feature prematurely. According
> > to Chris, the intention was to use this in cairo-drm, but "the use was
> > broken for gen6", so I don't think it ever happened.
> >
> > 'relative_constants_mode' has always been tracked per-device, but this
> > has actually been wrong ever since hardware contexts were introduced, as
> > the INSTPM register is saved (and automatically restored) as part of the
> > render ring context. The software per-device value could therefore get
> > out of sync with the hardware per-context value. This meant that using
> > them is actually unsafe: a client which tried to use them could damage
> > the state of other clients, causing the GPU to interpret their BO
> > offsets as absolute pointers, leading to bogus memory reads.
> >
> > These flags were also never ported to execlist mode, making them no-ops
> > on Gen9+ (which requires execlists), and Gen8 in the default mode.
> >
> > On Gen8+, userspace can write these registers directly, achieving the
> > same effect. On Gen6-7.5, it likely makes sense to extend the command
> > parser to support them. I don't think anyone wants this on Gen4-5.
> >
> > Based on a patch by Dave Gordon.
> >
> > v3: Return -ENODEV for the getparam, as this is what we do for other
> > obsolete features. Suggested by Chris Wilson.
> >
> > Cc: stable@vger.kernel.org
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92448
> > Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
> > Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> [v2]
> > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> [v2]
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
<SNIP>
> Just give Daniel a chance to ack the ABI revert if he cares...
I'm just thinking this might break an application which does the
feature detection and only understands 0 or 1.
Either way, with A-b from Daniel, this too is;
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
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: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Kenneth Graunke <kenneth@whitecape.org>
Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org,
daniel.vetter@ffwll.ch
Subject: Re: [PATCH] drm/i915: Drop support for I915_EXEC_CONSTANTS_* execbuf parameters.
Date: Wed, 15 Feb 2017 14:59:32 +0200 [thread overview]
Message-ID: <1487163572.8490.29.camel@linux.intel.com> (raw)
In-Reply-To: <20170215104007.GU18048@nuc-i3427.alporthouse.com>
On ke, 2017-02-15 at 10:40 +0000, Chris Wilson wrote:
> On Wed, Feb 15, 2017 at 01:34:46AM -0800, Kenneth Graunke wrote:
> >
> > This patch makes the I915_PARAM_HAS_EXEC_CONSTANTS getparam return 0
> > (indicating the optional feature is not supported), and makes execbuf
> > always return -EINVAL if the flags are used.
> >
> > Apparently, no userspace ever shipped which used this optional feature:
> > I checked the git history of Mesa, xf86-video-intel, libva, and Beignet,
> > and there were zero commits showing a use of these flags. Kernel commit
> > 72bfa19c8deb4 apparently introduced the feature prematurely. According
> > to Chris, the intention was to use this in cairo-drm, but "the use was
> > broken for gen6", so I don't think it ever happened.
> >
> > 'relative_constants_mode' has always been tracked per-device, but this
> > has actually been wrong ever since hardware contexts were introduced, as
> > the INSTPM register is saved (and automatically restored) as part of the
> > render ring context. The software per-device value could therefore get
> > out of sync with the hardware per-context value. This meant that using
> > them is actually unsafe: a client which tried to use them could damage
> > the state of other clients, causing the GPU to interpret their BO
> > offsets as absolute pointers, leading to bogus memory reads.
> >
> > These flags were also never ported to execlist mode, making them no-ops
> > on Gen9+ (which requires execlists), and Gen8 in the default mode.
> >
> > On Gen8+, userspace can write these registers directly, achieving the
> > same effect. On Gen6-7.5, it likely makes sense to extend the command
> > parser to support them. I don't think anyone wants this on Gen4-5.
> >
> > Based on a patch by Dave Gordon.
> >
> > v3: Return -ENODEV for the getparam, as this is what we do for other
> > obsolete features. Suggested by Chris Wilson.
> >
> > Cc: stable@vger.kernel.org
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92448
> > Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
> > Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> [v2]
> > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> [v2]
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
<SNIP>
> Just give Daniel a chance to ack the ABI revert if he cares...
I'm just thinking this might break an application which does the
feature detection and only understands 0 or 1.
Either way, with A-b from Daniel, this too is;
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
next prev parent reply other threads:[~2017-02-15 12:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 9:34 [PATCH] drm/i915: Drop support for I915_EXEC_CONSTANTS_* execbuf parameters Kenneth Graunke
2017-02-15 9:34 ` Kenneth Graunke
2017-02-15 10:40 ` Chris Wilson
2017-02-15 12:59 ` Joonas Lahtinen [this message]
2017-02-15 12:59 ` Joonas Lahtinen
2017-02-15 12:22 ` ✓ Fi.CI.BAT: success for drm/i915: Drop support for I915_EXEC_CONSTANTS_* execbuf parameters. (rev3) Patchwork
2017-02-24 17:53 ` [PATCH] drm/i915: Drop support for I915_EXEC_CONSTANTS_* execbuf parameters Chris Wilson
-- strict thread matches above, loose matches on Subject: below --
2017-03-13 16:14 Fixes that failed to backport to v4.11-rc1 Jani Nikula
2017-03-13 17:04 ` [PATCH] drm/i915: Drop support for I915_EXEC_CONSTANTS_* execbuf parameters Chris Wilson
2017-02-15 2:33 Kenneth Graunke
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=1487163572.8490.29.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=kenneth@whitecape.org \
--cc=stable@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.