From patchwork Tue May 11 08:31:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Zbigniew_Kempczy=C5=84ski?= X-Patchwork-Id: 12250165 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA5B7C433B4 for ; Tue, 11 May 2021 08:32:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7CCE261184 for ; Tue, 11 May 2021 08:32:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CCE261184 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 76F166E9FB; Tue, 11 May 2021 08:32:23 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id B09CA6E9FB; Tue, 11 May 2021 08:32:22 +0000 (UTC) IronPort-SDR: zlzrQYh7lHgdYF7gpbHcWcEEs0P9PJfgQLDn/q4Cj/QmW5mAv+bnuDgSqe7Q+f6sB6L3BfSnYh xNnuLk3Tx1Yg== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="179651136" X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="179651136" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2021 01:32:21 -0700 IronPort-SDR: w+iIbNQnjIB14dxuwNOmIJ33exvw/vVkF1kPPMYxqsy7e9n8/4APwne3krV9+DUzQ8qhKd7Tzo U2/8n4bc8wfw== X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="471058871" Received: from dartyukh-mobl2.ger.corp.intel.com (HELO zkempczy-mobl2.ger.corp.intel.com) ([10.213.3.239]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2021 01:32:00 -0700 From: =?utf-8?q?Zbigniew_Kempczy=C5=84ski?= To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Date: Tue, 11 May 2021 10:31:39 +0200 Message-Id: <20210511083139.54002-1-zbigniew.kempczynski@intel.com> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] drm/i915: Add relocation exceptions for two other platforms X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dave Airlie , Daniel Vetter Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" We have established previously we stop using relocations starting from gen12 platforms with Tigerlake as an exception. Unfortunately we need extend transition period and support relocations for two other igfx platforms - Rocketlake and Alderlake. Signed-off-by: Zbigniew KempczyƄski Cc: Dave Airlie Cc: Daniel Vetter Cc: Jason Ekstrand --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c index 297143511f99..f80da1d6d9b2 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c @@ -496,11 +496,15 @@ eb_validate_vma(struct i915_execbuffer *eb, struct drm_i915_gem_exec_object2 *entry, struct i915_vma *vma) { - /* Relocations are disallowed for all platforms after TGL-LP. This - * also covers all platforms with local memory. + /* + * Relocations are disallowed starting from gen12 with some exceptions + * - TGL/RKL/ADL. */ if (entry->relocation_count && - INTEL_GEN(eb->i915) >= 12 && !IS_TIGERLAKE(eb->i915)) + INTEL_GEN(eb->i915) >= 12 && !(IS_TIGERLAKE(eb->i915) || + IS_ROCKETLAKE(eb->i915) || + IS_ALDERLAKE_S(eb->i915) || + IS_ALDERLAKE_P(eb->i915))) return -EINVAL; if (unlikely(entry->flags & eb->invalid_flags))