Skip to content

Commit

Permalink
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Browse files Browse the repository at this point in the history
Pull drm fixes from Dave Airlie:
 "Some minor fixes from Intel and a radeon fix.

  I have the nouveau fix for the i2c regression queued for next week,
  its mostly a revert and seems to work on the system it was originally
  introduced for thanks to some i2c core changes."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon: clarify and extend wb setup on APUs and NI+ asics
  drm/i915: enable dip before writing data on gen4
  fixing dmi match for hp t5745 and hp st5747 thin client
  drm/i915: Only enable IPS polling for gen5
  drm/i915: Do not read non-existent DPLL registers on PCH hardware
  • Loading branch information
torvalds committed May 4, 2012
2 parents 0854224 + c994ead commit f0f376f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 14 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/i915_debugfs.c
Expand Up @@ -1224,6 +1224,9 @@ static int i915_emon_status(struct seq_file *m, void *unused)
unsigned long temp, chipset, gfx;
int ret;

if (!IS_GEN5(dev))
return -ENODEV;

ret = mutex_lock_interruptible(&dev->struct_mutex);
if (ret)
return ret;
Expand Down
15 changes: 10 additions & 5 deletions drivers/gpu/drm/i915/i915_dma.c
Expand Up @@ -1701,6 +1701,9 @@ void i915_update_gfx_val(struct drm_i915_private *dev_priv)
unsigned long diffms;
u32 count;

if (dev_priv->info->gen != 5)
return;

getrawmonotonic(&now);
diff1 = timespec_sub(now, dev_priv->last_time2);

Expand Down Expand Up @@ -2121,12 +2124,14 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
setup_timer(&dev_priv->hangcheck_timer, i915_hangcheck_elapsed,
(unsigned long) dev);

spin_lock(&mchdev_lock);
i915_mch_dev = dev_priv;
dev_priv->mchdev_lock = &mchdev_lock;
spin_unlock(&mchdev_lock);
if (IS_GEN5(dev)) {
spin_lock(&mchdev_lock);
i915_mch_dev = dev_priv;
dev_priv->mchdev_lock = &mchdev_lock;
spin_unlock(&mchdev_lock);

ips_ping_for_i915_load();
ips_ping_for_i915_load();
}

return 0;

Expand Down
9 changes: 5 additions & 4 deletions drivers/gpu/drm/i915/intel_display.c
Expand Up @@ -7072,9 +7072,6 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc)
struct drm_device *dev = crtc->dev;
drm_i915_private_t *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
int dpll_reg = DPLL(pipe);
int dpll = I915_READ(dpll_reg);

if (HAS_PCH_SPLIT(dev))
return;
Expand All @@ -7087,18 +7084,22 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc)
* the manual case.
*/
if (!HAS_PIPE_CXSR(dev) && intel_crtc->lowfreq_avail) {
int pipe = intel_crtc->pipe;
int dpll_reg = DPLL(pipe);
u32 dpll;

DRM_DEBUG_DRIVER("downclocking LVDS\n");

assert_panel_unlocked(dev_priv, pipe);

dpll = I915_READ(dpll_reg);
dpll |= DISPLAY_RATE_SELECT_FPA1;
I915_WRITE(dpll_reg, dpll);
intel_wait_for_vblank(dev, pipe);
dpll = I915_READ(dpll_reg);
if (!(dpll & DISPLAY_RATE_SELECT_FPA1))
DRM_DEBUG_DRIVER("failed to downclock LVDS!\n");
}

}

/**
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/intel_hdmi.c
Expand Up @@ -136,7 +136,7 @@ static void i9xx_write_infoframe(struct drm_encoder *encoder,

val &= ~VIDEO_DIP_SELECT_MASK;

I915_WRITE(VIDEO_DIP_CTL, val | port | flags);
I915_WRITE(VIDEO_DIP_CTL, VIDEO_DIP_ENABLE | val | port | flags);

for (i = 0; i < len; i += 4) {
I915_WRITE(VIDEO_DIP_DATA, *data);
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/intel_lvds.c
Expand Up @@ -750,15 +750,15 @@ static const struct dmi_system_id intel_no_lvds[] = {
.ident = "Hewlett-Packard t5745",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_BOARD_NAME, "hp t5745"),
DMI_MATCH(DMI_PRODUCT_NAME, "hp t5745"),
},
},
{
.callback = intel_no_lvds_dmi_callback,
.ident = "Hewlett-Packard st5747",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_BOARD_NAME, "hp st5747"),
DMI_MATCH(DMI_PRODUCT_NAME, "hp st5747"),
},
},
{
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/radeon/radeon_device.c
Expand Up @@ -241,8 +241,8 @@ int radeon_wb_init(struct radeon_device *rdev)
rdev->wb.use_event = true;
}
}
/* always use writeback/events on NI */
if (ASIC_IS_DCE5(rdev)) {
/* always use writeback/events on NI, APUs */
if (rdev->family >= CHIP_PALM) {
rdev->wb.enabled = true;
rdev->wb.use_event = true;
}
Expand Down

0 comments on commit f0f376f

Please sign in to comment.