All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Changes for calculating dsi clk for CHT
@ 2015-03-03 12:57 Gaurav K Singh
  2015-03-04  2:17 ` shuang.he
  0 siblings, 1 reply; 2+ messages in thread
From: Gaurav K Singh @ 2015-03-03 12:57 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula, Shobhit Kumar

Depending on the correct refclk, n ,p for CHT, calculate
the dsi clk during readout DSI HW state.

Signed-off-by: Gaurav K Singh <gaurav.k.singh@intel.com>
---
 drivers/gpu/drm/i915/intel_dsi_pll.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dsi_pll.c b/drivers/gpu/drm/i915/intel_dsi_pll.c
index 5e44c9b..c7d55e8 100644
--- a/drivers/gpu/drm/i915/intel_dsi_pll.c
+++ b/drivers/gpu/drm/i915/intel_dsi_pll.c
@@ -357,9 +357,17 @@ u32 vlv_get_dsi_pclk(struct intel_encoder *encoder, int pipe_bpp)
 	u32 m = 0, p = 0;
 	int refclk = 25000;
 	int i;
+	u32 n = 1;
+	u32 m_start = 62;
 
 	DRM_DEBUG_KMS("\n");
 
+	if (IS_CHERRYVIEW(dev_priv->dev)) {
+		refclk = 100000;
+		n = 4;
+		m_start = 70;
+	}
+
 	mutex_lock(&dev_priv->dpio_lock);
 	pll_ctl = vlv_cck_read(dev_priv, CCK_REG_DSI_PLL_CONTROL);
 	pll_div = vlv_cck_read(dev_priv, CCK_REG_DSI_PLL_DIVIDER);
@@ -394,9 +402,9 @@ u32 vlv_get_dsi_pclk(struct intel_encoder *encoder, int pipe_bpp)
 		return 0;
 	}
 
-	m = i + 62;
+	m = i + m_start;
 
-	dsi_clock = (m * refclk) / p;
+	dsi_clock = (m * refclk) / (p * n);
 
 	/* pixel_format and pipe_bpp should agree */
 	assert_bpp_mismatch(intel_dsi->pixel_format, pipe_bpp);
-- 
1.7.9.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Changes for calculating dsi clk for CHT
  2015-03-03 12:57 [PATCH] drm/i915: Changes for calculating dsi clk for CHT Gaurav K Singh
@ 2015-03-04  2:17 ` shuang.he
  0 siblings, 0 replies; 2+ messages in thread
From: shuang.he @ 2015-03-04  2:17 UTC (permalink / raw)
  To: shuang.he, ethan.gao, intel-gfx, gaurav.k.singh

Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 5875
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
PNV                 -5              278/278              273/278
ILK                                  308/308              308/308
SNB                 -1              284/284              283/284
IVB                                  380/380              380/380
BYT                                  294/294              294/294
HSW                 -1              387/387              386/387
BDW                 -1              316/316              315/316
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
 PNV  igt_gem_userptr_blits_coherency-sync      NO_RESULT(1)CRASH(5)NRUN(1)PASS(7)      CRASH(1)PASS(1)
 PNV  igt_gem_userptr_blits_coherency-unsync      NO_RESULT(1)CRASH(4)PASS(6)      CRASH(2)
 PNV  igt_gen3_render_linear_blits      FAIL(4)NRUN(1)DMESG_WARN(1)PASS(7)      FAIL(2)
 PNV  igt_gen3_render_mixed_blits      FAIL(7)PASS(9)      FAIL(2)
 PNV  igt_gem_fence_thrash_bo-write-verify-threaded-none      FAIL(2)CRASH(4)PASS(4)      FAIL(1)CRASH(1)
*SNB  igt_gem_fence_thrash_bo-write-verify-x      PASS(2)      DMESG_WARN(1)PASS(1)
*HSW  igt_gem_storedw_loop_vebox      PASS(2)      DMESG_WARN(2)
*BDW  igt_gem_gtt_hog      PASS(18)      DMESG_WARN(1)PASS(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2015-03-04  2:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-03 12:57 [PATCH] drm/i915: Changes for calculating dsi clk for CHT Gaurav K Singh
2015-03-04  2:17 ` shuang.he

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.