From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E7E774E4C40; Thu, 17 Sep 2026 16:05:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789661148; cv=none; b=bBC7sHTxDTYBMM4qFITH/xkuLcCD4sobH37oWVnnzouh9BsRotjaeEqRQNFdBF8FPyjqbSbIE8pIsBJyqfTfr3oDdqbjLSWeyaQEMQ5qbo8McNlb+T1SFnNegf+8LF5hK/SIKNj3BeWf0kjGbhmTdsSdI7dnKa9qmCE8HmzyJjQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789661148; c=relaxed/simple; bh=4Nf5MZ5C682Do1XyKrgRaOoNQh0pa1UTsmKlum9H3hc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tL7Fft+lAwtvFrBJA45CdfGm21AhyvgwA10/GOZjD8a+pXj9arWjhWf/B2nA6+N0iW/eEt2ozKfi77T3QpXiPF+LlwlUWCmiIrUivKMPBuMNqWjzDNXLaktyt7JCenCgwujq6ewEhAJDRLiOzzvM7RX7tpqVmf6JMo+fJaSgINY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=n7sKtvD0; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="n7sKtvD0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52D161F000FF; Thu, 17 Sep 2026 16:05:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789661146; bh=cyVAzkTh//e8e/ZqzEvuxD4ULnCn0AXS2YXsH6kZlyQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=n7sKtvD0agoBAUF+l9mYO24rzGMYdkXKW0fzxgwwYrIJ83WCGXz1TLPhjBcIuio5I db67HKgp8YK2AiNNrgScR3J+/teHI2YzpkIPBLuy6hKAiXhNjPKQ3MKZY/ySS+Sdqo WROwDwDEROiGGLWve3aLcVVg2wYkF1/qsxMautmc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ray Wu , Tom Chung , James Lin , Daniel Wheeler , Alex Deucher , Sasha Levin Subject: [PATCH 6.18 0098/1250] drm/amd/display: Fix CRC open failure during active rendering Date: Thu, 17 Sep 2026 15:58:13 +0100 Message-ID: <20260917151554.643499956@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260917151551.901433442@linuxfoundation.org> References: <20260917151551.901433442@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tom Chung [ Upstream commit 5eb2fdafeb6f4a442643b77a21a4c9e70586a146 ] [Why] Opening the CRC data file during active rendering can fail with -EINVAL. The wait for commit->hw_done returns remaining jiffies on success, but the CRC path was treating that as an error. [How] Handle wait_for_completion_interruptible_timeout() correctly: positive return as success, 0 as timeout, and negative as error. Reviewed-by: Ray Wu Signed-off-by: Tom Chung Signed-off-by: James Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c index e20aa74380665..596a97092e0dd 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c @@ -584,8 +584,13 @@ int amdgpu_dm_crtc_set_crc_source(struct drm_crtc *crtc, const char *src_name) */ ret = wait_for_completion_interruptible_timeout( &commit->hw_done, 10 * HZ); - if (ret) + if (ret < 0) + goto cleanup; + + if (ret == 0) { + ret = -ETIMEDOUT; goto cleanup; + } } enable = amdgpu_dm_is_valid_crc_source(source); -- 2.53.0