Skip to content

Commit 110e430

Browse files
committed
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
2 parents 75bf757 + dfd7aec commit 110e430

File tree

5 files changed

+51
-5
lines changed

5 files changed

+51
-5
lines changed

drivers/gpu/drm/i2c/tda998x_drv.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,12 @@ static int
810810
tda998x_encoder_mode_valid(struct drm_encoder *encoder,
811811
struct drm_display_mode *mode)
812812
{
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;
813819
return MODE_OK;
814820
}
815821

@@ -1048,8 +1054,8 @@ read_edid_block(struct drm_encoder *encoder, uint8_t *buf, int blk)
10481054
return i;
10491055
}
10501056
} else {
1051-
for (i = 10; i > 0; i--) {
1052-
msleep(10);
1057+
for (i = 100; i > 0; i--) {
1058+
msleep(1);
10531059
ret = reg_read(priv, REG_INT_FLAGS_2);
10541060
if (ret < 0)
10551061
return ret;
@@ -1183,7 +1189,6 @@ static void
11831189
tda998x_encoder_destroy(struct drm_encoder *encoder)
11841190
{
11851191
struct tda998x_priv *priv = to_tda998x_priv(encoder);
1186-
drm_i2c_encoder_destroy(encoder);
11871192

11881193
/* disable all IRQs and free the IRQ handler */
11891194
cec_write(priv, REG_CEC_RXSHPDINTENA, 0);
@@ -1193,6 +1198,7 @@ tda998x_encoder_destroy(struct drm_encoder *encoder)
11931198

11941199
if (priv->cec)
11951200
i2c_unregister_device(priv->cec);
1201+
drm_i2c_encoder_destroy(encoder);
11961202
kfree(priv);
11971203
}
11981204

drivers/gpu/drm/i915/intel_display.c

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2087,6 +2087,7 @@ void intel_flush_primary_plane(struct drm_i915_private *dev_priv,
20872087
static void intel_enable_primary_hw_plane(struct drm_i915_private *dev_priv,
20882088
enum plane plane, enum pipe pipe)
20892089
{
2090+
struct drm_device *dev = dev_priv->dev;
20902091
struct intel_crtc *intel_crtc =
20912092
to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);
20922093
int reg;
@@ -2106,6 +2107,14 @@ static void intel_enable_primary_hw_plane(struct drm_i915_private *dev_priv,
21062107

21072108
I915_WRITE(reg, val | DISPLAY_PLANE_ENABLE);
21082109
intel_flush_primary_plane(dev_priv, plane);
2110+
2111+
/*
2112+
* BDW signals flip done immediately if the plane
2113+
* is disabled, even if the plane enable is already
2114+
* armed to occur at the next vblank :(
2115+
*/
2116+
if (IS_BROADWELL(dev))
2117+
intel_wait_for_vblank(dev, intel_crtc->pipe);
21092118
}
21102119

21112120
/**
@@ -11088,6 +11097,22 @@ const char *intel_output_name(int output)
1108811097
return names[output];
1108911098
}
1109011099

11100+
static bool intel_crt_present(struct drm_device *dev)
11101+
{
11102+
struct drm_i915_private *dev_priv = dev->dev_private;
11103+
11104+
if (IS_ULT(dev))
11105+
return false;
11106+
11107+
if (IS_CHERRYVIEW(dev))
11108+
return false;
11109+
11110+
if (IS_VALLEYVIEW(dev) && !dev_priv->vbt.int_crt_support)
11111+
return false;
11112+
11113+
return true;
11114+
}
11115+
1109111116
static void intel_setup_outputs(struct drm_device *dev)
1109211117
{
1109311118
struct drm_i915_private *dev_priv = dev->dev_private;
@@ -11096,7 +11121,7 @@ static void intel_setup_outputs(struct drm_device *dev)
1109611121

1109711122
intel_lvds_init(dev);
1109811123

11099-
if (!IS_ULT(dev) && !IS_CHERRYVIEW(dev) && dev_priv->vbt.int_crt_support)
11124+
if (intel_crt_present(dev))
1110011125
intel_crt_init(dev);
1110111126

1110211127
if (HAS_DDI(dev)) {

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3209,6 +3209,14 @@ void gen6_set_rps(struct drm_device *dev, u8 val)
32093209
*/
32103210
static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
32113211
{
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+
32123220
/*
32133221
* When we are idle. Drop to min voltage state.
32143222
*/

drivers/gpu/drm/i915/intel_sprite.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,14 @@ intel_post_enable_primary(struct drm_crtc *crtc)
690690
struct drm_device *dev = crtc->dev;
691691
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
692692

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+
693701
/*
694702
* FIXME IPS should be fine as long as one plane is
695703
* enabled, but in practice it seems to have problems

drivers/gpu/drm/vmwgfx/vmwgfx_fb.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ static int vmw_fb_set_par(struct fb_info *info)
179179
vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_Y, info->var.yoffset);
180180
vmw_write(vmw_priv, SVGA_REG_DISPLAY_WIDTH, info->var.xres);
181181
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);
183182
vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID);
184183
}
185184

0 commit comments

Comments
 (0)