Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
"i915, tda998x and vmwgfx fixes,

The main one is i915 fix for missing VGA connectors, along with some
fixes for the tda998x from Russell fixing some modesetting problems.

(still on holidays, but got a spare moment to find these)"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
drm/vmwgfx: Fix incorrect write to read-only register v2:
drm/i915: Drop early VLV WA to fix Voltage not getting dropped to Vmin
drm/i915: only apply crt_present check on VLV
drm/i915: Wait for vblank after enabling the primary plane on BDW
drm/i2c: tda998x: add some basic mode validation
drm/i2c: tda998x: faster polling for edid
drm/i2c: tda998x: move drm_i2c_encoder_destroy call

Changed files
+51 -5
drivers
+9 -3
drivers/gpu/drm/i2c/tda998x_drv.c
··· 810 810 tda998x_encoder_mode_valid(struct drm_encoder *encoder, 811 811 struct drm_display_mode *mode) 812 812 { 813 + if (mode->clock > 150000) 814 + return MODE_CLOCK_HIGH; 815 + if (mode->htotal >= BIT(13)) 816 + return MODE_BAD_HVALUE; 817 + if (mode->vtotal >= BIT(11)) 818 + return MODE_BAD_VVALUE; 813 819 return MODE_OK; 814 820 } 815 821 ··· 1054 1048 return i; 1055 1049 } 1056 1050 } else { 1057 - for (i = 10; i > 0; i--) { 1058 - msleep(10); 1051 + for (i = 100; i > 0; i--) { 1052 + msleep(1); 1059 1053 ret = reg_read(priv, REG_INT_FLAGS_2); 1060 1054 if (ret < 0) 1061 1055 return ret; ··· 1189 1183 tda998x_encoder_destroy(struct drm_encoder *encoder) 1190 1184 { 1191 1185 struct tda998x_priv *priv = to_tda998x_priv(encoder); 1192 - drm_i2c_encoder_destroy(encoder); 1193 1186 1194 1187 /* disable all IRQs and free the IRQ handler */ 1195 1188 cec_write(priv, REG_CEC_RXSHPDINTENA, 0); ··· 1198 1193 1199 1194 if (priv->cec) 1200 1195 i2c_unregister_device(priv->cec); 1196 + drm_i2c_encoder_destroy(encoder); 1201 1197 kfree(priv); 1202 1198 } 1203 1199
+26 -1
drivers/gpu/drm/i915/intel_display.c
··· 2087 2087 static void intel_enable_primary_hw_plane(struct drm_i915_private *dev_priv, 2088 2088 enum plane plane, enum pipe pipe) 2089 2089 { 2090 + struct drm_device *dev = dev_priv->dev; 2090 2091 struct intel_crtc *intel_crtc = 2091 2092 to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]); 2092 2093 int reg; ··· 2107 2106 2108 2107 I915_WRITE(reg, val | DISPLAY_PLANE_ENABLE); 2109 2108 intel_flush_primary_plane(dev_priv, plane); 2109 + 2110 + /* 2111 + * BDW signals flip done immediately if the plane 2112 + * is disabled, even if the plane enable is already 2113 + * armed to occur at the next vblank :( 2114 + */ 2115 + if (IS_BROADWELL(dev)) 2116 + intel_wait_for_vblank(dev, intel_crtc->pipe); 2110 2117 } 2111 2118 2112 2119 /** ··· 11097 11088 return names[output]; 11098 11089 } 11099 11090 11091 + static bool intel_crt_present(struct drm_device *dev) 11092 + { 11093 + struct drm_i915_private *dev_priv = dev->dev_private; 11094 + 11095 + if (IS_ULT(dev)) 11096 + return false; 11097 + 11098 + if (IS_CHERRYVIEW(dev)) 11099 + return false; 11100 + 11101 + if (IS_VALLEYVIEW(dev) && !dev_priv->vbt.int_crt_support) 11102 + return false; 11103 + 11104 + return true; 11105 + } 11106 + 11100 11107 static void intel_setup_outputs(struct drm_device *dev) 11101 11108 { 11102 11109 struct drm_i915_private *dev_priv = dev->dev_private; ··· 11121 11096 11122 11097 intel_lvds_init(dev); 11123 11098 11124 - if (!IS_ULT(dev) && !IS_CHERRYVIEW(dev) && dev_priv->vbt.int_crt_support) 11099 + if (intel_crt_present(dev)) 11125 11100 intel_crt_init(dev); 11126 11101 11127 11102 if (HAS_DDI(dev)) {
+8
drivers/gpu/drm/i915/intel_pm.c
··· 3209 3209 */ 3210 3210 static void vlv_set_rps_idle(struct drm_i915_private *dev_priv) 3211 3211 { 3212 + struct drm_device *dev = dev_priv->dev; 3213 + 3214 + /* Latest VLV doesn't need to force the gfx clock */ 3215 + if (dev->pdev->revision >= 0xd) { 3216 + valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit); 3217 + return; 3218 + } 3219 + 3212 3220 /* 3213 3221 * When we are idle. Drop to min voltage state. 3214 3222 */
+8
drivers/gpu/drm/i915/intel_sprite.c
··· 691 691 struct intel_crtc *intel_crtc = to_intel_crtc(crtc); 692 692 693 693 /* 694 + * BDW signals flip done immediately if the plane 695 + * is disabled, even if the plane enable is already 696 + * armed to occur at the next vblank :( 697 + */ 698 + if (IS_BROADWELL(dev)) 699 + intel_wait_for_vblank(dev, intel_crtc->pipe); 700 + 701 + /* 694 702 * FIXME IPS should be fine as long as one plane is 695 703 * enabled, but in practice it seems to have problems 696 704 * when going from primary only to sprite only and vice
-1
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
··· 179 179 vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_Y, info->var.yoffset); 180 180 vmw_write(vmw_priv, SVGA_REG_DISPLAY_WIDTH, info->var.xres); 181 181 vmw_write(vmw_priv, SVGA_REG_DISPLAY_HEIGHT, info->var.yres); 182 - vmw_write(vmw_priv, SVGA_REG_BYTES_PER_LINE, info->fix.line_length); 183 182 vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID); 184 183 } 185 184