aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h7
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h1
-rw-r--r--drivers/gpu/drm/i915/intel_ddi.c263
-rw-r--r--drivers/gpu/drm/i915/intel_display.c13
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h6
-rw-r--r--drivers/gpu/drm/i915/intel_hdmi.c2
6 files changed, 238 insertions, 54 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 7f05736c6d8..9e446b62164 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;
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index fd9a319b86a..c8c8dd0ff7b 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -4523,6 +4523,7 @@
4523#define PORT_CLK_SEL_SPLL (3<<29) 4523#define PORT_CLK_SEL_SPLL (3<<29)
4524#define PORT_CLK_SEL_WRPLL1 (4<<29) 4524#define PORT_CLK_SEL_WRPLL1 (4<<29)
4525#define PORT_CLK_SEL_WRPLL2 (5<<29) 4525#define PORT_CLK_SEL_WRPLL2 (5<<29)
4526#define PORT_CLK_SEL_NONE (7<<29)
4526 4527
4527/* Pipe clock selection */ 4528/* Pipe clock selection */
4528#define PIPE_CLK_SEL_A 0x46140 4529#define PIPE_CLK_SEL_A 0x46140
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 8740a5cf135..ab48083ffce 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -152,18 +152,6 @@ void hsw_fdi_link_train(struct drm_crtc *crtc)
152 int pipe = intel_crtc->pipe; 152 int pipe = intel_crtc->pipe;
153 u32 reg, temp, i; 153 u32 reg, temp, i;
154 154
155 /* Configure CPU PLL, wait for warmup */
156 I915_WRITE(SPLL_CTL,
157 SPLL_PLL_ENABLE |
158 SPLL_PLL_FREQ_1350MHz |
159 SPLL_PLL_SCC);
160
161 /* Use SPLL to drive the output when in FDI mode */
162 I915_WRITE(PORT_CLK_SEL(PORT_E),
163 PORT_CLK_SEL_SPLL);
164
165 udelay(20);
166
167 /* Start the training iterating through available voltages and emphasis */ 155 /* Start the training iterating through available voltages and emphasis */
168 for (i=0; i < ARRAY_SIZE(hsw_ddi_buf_ctl_values); i++) { 156 for (i=0; i < ARRAY_SIZE(hsw_ddi_buf_ctl_values); i++) {
169 /* Configure DP_TP_CTL with auto-training */ 157 /* Configure DP_TP_CTL with auto-training */
@@ -654,58 +642,17 @@ void intel_ddi_mode_set(struct drm_encoder *encoder,
654 struct drm_display_mode *mode, 642 struct drm_display_mode *mode,
655 struct drm_display_mode *adjusted_mode) 643 struct drm_display_mode *adjusted_mode)
656{ 644{
657 struct drm_device *dev = encoder->dev;
658 struct drm_i915_private *dev_priv = dev->dev_private;
659 struct drm_crtc *crtc = encoder->crtc; 645 struct drm_crtc *crtc = encoder->crtc;
660 struct intel_crtc *intel_crtc = to_intel_crtc(crtc); 646 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
661 struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder); 647 struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
662 int port = intel_hdmi->ddi_port; 648 int port = intel_hdmi->ddi_port;
663 int pipe = intel_crtc->pipe; 649 int pipe = intel_crtc->pipe;
664 int p, n2, r2;
665 u32 i;
666 650
667 /* On Haswell, we need to enable the clocks and prepare DDI function to 651 /* On Haswell, we need to enable the clocks and prepare DDI function to
668 * work in HDMI mode for this pipe. 652 * work in HDMI mode for this pipe.
669 */ 653 */
670 DRM_DEBUG_KMS("Preparing HDMI DDI mode for Haswell on port %c, pipe %c\n", port_name(port), pipe_name(pipe)); 654 DRM_DEBUG_KMS("Preparing HDMI DDI mode for Haswell on port %c, pipe %c\n", port_name(port), pipe_name(pipe));
671 655
672 for (i = 0; i < ARRAY_SIZE(wrpll_tmds_clock_table); i++)
673 if (crtc->mode.clock <= wrpll_tmds_clock_table[i].clock)
674 break;
675
676 if (i == ARRAY_SIZE(wrpll_tmds_clock_table))
677 i--;
678
679 p = wrpll_tmds_clock_table[i].p;
680 n2 = wrpll_tmds_clock_table[i].n2;
681 r2 = wrpll_tmds_clock_table[i].r2;
682
683 if (wrpll_tmds_clock_table[i].clock != crtc->mode.clock)
684 DRM_INFO("WR PLL: using settings for %dKHz on %dKHz mode\n",
685 wrpll_tmds_clock_table[i].clock, crtc->mode.clock);
686
687 DRM_DEBUG_KMS("WR PLL: %dKHz refresh rate with p=%d, n2=%d r2=%d\n",
688 crtc->mode.clock, p, n2, r2);
689
690 /* Configure WR PLL 1, program the correct divider values for
691 * the desired frequency and wait for warmup */
692 I915_WRITE(WRPLL_CTL1,
693 WRPLL_PLL_ENABLE |
694 WRPLL_PLL_SELECT_LCPLL_2700 |
695 WRPLL_DIVIDER_REFERENCE(r2) |
696 WRPLL_DIVIDER_FEEDBACK(n2) |
697 WRPLL_DIVIDER_POST(p));
698
699 udelay(20);
700
701 /* Use WRPLL1 clock to drive the output to the port, and tell the pipe to use
702 * this port for connection.
703 */
704 I915_WRITE(PORT_CLK_SEL(port),
705 PORT_CLK_SEL_WRPLL1);
706
707 udelay(20);
708
709 if (intel_hdmi->has_audio) { 656 if (intel_hdmi->has_audio) {
710 /* Proper support for digital audio needs a new logic and a new set 657 /* Proper support for digital audio needs a new logic and a new set
711 * of registers, so we leave it for future patch bombing. 658 * of registers, so we leave it for future patch bombing.
@@ -742,6 +689,144 @@ intel_ddi_get_crtc_encoder(struct drm_crtc *crtc)
742 return ret; 689 return ret;
743} 690}
744 691
692void intel_ddi_put_crtc_pll(struct drm_crtc *crtc)
693{
694 struct drm_i915_private *dev_priv = crtc->dev->dev_private;
695 struct intel_ddi_plls *plls = &dev_priv->ddi_plls;
696 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
697 uint32_t val;
698
699 switch (intel_crtc->ddi_pll_sel) {
700 case PORT_CLK_SEL_SPLL:
701 plls->spll_refcount--;
702 if (plls->spll_refcount == 0) {
703 DRM_DEBUG_KMS("Disabling SPLL\n");
704 val = I915_READ(SPLL_CTL);
705 WARN_ON(!(val & SPLL_PLL_ENABLE));
706 I915_WRITE(SPLL_CTL, val & ~SPLL_PLL_ENABLE);
707 POSTING_READ(SPLL_CTL);
708 }
709 break;
710 case PORT_CLK_SEL_WRPLL1:
711 plls->wrpll1_refcount--;
712 if (plls->wrpll1_refcount == 0) {
713 DRM_DEBUG_KMS("Disabling WRPLL 1\n");
714 val = I915_READ(WRPLL_CTL1);
715 WARN_ON(!(val & WRPLL_PLL_ENABLE));
716 I915_WRITE(WRPLL_CTL1, val & ~WRPLL_PLL_ENABLE);
717 POSTING_READ(WRPLL_CTL1);
718 }
719 break;
720 case PORT_CLK_SEL_WRPLL2:
721 plls->wrpll2_refcount--;
722 if (plls->wrpll2_refcount == 0) {
723 DRM_DEBUG_KMS("Disabling WRPLL 2\n");
724 val = I915_READ(WRPLL_CTL2);
725 WARN_ON(!(val & WRPLL_PLL_ENABLE));
726 I915_WRITE(WRPLL_CTL2, val & ~WRPLL_PLL_ENABLE);
727 POSTING_READ(WRPLL_CTL2);
728 }
729 break;
730 }
731
732 WARN(plls->spll_refcount < 0, "Invalid SPLL refcount\n");
733 WARN(plls->wrpll1_refcount < 0, "Invalid WRPLL1 refcount\n");
734 WARN(plls->wrpll2_refcount < 0, "Invalid WRPLL2 refcount\n");
735
736 intel_crtc->ddi_pll_sel = PORT_CLK_SEL_NONE;
737}
738
739static void intel_ddi_calculate_wrpll(int clock, int *p, int *n2, int *r2)
740{
741 u32 i;
742
743 for (i = 0; i < ARRAY_SIZE(wrpll_tmds_clock_table); i++)
744 if (clock <= wrpll_tmds_clock_table[i].clock)
745 break;
746
747 if (i == ARRAY_SIZE(wrpll_tmds_clock_table))
748 i--;
749
750 *p = wrpll_tmds_clock_table[i].p;
751 *n2 = wrpll_tmds_clock_table[i].n2;
752 *r2 = wrpll_tmds_clock_table[i].r2;
753
754 if (wrpll_tmds_clock_table[i].clock != clock)
755 DRM_INFO("WRPLL: using settings for %dKHz on %dKHz mode\n",
756 wrpll_tmds_clock_table[i].clock, clock);
757
758 DRM_DEBUG_KMS("WRPLL: %dKHz refresh rate with p=%d, n2=%d r2=%d\n",
759 clock, *p, *n2, *r2);
760}
761
762bool intel_ddi_pll_mode_set(struct drm_crtc *crtc, int clock)
763{
764 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
765 struct intel_encoder *intel_encoder = intel_ddi_get_crtc_encoder(crtc);
766 struct drm_i915_private *dev_priv = crtc->dev->dev_private;
767 struct intel_ddi_plls *plls = &dev_priv->ddi_plls;
768 int type = intel_encoder->type;
769 enum pipe pipe = intel_crtc->pipe;
770 uint32_t reg, val;
771
772 /* TODO: reuse PLLs when possible (compare values) */
773
774 intel_ddi_put_crtc_pll(crtc);
775
776 if (type == INTEL_OUTPUT_HDMI) {
777 int p, n2, r2;
778
779 if (plls->wrpll1_refcount == 0) {
780 DRM_DEBUG_KMS("Using WRPLL 1 on pipe %c\n",
781 pipe_name(pipe));
782 plls->wrpll1_refcount++;
783 reg = WRPLL_CTL1;
784 intel_crtc->ddi_pll_sel = PORT_CLK_SEL_WRPLL1;
785 } else if (plls->wrpll2_refcount == 0) {
786 DRM_DEBUG_KMS("Using WRPLL 2 on pipe %c\n",
787 pipe_name(pipe));
788 plls->wrpll2_refcount++;
789 reg = WRPLL_CTL2;
790 intel_crtc->ddi_pll_sel = PORT_CLK_SEL_WRPLL2;
791 } else {
792 DRM_ERROR("No WRPLLs available!\n");
793 return false;
794 }
795
796 WARN(I915_READ(reg) & WRPLL_PLL_ENABLE,
797 "WRPLL already enabled\n");
798
799 intel_ddi_calculate_wrpll(clock, &p, &n2, &r2);
800
801 val = WRPLL_PLL_ENABLE | WRPLL_PLL_SELECT_LCPLL_2700 |
802 WRPLL_DIVIDER_REFERENCE(r2) | WRPLL_DIVIDER_FEEDBACK(n2) |
803 WRPLL_DIVIDER_POST(p);
804
805 } else if (type == INTEL_OUTPUT_ANALOG) {
806 if (plls->spll_refcount == 0) {
807 DRM_DEBUG_KMS("Using SPLL on pipe %c\n",
808 pipe_name(pipe));
809 plls->spll_refcount++;
810 reg = SPLL_CTL;
811 intel_crtc->ddi_pll_sel = PORT_CLK_SEL_SPLL;
812 }
813
814 WARN(I915_READ(reg) & SPLL_PLL_ENABLE,
815 "SPLL already enabled\n");
816
817 val = SPLL_PLL_ENABLE | SPLL_PLL_FREQ_1350MHz | SPLL_PLL_SCC;
818
819 } else {
820 WARN(1, "Invalid DDI encoder type %d\n", type);
821 return false;
822 }
823
824 I915_WRITE(reg, val);
825 udelay(20);
826
827 return true;
828}
829
745void intel_ddi_enable_pipe_func(struct drm_crtc *crtc) 830void intel_ddi_enable_pipe_func(struct drm_crtc *crtc)
746{ 831{
747 struct intel_crtc *intel_crtc = to_intel_crtc(crtc); 832 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
@@ -837,6 +922,57 @@ bool intel_ddi_get_hw_state(struct intel_encoder *encoder,
837 return true; 922 return true;
838} 923}
839 924
925static uint32_t intel_ddi_get_crtc_pll(struct drm_i915_private *dev_priv,
926 enum pipe pipe)
927{
928 uint32_t temp, ret;
929 enum port port;
930 int i;
931
932 temp = I915_READ(DDI_FUNC_CTL(pipe));
933 temp &= PIPE_DDI_PORT_MASK;
934 for (i = PORT_A; i <= PORT_E; i++)
935 if (temp == PIPE_DDI_SELECT_PORT(i))
936 port = i;
937
938 ret = I915_READ(PORT_CLK_SEL(port));
939
940 DRM_DEBUG_KMS("Pipe %c connected to port %c using clock 0x%08x\n",
941 pipe_name(pipe), port_name(port), ret);
942
943 return ret;
944}
945
946void intel_ddi_setup_hw_pll_state(struct drm_device *dev)
947{
948 struct drm_i915_private *dev_priv = dev->dev_private;
949 enum pipe pipe;
950 struct intel_crtc *intel_crtc;
951
952 for_each_pipe(pipe) {
953 intel_crtc =
954 to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);
955
956 if (!intel_crtc->active)
957 continue;
958
959 intel_crtc->ddi_pll_sel = intel_ddi_get_crtc_pll(dev_priv,
960 pipe);
961
962 switch (intel_crtc->ddi_pll_sel) {
963 case PORT_CLK_SEL_SPLL:
964 dev_priv->ddi_plls.spll_refcount++;
965 break;
966 case PORT_CLK_SEL_WRPLL1:
967 dev_priv->ddi_plls.wrpll1_refcount++;
968 break;
969 case PORT_CLK_SEL_WRPLL2:
970 dev_priv->ddi_plls.wrpll2_refcount++;
971 break;
972 }
973 }
974}
975
840void intel_ddi_enable_pipe_clock(struct intel_crtc *intel_crtc) 976void intel_ddi_enable_pipe_clock(struct intel_crtc *intel_crtc)
841{ 977{
842 struct drm_crtc *crtc = &intel_crtc->base; 978 struct drm_crtc *crtc = &intel_crtc->base;
@@ -854,6 +990,27 @@ void intel_ddi_disable_pipe_clock(struct intel_crtc *intel_crtc)
854 I915_WRITE(PIPE_CLK_SEL(intel_crtc->pipe), PIPE_CLK_SEL_DISABLED); 990 I915_WRITE(PIPE_CLK_SEL(intel_crtc->pipe), PIPE_CLK_SEL_DISABLED);
855} 991}
856 992
993void intel_ddi_pre_enable(struct intel_encoder *intel_encoder)
994{
995 struct drm_crtc *crtc = intel_encoder->base.crtc;
996 struct drm_i915_private *dev_priv = crtc->dev->dev_private;
997 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
998 enum port port = intel_ddi_get_encoder_port(intel_encoder);
999
1000 WARN_ON(intel_crtc->ddi_pll_sel == PORT_CLK_SEL_NONE);
1001
1002 I915_WRITE(PORT_CLK_SEL(port), intel_crtc->ddi_pll_sel);
1003}
1004
1005void intel_ddi_post_disable(struct intel_encoder *intel_encoder)
1006{
1007 struct drm_encoder *encoder = &intel_encoder->base;
1008 struct drm_i915_private *dev_priv = encoder->dev->dev_private;
1009 enum port port = intel_ddi_get_encoder_port(intel_encoder);
1010
1011 I915_WRITE(PORT_CLK_SEL(port), PORT_CLK_SEL_NONE);
1012}
1013
857void intel_enable_ddi(struct intel_encoder *encoder) 1014void intel_enable_ddi(struct intel_encoder *encoder)
858{ 1015{
859 struct drm_device *dev = encoder->base.dev; 1016 struct drm_device *dev = encoder->base.dev;
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 39d0753d6a3..709497dc807 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3332,6 +3332,11 @@ static void ironlake_crtc_off(struct drm_crtc *crtc)
3332 intel_put_pch_pll(intel_crtc); 3332 intel_put_pch_pll(intel_crtc);
3333} 3333}
3334 3334
3335static void haswell_crtc_off(struct drm_crtc *crtc)
3336{
3337 intel_ddi_put_crtc_pll(crtc);
3338}
3339
3335static void intel_crtc_dpms_overlay(struct intel_crtc *intel_crtc, bool enable) 3340static void intel_crtc_dpms_overlay(struct intel_crtc *intel_crtc, bool enable)
3336{ 3341{
3337 if (!enable && intel_crtc->overlay) { 3342 if (!enable && intel_crtc->overlay) {
@@ -5212,6 +5217,9 @@ static int haswell_crtc_mode_set(struct drm_crtc *crtc,
5212 WARN(num_connectors != 1, "%d connectors attached to pipe %c\n", 5217 WARN(num_connectors != 1, "%d connectors attached to pipe %c\n",
5213 num_connectors, pipe_name(pipe)); 5218 num_connectors, pipe_name(pipe));
5214 5219
5220 if (!intel_ddi_pll_mode_set(crtc, adjusted_mode->clock))
5221 return -EINVAL;
5222
5215 if (HAS_PCH_IBX(dev) || HAS_PCH_CPT(dev)) { 5223 if (HAS_PCH_IBX(dev) || HAS_PCH_CPT(dev)) {
5216 ok = ironlake_compute_clocks(crtc, adjusted_mode, &clock, 5224 ok = ironlake_compute_clocks(crtc, adjusted_mode, &clock,
5217 &has_reduced_clock, 5225 &has_reduced_clock,
@@ -8078,7 +8086,7 @@ static void intel_init_display(struct drm_device *dev)
8078 dev_priv->display.crtc_mode_set = haswell_crtc_mode_set; 8086 dev_priv->display.crtc_mode_set = haswell_crtc_mode_set;
8079 dev_priv->display.crtc_enable = ironlake_crtc_enable; 8087 dev_priv->display.crtc_enable = ironlake_crtc_enable;
8080 dev_priv->display.crtc_disable = ironlake_crtc_disable; 8088 dev_priv->display.crtc_disable = ironlake_crtc_disable;
8081 dev_priv->display.off = ironlake_crtc_off; 8089 dev_priv->display.off = haswell_crtc_off;
8082 dev_priv->display.update_plane = ironlake_update_plane; 8090 dev_priv->display.update_plane = ironlake_update_plane;
8083 } else if (HAS_PCH_SPLIT(dev)) { 8091 } else if (HAS_PCH_SPLIT(dev)) {
8084 dev_priv->display.crtc_mode_set = ironlake_crtc_mode_set; 8092 dev_priv->display.crtc_mode_set = ironlake_crtc_mode_set;
@@ -8533,6 +8541,9 @@ void intel_modeset_setup_hw_state(struct drm_device *dev)
8533 crtc->active ? "enabled" : "disabled"); 8541 crtc->active ? "enabled" : "disabled");
8534 } 8542 }
8535 8543
8544 if (IS_HASWELL(dev))
8545 intel_ddi_setup_hw_pll_state(dev);
8546
8536 list_for_each_entry(encoder, &dev->mode_config.encoder_list, 8547 list_for_each_entry(encoder, &dev->mode_config.encoder_list,
8537 base.head) { 8548 base.head) {
8538 pipe = 0; 8549 pipe = 0;
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 5de365d70de..245319a4559 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -212,6 +212,7 @@ struct intel_crtc {
212 212
213 /* We can share PLLs across outputs if the timings match */ 213 /* We can share PLLs across outputs if the timings match */
214 struct intel_pch_pll *pch_pll; 214 struct intel_pch_pll *pch_pll;
215 uint32_t ddi_pll_sel;
215}; 216};
216 217
217struct intel_plane { 218struct intel_plane {
@@ -586,5 +587,10 @@ extern void intel_ddi_disable_pipe_func(struct drm_i915_private *dev_priv,
586 enum pipe pipe); 587 enum pipe pipe);
587extern void intel_ddi_enable_pipe_clock(struct intel_crtc *intel_crtc); 588extern void intel_ddi_enable_pipe_clock(struct intel_crtc *intel_crtc);
588extern void intel_ddi_disable_pipe_clock(struct intel_crtc *intel_crtc); 589extern void intel_ddi_disable_pipe_clock(struct intel_crtc *intel_crtc);
590extern void intel_ddi_setup_hw_pll_state(struct drm_device *dev);
591extern bool intel_ddi_pll_mode_set(struct drm_crtc *crtc, int clock);
592extern void intel_ddi_pre_enable(struct intel_encoder *intel_encoder);
593extern void intel_ddi_post_disable(struct intel_encoder *intel_encoder);
594extern void intel_ddi_put_crtc_pll(struct drm_crtc *crtc);
589 595
590#endif /* __INTEL_DRV_H__ */ 596#endif /* __INTEL_DRV_H__ */
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index f9fb47cd177..a6dd00d99da 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1013,8 +1013,10 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg, enum port port)
1013 } 1013 }
1014 1014
1015 if (IS_HASWELL(dev)) { 1015 if (IS_HASWELL(dev)) {
1016 intel_encoder->pre_enable = intel_ddi_pre_enable;
1016 intel_encoder->enable = intel_enable_ddi; 1017 intel_encoder->enable = intel_enable_ddi;
1017 intel_encoder->disable = intel_disable_ddi; 1018 intel_encoder->disable = intel_disable_ddi;
1019 intel_encoder->post_disable = intel_ddi_post_disable;
1018 intel_encoder->get_hw_state = intel_ddi_get_hw_state; 1020 intel_encoder->get_hw_state = intel_ddi_get_hw_state;
1019 drm_encoder_helper_add(&intel_encoder->base, 1021 drm_encoder_helper_add(&intel_encoder->base,
1020 &intel_hdmi_helper_funcs_hsw); 1022 &intel_hdmi_helper_funcs_hsw);