From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id DE2E8C3DA7A for ; Fri, 6 Jan 2023 10:38:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EE93F10E85B; Fri, 6 Jan 2023 10:38:49 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7F0A410E85B; Fri, 6 Jan 2023 10:38:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673001527; x=1704537527; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=RXEOTWGJesZYNwY1dLKYW7Mjw/ctUqOL/IDqKg4sjE0=; b=QYa97EhsRpEIbzMJwjb9iGJwkt66oRvmKX//qk8bWo875cXq8USXg5LO fpNDTE12z5uqyoPopURSgTfnGXnOFZqJ8k4MK3r2sRcuKMes1J8KcnGAi L9DcCoVcm0PuDL6vR6nQD+NP0xkABF7xdA/d7wCZV+p9aCm9U9pwL3V3q dxkmHChEryfao2Bl9ZuwK33RCYRIqaMiN5pzLn21EM+U3gfC6rRDdVu/w S08nUNfwBPXVnUOVG4DYAK7NSG1eyuYij2xn+GNMmgLyNuHoZdBgPiqqk SyjbmorCKgbFgMxYi2z+onGvN25eRew2F/SDAF6jmypG1O6bSxhDeOv4Z Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10581"; a="310242588" X-IronPort-AV: E=Sophos;i="5.96,304,1665471600"; d="scan'208";a="310242588" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jan 2023 02:38:47 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10581"; a="901250693" X-IronPort-AV: E=Sophos;i="5.96,304,1665471600"; d="scan'208";a="901250693" Received: from mjervis-mobl1.ger.corp.intel.com (HELO localhost.localdomain) ([10.213.209.50]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jan 2023 02:38:44 -0800 From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Date: Fri, 6 Jan 2023 10:38:35 +0000 Message-Id: <20230106103835.640924-1-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Intel-gfx] [PATCH v2] drm/i915: Do not cover all future platforms in TLB invalidation 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: Balasubramani Vivekanandan , Andrzej Hajda Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Tvrtko Ursulin Revert to the original explicit approach and document the reasoning behind it. v2: * DG2 needs to be covered too. (Matt) Signed-off-by: Tvrtko Ursulin Cc: Matt Roper Cc: Balasubramani Vivekanandan Cc: Andrzej Hajda Reviewed-by: Andrzej Hajda # v1 --- Matt, does DG1 need to be in the MCR branch or plain Gen12? --- drivers/gpu/drm/i915/gt/intel_gt.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c index 7eeee5a7cb33..b2556a3d8a3f 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt.c +++ b/drivers/gpu/drm/i915/gt/intel_gt.c @@ -1070,7 +1070,19 @@ static void mmio_invalidate_full(struct intel_gt *gt) unsigned int num = 0; unsigned long flags; - if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50)) { + /* + * New platforms should not be added with catch-all-newer (>=) + * condition so that any later platform added triggers the below warning + * and in turn mandates a human cross-check of whether the invalidation + * flows have compatible semantics. + * + * For instance with the 11.00 -> 12.00 transition three out of five + * respective engine registers were moved to masked type. Then after the + * 12.00 -> 12.50 transition multi cast handling is required too. + */ + + if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50) && + GRAPHICS_VER_FULL(i915) <= IP_VER(12, 55)) { regs = NULL; num = ARRAY_SIZE(xehp_regs); } else if (GRAPHICS_VER(i915) == 12) { -- 2.34.1