From patchwork Thu Jul 11 16:32:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gote, Nitin R" X-Patchwork-Id: 13730849 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 12DF4C3DA45 for ; Thu, 11 Jul 2024 16:16:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 58D1E10EAD3; Thu, 11 Jul 2024 16:16:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="XY4nY7BZ"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 75DD210E2E3; Thu, 11 Jul 2024 16:16:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720714562; x=1752250562; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=g+C4Z1uYirgb3hW9Ol5Td2idagm1RdThfrrZAow1pDk=; b=XY4nY7BZi+GUeeJxvIXHg3Gc8X5Tb8gsCzxRTegvwrZFIdFITGa5bguv DohPi1fGQj6wMvJclbAJK6UvMJbpiZ9UyagSKV/kmnD6pAnjd+nscSc5x AsrfGALiCoIdUUcJS6jDArxdwuoaiZVcAOAf1YzNkKKjBmW0t/6qtrIl+ MjCKOsx/KSzyKVA4xHzLsRKUQNwrcvV6pPlgeHsKN2DRFJINxLPshs8ai RpdsVL1iuyCeXxELBGX9AnPlfztyNI0UDqfuo2oQZEB5+1zaPZk7A9CDz ca3Voxyo72NoTIg1tnbxPNW0B7ZLYaz2BJSZRiDQLOttoyBbtfYcabitb w==; X-CSE-ConnectionGUID: 8ZbVVfW3QL6ho8JFQdap1A== X-CSE-MsgGUID: Csn18AzMRCeClnRAFKOhbA== X-IronPort-AV: E=McAfee;i="6700,10204,11130"; a="17956517" X-IronPort-AV: E=Sophos;i="6.09,200,1716274800"; d="scan'208";a="17956517" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2024 09:16:01 -0700 X-CSE-ConnectionGUID: MHtwAUG1Qvaq8hf6jIRZwg== X-CSE-MsgGUID: EbSsQSZhR2aa4AyQZz9lGQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,200,1716274800"; d="scan'208";a="71811711" Received: from nitin-super-server.iind.intel.com ([10.145.169.70]) by fmviesa002.fm.intel.com with ESMTP; 11 Jul 2024 09:15:59 -0700 From: Nitin Gote To: chris.p.wilson@intel.com, tursulin@ursulin.net, intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, andi.shyti@intel.com, nirmoy.das@intel.com, janusz.krzysztofik@linux.intel.com, nitin.r.gote@intel.com, Chris Wilson , stable@vger.kernel.org Subject: [PATCH v3] drm/i915/gt: Do not consider preemption during execlists_dequeue for gen8 Date: Thu, 11 Jul 2024 22:02:08 +0530 Message-Id: <20240711163208.1355736-1-nitin.r.gote@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" We're seeing a GPU HANG issue on a CHV platform, which was caused by bac24f59f454 ("drm/i915/execlists: Enable coarse preemption boundaries for gen8"). Gen8 platform has only timeslice and doesn't support a preemption mechanism as engines do not have a preemption timer and doesn't send an irq if the preemption timeout expires. So, add a fix to not consider preemption during dequeuing for gen8 platforms. v2: Simplify can_preempt() function (Tvrtko Ursulin) v3: - Inside need_preempt(), condition of can_preempt() is not required as simplified can_preempt() is enough. (Chris Wilson) Fixes: bac24f59f454 ("drm/i915/execlists: Enable coarse preemption boundaries for gen8") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11396 Suggested-by: Andi Shyti Signed-off-by: Nitin Gote Cc: Chris Wilson CC: # v5.2+ Reviewed-by: Jonathan Cavitt Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c index 21829439e686..72090f52fb85 100644 --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c @@ -3315,11 +3315,7 @@ static void remove_from_engine(struct i915_request *rq) static bool can_preempt(struct intel_engine_cs *engine) { - if (GRAPHICS_VER(engine->i915) > 8) - return true; - - /* GPGPU on bdw requires extra w/a; not implemented */ - return engine->class != RENDER_CLASS; + return GRAPHICS_VER(engine->i915) > 8; } static void kick_execlists(const struct i915_request *rq, int prio)