From patchwork Mon Oct 2 12:20:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nirmoy Das X-Patchwork-Id: 13406166 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 AD954E784AC for ; Mon, 2 Oct 2023 12:20:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 764E210E295; Mon, 2 Oct 2023 12:20:54 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6A54810E29F; Mon, 2 Oct 2023 12:20:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696249245; x=1727785245; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=TtzwBm9DERNLTiJPDvQed7U0fE/SYIghggWbRcXuo+g=; b=DIsIkt5vRGHV5Je1tj5if1VHPPVGkulahESgYPIkN2nYqMibFZJ5vLM6 EbhbIHg3duiPh2i/spn8yxiV5er7lEqFpS0p+IRU+de2YY0NYt2yj6/PJ F/Hy1h+JvgD+f/KQM6fBSyiWZYdQvKlqFkFfu0ozFbvdh5/gIyLk3IFsh P8WcsMXva9uCp88i1mXGXUsGnK430JoENiWHpS1HoUng3PgaO2dXKfyGU qLmKvgfHE3vdGHb/CP3pnr36afIeLpHVlyVfJHGNHuJArKoUkuAnFUz// E2jIwfiUTg0yNLvnheq+hUGfMevu2oW8pEeA+LSfdCyF8H9Xxds8Eb3Y8 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10850"; a="386501844" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="386501844" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2023 05:20:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10850"; a="779918158" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="779918158" Received: from nirmoyda-desk.igk.intel.com ([10.102.138.190]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2023 05:20:39 -0700 From: Nirmoy Das To: intel-gfx@lists.freedesktop.org Subject: [PATCH] drm/i915: Invalidate all GTs in flush_tlb_invalidate() Date: Mon, 2 Oct 2023 14:20:32 +0200 Message-ID: <20231002122032.23703-1-nirmoy.das@intel.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Organization: Intel Deutschland GmbH, Registered Address: Am Campeon 10, 85579 Neubiberg, Germany, Commercial Register: Amtsgericht Muenchen HRB 186928 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: Tvrtko Ursulin , Fei Yang , Matt Roper , Matthew Auld , Jonathan Cavitt , dri-devel@lists.freedesktop.org, Andrzej Hajda , Andi Shyti , Rodrigo Vivi , Mauro Carvalho Chehab , Chris Wilson , =?utf-8?q?Christian_K=C3=B6n?= =?utf-8?q?ig?= , Nirmoy Das Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Don't return early if one of the GT doesn't require any flushing. Fixes: d6c531ab4820 ("drm/i915: Invalidate the TLBs on each GT") Cc: Chris Wilson Cc: Fei Yang Cc: Mauro Carvalho Chehab Cc: Andi Shyti Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: Nirmoy Das Cc: Matthew Auld Cc: "Ville Syrjälä" Cc: Andrzej Hajda Cc: "Christian König" Cc: Jonathan Cavitt Cc: Matt Roper Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Nirmoy Das --- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pages.c b/drivers/gpu/drm/i915/gem/i915_gem_pages.c index 6b6d22c19411..0ba955611dfb 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_pages.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_pages.c @@ -198,7 +198,7 @@ static void flush_tlb_invalidate(struct drm_i915_gem_object *obj) for_each_gt(gt, i915, id) { if (!obj->mm.tlb[id]) - return; + continue; intel_gt_invalidate_tlb_full(gt, obj->mm.tlb[id]); obj->mm.tlb[id] = 0;