From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: HaoPing.Liu@amd.com, Aric Cyr <Aric.Cyr@amd.com>,
airlied@linux.ie, dri-devel@lists.freedesktop.org,
Sasha Levin <sashal@kernel.org>,
Brian Chang <Brian.Chang@amd.com>,
Rodrigo.Siqueira@amd.com, amd-gfx@lists.freedesktop.org,
alex.hung@amd.com, michael.strauss@amd.com,
harry.wentland@amd.com, Ilya Bakoulin <Ilya.Bakoulin@amd.com>,
Charlene.Liu@amd.com, sunpeng.li@amd.com,
Daniel Wheeler <daniel.wheeler@amd.com>,
dillon.varone@amd.com, Hansen.Dsouza@amd.com,
David.Galiffi@amd.com, Xinhui.Pan@amd.com, daniel@ffwll.ch,
Alex Deucher <alexander.deucher@amd.com>,
christian.koenig@amd.com
Subject: [PATCH AUTOSEL 5.15 12/20] drm/amd/display: Fix pixel clock programming
Date: Wed, 24 Aug 2022 21:37:04 -0400 [thread overview]
Message-ID: <20220825013713.22656-12-sashal@kernel.org> (raw)
In-Reply-To: <20220825013713.22656-1-sashal@kernel.org>
From: Ilya Bakoulin <Ilya.Bakoulin@amd.com>
[ Upstream commit 04fb918bf421b299feaee1006e82921d7d381f18 ]
[Why]
Some pixel clock values could cause HDMI TMDS SSCPs to be misaligned
between different HDMI lanes when using YCbCr420 10-bit pixel format.
BIOS functions for transmitter/encoder control take pixel clock in kHz
increments, whereas the function for setting the pixel clock is in 100Hz
increments. Setting pixel clock to a value that is not on a kHz boundary
will cause the issue.
[How]
Round pixel clock down to nearest kHz in 10/12-bpc cases.
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Brian Chang <Brian.Chang@amd.com>
Signed-off-by: Ilya Bakoulin <Ilya.Bakoulin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c b/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
index 054823d12403..5f1b735da506 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
@@ -545,9 +545,11 @@ static void dce112_get_pix_clk_dividers_helper (
switch (pix_clk_params->color_depth) {
case COLOR_DEPTH_101010:
actual_pixel_clock_100hz = (actual_pixel_clock_100hz * 5) >> 2;
+ actual_pixel_clock_100hz -= actual_pixel_clock_100hz % 10;
break;
case COLOR_DEPTH_121212:
actual_pixel_clock_100hz = (actual_pixel_clock_100hz * 6) >> 2;
+ actual_pixel_clock_100hz -= actual_pixel_clock_100hz % 10;
break;
case COLOR_DEPTH_161616:
actual_pixel_clock_100hz = actual_pixel_clock_100hz * 2;
--
2.35.1
WARNING: multiple messages have this Message-ID (diff)
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Ilya Bakoulin <Ilya.Bakoulin@amd.com>,
Aric Cyr <Aric.Cyr@amd.com>, Brian Chang <Brian.Chang@amd.com>,
Daniel Wheeler <daniel.wheeler@amd.com>,
Alex Deucher <alexander.deucher@amd.com>,
Sasha Levin <sashal@kernel.org>,
harry.wentland@amd.com, sunpeng.li@amd.com,
Rodrigo.Siqueira@amd.com, christian.koenig@amd.com,
Xinhui.Pan@amd.com, airlied@linux.ie, daniel@ffwll.ch,
HaoPing.Liu@amd.com, Hansen.Dsouza@amd.com, Charlene.Liu@amd.com,
dillon.varone@amd.com, David.Galiffi@amd.com,
michael.strauss@amd.com, alex.hung@amd.com,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: [PATCH AUTOSEL 5.15 12/20] drm/amd/display: Fix pixel clock programming
Date: Wed, 24 Aug 2022 21:37:04 -0400 [thread overview]
Message-ID: <20220825013713.22656-12-sashal@kernel.org> (raw)
In-Reply-To: <20220825013713.22656-1-sashal@kernel.org>
From: Ilya Bakoulin <Ilya.Bakoulin@amd.com>
[ Upstream commit 04fb918bf421b299feaee1006e82921d7d381f18 ]
[Why]
Some pixel clock values could cause HDMI TMDS SSCPs to be misaligned
between different HDMI lanes when using YCbCr420 10-bit pixel format.
BIOS functions for transmitter/encoder control take pixel clock in kHz
increments, whereas the function for setting the pixel clock is in 100Hz
increments. Setting pixel clock to a value that is not on a kHz boundary
will cause the issue.
[How]
Round pixel clock down to nearest kHz in 10/12-bpc cases.
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Brian Chang <Brian.Chang@amd.com>
Signed-off-by: Ilya Bakoulin <Ilya.Bakoulin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c b/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
index 054823d12403..5f1b735da506 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
@@ -545,9 +545,11 @@ static void dce112_get_pix_clk_dividers_helper (
switch (pix_clk_params->color_depth) {
case COLOR_DEPTH_101010:
actual_pixel_clock_100hz = (actual_pixel_clock_100hz * 5) >> 2;
+ actual_pixel_clock_100hz -= actual_pixel_clock_100hz % 10;
break;
case COLOR_DEPTH_121212:
actual_pixel_clock_100hz = (actual_pixel_clock_100hz * 6) >> 2;
+ actual_pixel_clock_100hz -= actual_pixel_clock_100hz % 10;
break;
case COLOR_DEPTH_161616:
actual_pixel_clock_100hz = actual_pixel_clock_100hz * 2;
--
2.35.1
WARNING: multiple messages have this Message-ID (diff)
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: HaoPing.Liu@amd.com, airlied@linux.ie,
dri-devel@lists.freedesktop.org, Sasha Levin <sashal@kernel.org>,
Brian Chang <Brian.Chang@amd.com>,
Rodrigo.Siqueira@amd.com, amd-gfx@lists.freedesktop.org,
alex.hung@amd.com, michael.strauss@amd.com,
Ilya Bakoulin <Ilya.Bakoulin@amd.com>,
Charlene.Liu@amd.com, sunpeng.li@amd.com,
Daniel Wheeler <daniel.wheeler@amd.com>,
dillon.varone@amd.com, Hansen.Dsouza@amd.com,
David.Galiffi@amd.com, Xinhui.Pan@amd.com,
Alex Deucher <alexander.deucher@amd.com>,
christian.koenig@amd.com
Subject: [PATCH AUTOSEL 5.15 12/20] drm/amd/display: Fix pixel clock programming
Date: Wed, 24 Aug 2022 21:37:04 -0400 [thread overview]
Message-ID: <20220825013713.22656-12-sashal@kernel.org> (raw)
In-Reply-To: <20220825013713.22656-1-sashal@kernel.org>
From: Ilya Bakoulin <Ilya.Bakoulin@amd.com>
[ Upstream commit 04fb918bf421b299feaee1006e82921d7d381f18 ]
[Why]
Some pixel clock values could cause HDMI TMDS SSCPs to be misaligned
between different HDMI lanes when using YCbCr420 10-bit pixel format.
BIOS functions for transmitter/encoder control take pixel clock in kHz
increments, whereas the function for setting the pixel clock is in 100Hz
increments. Setting pixel clock to a value that is not on a kHz boundary
will cause the issue.
[How]
Round pixel clock down to nearest kHz in 10/12-bpc cases.
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Brian Chang <Brian.Chang@amd.com>
Signed-off-by: Ilya Bakoulin <Ilya.Bakoulin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c b/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
index 054823d12403..5f1b735da506 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
@@ -545,9 +545,11 @@ static void dce112_get_pix_clk_dividers_helper (
switch (pix_clk_params->color_depth) {
case COLOR_DEPTH_101010:
actual_pixel_clock_100hz = (actual_pixel_clock_100hz * 5) >> 2;
+ actual_pixel_clock_100hz -= actual_pixel_clock_100hz % 10;
break;
case COLOR_DEPTH_121212:
actual_pixel_clock_100hz = (actual_pixel_clock_100hz * 6) >> 2;
+ actual_pixel_clock_100hz -= actual_pixel_clock_100hz % 10;
break;
case COLOR_DEPTH_161616:
actual_pixel_clock_100hz = actual_pixel_clock_100hz * 2;
--
2.35.1
next prev parent reply other threads:[~2022-08-25 1:39 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 1:36 [PATCH AUTOSEL 5.15 01/20] fs/ntfs3: Fix work with fragmented xattr Sasha Levin
2022-08-25 1:36 ` [PATCH AUTOSEL 5.15 02/20] ASoC: sh: rz-ssi: Improve error handling in rz_ssi_probe() error path Sasha Levin
2022-08-25 1:36 ` Sasha Levin
2022-08-25 1:36 ` [PATCH AUTOSEL 5.15 03/20] drm/amd/display: Avoid MPC infinite loop Sasha Levin
2022-08-25 1:36 ` Sasha Levin
2022-08-25 1:36 ` Sasha Levin
2022-08-25 1:36 ` [PATCH AUTOSEL 5.15 04/20] drm/amd/display: Fix HDMI VSIF V3 incorrect issue Sasha Levin
2022-08-25 1:36 ` Sasha Levin
2022-08-25 1:36 ` Sasha Levin
2022-08-25 1:36 ` [PATCH AUTOSEL 5.15 05/20] drm/amd/display: For stereo keep "FLIP_ANY_FRAME" Sasha Levin
2022-08-25 1:36 ` Sasha Levin
2022-08-25 1:36 ` Sasha Levin
2022-08-25 1:36 ` [PATCH AUTOSEL 5.15 06/20] drm/amd/display: clear optc underflow before turn off odm clock Sasha Levin
2022-08-25 1:36 ` Sasha Levin
2022-08-25 1:36 ` Sasha Levin
2022-08-25 1:36 ` [PATCH AUTOSEL 5.15 07/20] ksmbd: return STATUS_BAD_NETWORK_NAME error status if share is not configured Sasha Levin
2022-08-25 1:37 ` [PATCH AUTOSEL 5.15 08/20] neigh: fix possible DoS due to net iface start/stop loop Sasha Levin
2022-08-25 1:37 ` [PATCH AUTOSEL 5.15 09/20] s390/hypfs: avoid error message under KVM Sasha Levin
2022-08-25 1:37 ` [PATCH AUTOSEL 5.15 10/20] ksmbd: don't remove dos attribute xattr on O_TRUNC open Sasha Levin
2022-08-25 1:37 ` [PATCH AUTOSEL 5.15 11/20] drm/amd/pm: add missing ->fini_microcode interface for Sienna Cichlid Sasha Levin
2022-08-25 1:37 ` Sasha Levin
2022-08-25 1:37 ` Sasha Levin
2022-08-25 1:37 ` Sasha Levin [this message]
2022-08-25 1:37 ` [PATCH AUTOSEL 5.15 12/20] drm/amd/display: Fix pixel clock programming Sasha Levin
2022-08-25 1:37 ` Sasha Levin
2022-08-25 1:37 ` [PATCH AUTOSEL 5.15 13/20] drm/amdgpu: Increase tlb flush timeout for sriov Sasha Levin
2022-08-25 1:37 ` Sasha Levin
2022-08-25 1:37 ` Sasha Levin
2022-08-25 1:37 ` [PATCH AUTOSEL 5.15 14/20] drm/amd/display: avoid doing vm_init multiple time Sasha Levin
2022-08-25 1:37 ` Sasha Levin
2022-08-25 1:37 ` Sasha Levin
2022-08-25 1:37 ` [PATCH AUTOSEL 5.15 15/20] netfilter: conntrack: NF_CONNTRACK_PROCFS should no longer default to y Sasha Levin
2022-08-25 1:37 ` [PATCH AUTOSEL 5.15 16/20] testing: selftests: nft_flowtable.sh: use random netns names Sasha Levin
2022-08-25 1:37 ` [PATCH AUTOSEL 5.15 17/20] btrfs: move lockdep class helpers to locking.c Sasha Levin
2022-08-25 1:37 ` [PATCH AUTOSEL 5.15 18/20] btrfs: fix lockdep splat with reloc root extent buffers Sasha Levin
2022-08-25 1:37 ` [PATCH AUTOSEL 5.15 19/20] btrfs: tree-checker: check for overlapping extent items Sasha Levin
2022-08-25 1:37 ` [PATCH AUTOSEL 5.15 20/20] ftrace: Fix NULL pointer dereference in is_ftrace_trampoline when ftrace is dead Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220825013713.22656-12-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=Aric.Cyr@amd.com \
--cc=Brian.Chang@amd.com \
--cc=Charlene.Liu@amd.com \
--cc=David.Galiffi@amd.com \
--cc=Hansen.Dsouza@amd.com \
--cc=HaoPing.Liu@amd.com \
--cc=Ilya.Bakoulin@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@linux.ie \
--cc=alex.hung@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=daniel.wheeler@amd.com \
--cc=daniel@ffwll.ch \
--cc=dillon.varone@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.strauss@amd.com \
--cc=stable@vger.kernel.org \
--cc=sunpeng.li@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.