From patchwork Mon Feb 16 18:25:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lespiau, Damien" X-Patchwork-Id: 5834341 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9C53D9F691 for ; Mon, 16 Feb 2015 18:25:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C441D20211 for ; Mon, 16 Feb 2015 18:25:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E0796201FA for ; Mon, 16 Feb 2015 18:25:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 445B96E07F; Mon, 16 Feb 2015 10:25:15 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id 6A4996E05E for ; Mon, 16 Feb 2015 10:25:13 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 16 Feb 2015 10:17:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,589,1418112000"; d="scan'208";a="678766593" Received: from fcrouzet-mobl1.ger.corp.intel.com (HELO strange.ger.corp.intel.com) ([10.252.18.225]) by fmsmga002.fm.intel.com with ESMTP; 16 Feb 2015 10:25:11 -0800 From: Damien Lespiau To: intel-gfx@lists.freedesktop.org Date: Mon, 16 Feb 2015 18:25:11 +0000 Message-Id: <1424111111-23853-2-git-send-email-damien.lespiau@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1424111111-23853-1-git-send-email-damien.lespiau@intel.com> References: <1424111111-23853-1-git-send-email-damien.lespiau@intel.com> Subject: [Intel-gfx] [PATCH 2/2] drm/i915: Don't try to set INSTPM for the _ABSOLUTE constant buffer address X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com) --- 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 */