From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C551A1B6CFA; Wed, 19 Feb 2025 09:19:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739956751; cv=none; b=U/r56c/j/l4B2AieJ3/xSfEpL0y2RCuSgFnOpW6OqCrcy/e6qC0/y7kEyEYuuKc/6WGE8FjIKlX/ZTV4SuIE48z4D/rM5hPIi5S3GdctXjcolEivEu5U7aNpaqpkJe6O6f7jqi/pbah+8fo2e9uVFxAaD1cpcDzZJuEi3LYq/is= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739956751; c=relaxed/simple; bh=7G7FCYsJTEFEDXqNqx6Z0tysKrErh1cR/AMaSZRhi20=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RIhmBZiULHx6EFqum9GuWCSoMbNYM1tc7962C5qg+gWzHmx+22Ef7jsr41ZEroNe23NbY550HpwIBnelzlQhtvF82KqwQkt7A8EUqr0eiObtL7uEyVVEYERj5anQaMyGmhzNS5D7zfHb0Y8z15DgBMQEG9pz2I6I5/Rj5vfJuak= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qXUqsssj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="qXUqsssj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49CA4C4CED1; Wed, 19 Feb 2025 09:19:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1739956751; bh=7G7FCYsJTEFEDXqNqx6Z0tysKrErh1cR/AMaSZRhi20=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qXUqsssjZMaNxASgZMvNcLV7Dwi95aWidiF/ahgQDHaaR7iKWk7ug+SOK0HiVMx4x ulzAPF/1+AhYpylDW20Rq45nT8dKTPLYzovEEzrViFqoBayeo6szEsSZIYiwoaw4y2 WycxUpM1brtmZvcFmnPt/0FaWm+MULKgICHRUxfI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Daniel Wheeler , Wayne Lin , Fangzhi Zuo , Rodrigo Siqueira , Alex Deucher , Sasha Levin Subject: [PATCH 6.1 280/578] drm/amd/display: Fix Mode Cutoff in DSC Passthrough to DP2.1 Monitor Date: Wed, 19 Feb 2025 09:24:44 +0100 Message-ID: <20250219082704.031814233@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250219082652.891560343@linuxfoundation.org> References: <20250219082652.891560343@linuxfoundation.org> User-Agent: quilt/0.68 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.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Fangzhi Zuo [ Upstream commit e56ad45e991128bf4db160b75a1d9f647a341d8f ] Source --> DP2.1 MST hub --> DP1.4/2.1 monitor When change from DP1.4 to DP2.1 from monitor manual, modes higher than 4k120 are all cutoff by mode validation. Switch back to DP1.4 gets all the modes up to 4k240 available to be enabled by dsc passthrough. [why] Compared to DP1.4 link from hub to monitor, DP2.1 link has larger full_pbn value that causes overflow in the process of doing conversion from pbn to kbps. [how] Change the data type accordingly to fit into the data limit during conversion calculation. Tested-by: Daniel Wheeler Reviewed-by: Wayne Lin Signed-off-by: Fangzhi Zuo Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c index 1acef5f3838f3..5eb994ed54717 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c @@ -1555,16 +1555,16 @@ int pre_validate_dsc(struct drm_atomic_state *state, return ret; } -static unsigned int kbps_from_pbn(unsigned int pbn) +static uint32_t kbps_from_pbn(unsigned int pbn) { - unsigned int kbps = pbn; + uint64_t kbps = (uint64_t)pbn; kbps *= (1000000 / PEAK_FACTOR_X1000); kbps *= 8; kbps *= 54; kbps /= 64; - return kbps; + return (uint32_t)kbps; } static bool is_dsc_common_config_possible(struct dc_stream_state *stream, -- 2.39.5