aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2012-10-05 11:05:58 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-10-10 10:53:02 -0400
commit6441ab5f8ffdf7e99eefe0fb747858e0c12b567e (patch)
tree4408fc4fb3eeba522abf3a91ddd3b5a8af575b8f /drivers/gpu/drm/i915/i915_drv.h
parentee2b0b382a7e6cbf3549559ec7dc86c63f5aa3d1 (diff)
drm/i915: completely rewrite the Haswell PLL handling code
Problems with the previous code: - HDMI just uses WRPLL1 for everything, so dual head cases might not work sometimes. - At encoder->mode_set we just write the PLL register without doing any kind of check (e.g., check if the PLL is already being used). - There is no way to fail and return error codes at encoder->mode_set. - We write to PORT_CLK_SEL at mode_set and we never disable it. - Machines hang due to wrong clock enable/disable sequence. So here we rewrite the code, making it a little more like the pre-Haswell PLL mode set code: - Check PLL availability at ironlake_crtc_mode_set. - Try to use both WRPLLs. - Check if PLLs are used before actually trying to use them, and properly fail with error messages. - Enable/disable PORT_CLK_SEL at the right place. - Add some WARNs to check for bugs. The next improvement will be to try to reuse PLLs if the timings match, but this is content for another patch and it's already documented with a TODO comment. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 7f05736c6d8a..9e446b621642 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -93,6 +93,12 @@ struct intel_pch_pll {
93}; 93};
94#define I915_NUM_PLLS 2 94#define I915_NUM_PLLS 2
95 95
96struct intel_ddi_plls {
97 int spll_refcount;
98 int wrpll1_refcount;
99 int wrpll2_refcount;
100};
101
96/* Interface history: 102/* Interface history:
97 * 103 *
98 * 1.1: Original. 104 * 1.1: Original.
@@ -812,6 +818,7 @@ typedef struct drm_i915_private {
812 wait_queue_head_t pending_flip_queue; 818 wait_queue_head_t pending_flip_queue;
813 819
814 struct intel_pch_pll pch_plls[I915_NUM_PLLS]; 820 struct intel_pch_pll pch_plls[I915_NUM_PLLS];
821 struct intel_ddi_plls ddi_plls;
815 822
816 /* Reclocking support */ 823 /* Reclocking support */
817 bool render_reclock_avail; 824 bool render_reclock_avail;