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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C9DCEB64DD for ; Tue, 25 Jul 2023 00:20:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230130AbjGYAUj (ORCPT ); Mon, 24 Jul 2023 20:20:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231231AbjGYAUi (ORCPT ); Mon, 24 Jul 2023 20:20:38 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F008A198E for ; Mon, 24 Jul 2023 17:20:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690244436; x=1721780436; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=w+WFAosz/F5oHKYVRknXPkFsqFV6VSwHipi5CPPiLI8=; b=aCNLWy6SsbGD21zsEw9pHy7jdijmVsLNY5oZ25/D/xYsIy7wL7t6mFNr GGOgAQGye0/0QvLK0P7RRydQKwW9M0V1H6+htvcW2HdFhjEu33jngR3Ys VmwJaO/v+QfwuR2EEKehjT0BX0xb8pK2gSrLg9aLBf41plIXFib8h75Fv 1Whip3qKWv1yMIDF+pu7Ujym1LOWw0vW7M3RpfNPfUJNkMyr3p9H98CIC hGfoNLGxDeOJdKNsznU49MNLAwzsDWSraGqGGMVgi9anm4pgH4+C4uvuw sYO5cSOpaToTw8huXjoRe+x69Y61SSCFHKBoj/nSSnTzesz6NFwM4y9wp A==; X-IronPort-AV: E=McAfee;i="6600,9927,10781"; a="365043830" X-IronPort-AV: E=Sophos;i="6.01,229,1684825200"; d="scan'208";a="365043830" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2023 17:20:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10781"; a="791159996" X-IronPort-AV: E=Sophos;i="6.01,229,1684825200"; d="scan'208";a="791159996" Received: from gionescu-mobl2.ger.corp.intel.com (HELO intel.com) ([10.252.34.175]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2023 17:20:33 -0700 From: Andi Shyti To: Jonathan Cavitt , Matt Roper , Chris Wilson , Mika Kuoppala , Nirmoy Das , Andrzej Hajda Cc: intel-gfx , dri-devel , linux-stable , Andi Shyti Subject: [PATCH v9 3/7] drm/i915/gt: Ensure memory quiesced before invalidation Date: Tue, 25 Jul 2023 02:19:46 +0200 Message-Id: <20230725001950.1014671-4-andi.shyti@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230725001950.1014671-1-andi.shyti@linux.intel.com> References: <20230725001950.1014671-1-andi.shyti@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jonathan Cavitt All memory traffic must be quiesced before requesting an aux invalidation on platforms that use Aux CCS. Fixes: 972282c4cf24 ("drm/i915/gen12: Add aux table invalidate for all engines") Requires: a2a4aa0eef3b ("drm/i915: Add the gen12_needs_ccs_aux_inv helper") Signed-off-by: Jonathan Cavitt Signed-off-by: Andi Shyti Cc: # v5.8+ Reviewed-by: Nirmoy Das Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c index 46744f9660771..58b448708e750 100644 --- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c +++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c @@ -214,7 +214,11 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode) { struct intel_engine_cs *engine = rq->engine; - if (mode & EMIT_FLUSH) { + /* + * On Aux CCS platforms the invalidation of the Aux + * table requires quiescing memory traffic beforehand + */ + if (mode & EMIT_FLUSH || gen12_needs_ccs_aux_inv(engine)) { u32 flags = 0; int err; u32 *cs; -- 2.40.1