From patchwork Wed Apr 28 17:30:21 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: 12229861 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,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 75718C433B4 for ; Wed, 28 Apr 2021 17:32:42 +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 03E06613DC for ; Wed, 28 Apr 2021 17:32:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03E06613DC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1D2756E153; Wed, 28 Apr 2021 17:32:41 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 206636E153; Wed, 28 Apr 2021 17:32:38 +0000 (UTC) IronPort-SDR: Cm8omRjS9a+GfjzWQjBcb9jq7tBuPO627Z3yl0LZpKJqcU57l0yio0Lf05Maq7VAk+xnA1lxxi y2LcRRJb1yHA== X-IronPort-AV: E=McAfee;i="6200,9189,9968"; a="196361200" X-IronPort-AV: E=Sophos;i="5.82,258,1613462400"; d="scan'208";a="196361200" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2021 10:32:38 -0700 IronPort-SDR: EmXh6xiYmiUP1mmuPSRArhdxX2bXu64mdkT7O8S6LS92/qFws5pNhmQDCxJEF3Q7kOs/RDbwHN ZP5TAwm/Tt7Q== X-IronPort-AV: E=Sophos;i="5.82,258,1613462400"; d="scan'208";a="430411281" Received: from mpawliki-mobl.amr.corp.intel.com (HELO zkempczy-mobl2.ger.corp.intel.com) ([10.213.23.190]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2021 10:32:36 -0700 From: =?utf-8?q?Zbigniew_Kempczy=C5=84ski?= To: intel-gfx@lists.freedesktop.org Subject: [PATCH] drm/i915: Add relocation exceptions for two other platforms Date: Wed, 28 Apr 2021 19:30:21 +0200 Message-Id: <20210428173021.38241-1-zbigniew.kempczynski@intel.com> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dave Airlie , =?utf-8?q?Zbigniew_Kempczy=C5=84ski?= , Jason Ekstrand , dri-devel@lists.freedesktop.org, Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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. As Alderlake is coming in two variants - S and P and only S landed upstream already we will need to extend the relocation enabling condition one more time for P version in the future. Signed-off-by: Zbigniew KempczyƄski Cc: Dave Airlie Cc: Daniel Vetter Cc: Jason Ekstrand --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 9 ++++++--- 1 file changed, 6 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..6d621898698f 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c @@ -496,11 +496,14 @@ 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))) return -EINVAL; if (unlikely(entry->flags & eb->invalid_flags))