public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Don't try to set INSTPM for the _ABSOLUTE constant buffer address
Date: Tue, 24 Feb 2015 00:24:19 +0100	[thread overview]
Message-ID: <20150223232419.GU24485@phenom.ffwll.local> (raw)
In-Reply-To: <1424111111-23853-2-git-send-email-damien.lespiau@intel.com>

On Mon, Feb 16, 2015 at 06:25:11PM +0000, Damien Lespiau wrote:
> Gen9 bit to control whether the 3DSTATE_CONSTANT_* address should be an
> offset against the Dynamic State Base Address Vs an absolute address has
> moved to a different register.
> 
> As no-one complained yet and I don't see any use of the
> I915_EXEC_CONSTANTS_ABSOLUTE flag in either the DDX, mesa, libdrm or
> libva, I'm taking the opportunity to deprecate the flag on gen9 (it
> never worked in the first place).
> 
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

Patch to igt/gem_exec_params seems to be missing ...
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 13 ++++++++++++-
>  include/uapi/drm/i915_drm.h      |  2 +-
>  2 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 896641a..836356a 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -647,6 +647,16 @@ int intel_execlists_submission(struct drm_device *dev, struct drm_file *file,
>  	case I915_EXEC_CONSTANTS_REL_GENERAL:
>  	case I915_EXEC_CONSTANTS_ABSOLUTE:
>  	case I915_EXEC_CONSTANTS_REL_SURFACE:
> +		if (instp_mode != 0 && INTEL_INFO(dev)->gen >= 9) {
> +			/*
> +			 * While it's possible to implement _ABSOLUTE, noone
> +			 * complained when it was broken, so let's simplify the
> +			 * driver by not supporting it until further notice.
> +			 */
> +			DRM_DEBUG("no rel constants on gen9+\n");
> +			return -EINVAL;
> +		}
> +
>  		if (instp_mode != 0 && ring != &dev_priv->ring[RCS]) {
>  			DRM_DEBUG("non-0 rel constants mode on non-RCS\n");
>  			return -EINVAL;
> @@ -691,7 +701,8 @@ int intel_execlists_submission(struct drm_device *dev, struct drm_file *file,
>  	if (ret)
>  		return ret;
>  
> -	if (instp_mode != dev_priv->relative_constants_mode &&
> +	/* We deprecated the I915_EXEC_CONSTANTS on gen9+, for lack of user */
> +	if (instp_mode != dev_priv->relative_constants_mode && IS_GEN8(dev) &&
>  	    ring == &dev_priv->ring[RCS]) {
>  		ret = intel_logical_ring_begin(ringbuf, ctx, 4);
>  		if (ret)
> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> index 6eed16b..d7c17b7 100644
> --- a/include/uapi/drm/i915_drm.h
> +++ b/include/uapi/drm/i915_drm.h
> @@ -715,7 +715,7 @@ struct drm_i915_gem_execbuffer2 {
>   */
>  #define I915_EXEC_CONSTANTS_MASK 	(3<<6)
>  #define I915_EXEC_CONSTANTS_REL_GENERAL (0<<6) /* default */
> -#define I915_EXEC_CONSTANTS_ABSOLUTE 	(1<<6)
> +#define I915_EXEC_CONSTANTS_ABSOLUTE 	(1<<6) /* gen 4/5/6/7/8 only */
>  #define I915_EXEC_CONSTANTS_REL_SURFACE (2<<6) /* gen4/5 only */
>  	__u64 flags;
>  	__u64 rsvd1; /* now used for context info */
> -- 
> 1.8.3.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2015-02-23 23:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-16 18:25 [PATCH 1/2] drm/i915: Re-order some checks to do the unlikely one first Damien Lespiau
2015-02-16 18:25 ` [PATCH 2/2] drm/i915: Don't try to set INSTPM for the _ABSOLUTE constant buffer address Damien Lespiau
2015-02-17  5:45   ` shuang.he
2015-02-23 23:24   ` Daniel Vetter [this message]
2015-02-16 21:03 ` [PATCH 1/2] drm/i915: Re-order some checks to do the unlikely one first Chris Wilson
2015-02-17 11:48   ` Damien Lespiau
2015-02-17 21:10     ` Chris Wilson
2015-02-19 10:26   ` Dave Gordon

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=20150223232419.GU24485@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=damien.lespiau@intel.com \
    --cc=intel-gfx@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox