dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/8] drm/kmb: Work around for higher system clock
@ 2021-08-03 22:04 Anitha Chrisanthus
  2021-08-03 22:04 ` [PATCH v2 2/8] drm/kmb : W/A for 256B cache alignment for video Anitha Chrisanthus
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Anitha Chrisanthus @ 2021-08-03 22:04 UTC (permalink / raw)
  To: dri-devel, anitha.chrisanthus, edmund.j.dea

Use a different value for system clock offset in the
ppl/llp ratio calculations for clocks higher than 500 Mhz.

Fixes: 98521f4d4b4c ("drm/kmb: Mipi DSI part of the display driver")
Signed-off-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
---
 drivers/gpu/drm/kmb/kmb_dsi.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/kmb/kmb_dsi.c b/drivers/gpu/drm/kmb/kmb_dsi.c
index 231041b269f5..7e2371ffcb18 100644
--- a/drivers/gpu/drm/kmb/kmb_dsi.c
+++ b/drivers/gpu/drm/kmb/kmb_dsi.c
@@ -482,6 +482,10 @@ static u32 mipi_tx_fg_section_cfg(struct kmb_dsi *kmb_dsi,
 	return 0;
 }
 
+#define CLK_DIFF_LOW 50
+#define CLK_DIFF_HI 60
+#define SYSCLK_500  500
+
 static void mipi_tx_fg_cfg_regs(struct kmb_dsi *kmb_dsi, u8 frame_gen,
 				struct mipi_tx_frame_timing_cfg *fg_cfg)
 {
@@ -492,7 +496,12 @@ static void mipi_tx_fg_cfg_regs(struct kmb_dsi *kmb_dsi, u8 frame_gen,
 	/* 500 Mhz system clock minus 50 to account for the difference in
 	 * MIPI clock speed in RTL tests
 	 */
-	sysclk = kmb_dsi->sys_clk_mhz - 50;
+	if (kmb_dsi->sys_clk_mhz == SYSCLK_500) {
+		sysclk = kmb_dsi->sys_clk_mhz - CLK_DIFF_LOW;
+	} else {
+		/* 700 Mhz clk*/
+		sysclk = kmb_dsi->sys_clk_mhz - CLK_DIFF_HI;
+	}
 
 	/* PPL-Pixel Packing Layer, LLP-Low Level Protocol
 	 * Frame genartor timing parameters are clocked on the system clock,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-08-17 18:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-03 22:04 [PATCH v2 1/8] drm/kmb: Work around for higher system clock Anitha Chrisanthus
2021-08-03 22:04 ` [PATCH v2 2/8] drm/kmb : W/A for 256B cache alignment for video Anitha Chrisanthus
2021-08-03 22:04 ` [PATCH v2 3/8] drm/kmb: Limit supported mode to 1080p Anitha Chrisanthus
2021-08-03 22:04 ` [PATCH v2 4/8] drm/kmb: Remove clearing DPHY regs Anitha Chrisanthus
2021-08-03 22:04 ` [PATCH v2 5/8] drm/kmb: Disable change of plane parameters Anitha Chrisanthus
2021-08-03 22:04 ` [PATCH v2 6/8] drm/kmb: Corrected typo in handle_lcd_irq Anitha Chrisanthus
2021-08-03 22:04 ` [PATCH v2 7/8] drm/kmb: Enable ADV bridge after modeset Anitha Chrisanthus
2021-08-03 22:04 ` [PATCH v2 8/8] drm/kmb: Enable support for fbcon (framebuffer console) Anitha Chrisanthus
2021-08-17 18:53 ` [PATCH v2 1/8] drm/kmb: Work around for higher system clock Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).