Commit f0f376f2 authored by Linus Torvalds's avatar Linus Torvalds

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

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
parents 08542241 c994ead6
...@@ -1224,6 +1224,9 @@ static int i915_emon_status(struct seq_file *m, void *unused) ...@@ -1224,6 +1224,9 @@ static int i915_emon_status(struct seq_file *m, void *unused)
unsigned long temp, chipset, gfx; unsigned long temp, chipset, gfx;
int ret; int ret;
if (!IS_GEN5(dev))
return -ENODEV;
ret = mutex_lock_interruptible(&dev->struct_mutex); ret = mutex_lock_interruptible(&dev->struct_mutex);
if (ret) if (ret)
return ret; return ret;
......
...@@ -1701,6 +1701,9 @@ void i915_update_gfx_val(struct drm_i915_private *dev_priv) ...@@ -1701,6 +1701,9 @@ void i915_update_gfx_val(struct drm_i915_private *dev_priv)
unsigned long diffms; unsigned long diffms;
u32 count; u32 count;
if (dev_priv->info->gen != 5)
return;
getrawmonotonic(&now); getrawmonotonic(&now);
diff1 = timespec_sub(now, dev_priv->last_time2); diff1 = timespec_sub(now, dev_priv->last_time2);
...@@ -2121,12 +2124,14 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) ...@@ -2121,12 +2124,14 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
setup_timer(&dev_priv->hangcheck_timer, i915_hangcheck_elapsed, setup_timer(&dev_priv->hangcheck_timer, i915_hangcheck_elapsed,
(unsigned long) dev); (unsigned long) dev);
spin_lock(&mchdev_lock); if (IS_GEN5(dev)) {
i915_mch_dev = dev_priv; spin_lock(&mchdev_lock);
dev_priv->mchdev_lock = &mchdev_lock; i915_mch_dev = dev_priv;
spin_unlock(&mchdev_lock); dev_priv->mchdev_lock = &mchdev_lock;
spin_unlock(&mchdev_lock);
ips_ping_for_i915_load(); ips_ping_for_i915_load();
}
return 0; return 0;
......
...@@ -7072,9 +7072,6 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc) ...@@ -7072,9 +7072,6 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc)
struct drm_device *dev = crtc->dev; struct drm_device *dev = crtc->dev;
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc); 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)) if (HAS_PCH_SPLIT(dev))
return; return;
...@@ -7087,10 +7084,15 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc) ...@@ -7087,10 +7084,15 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc)
* the manual case. * the manual case.
*/ */
if (!HAS_PIPE_CXSR(dev) && intel_crtc->lowfreq_avail) { 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"); DRM_DEBUG_DRIVER("downclocking LVDS\n");
assert_panel_unlocked(dev_priv, pipe); assert_panel_unlocked(dev_priv, pipe);
dpll = I915_READ(dpll_reg);
dpll |= DISPLAY_RATE_SELECT_FPA1; dpll |= DISPLAY_RATE_SELECT_FPA1;
I915_WRITE(dpll_reg, dpll); I915_WRITE(dpll_reg, dpll);
intel_wait_for_vblank(dev, pipe); intel_wait_for_vblank(dev, pipe);
...@@ -7098,7 +7100,6 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc) ...@@ -7098,7 +7100,6 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc)
if (!(dpll & DISPLAY_RATE_SELECT_FPA1)) if (!(dpll & DISPLAY_RATE_SELECT_FPA1))
DRM_DEBUG_DRIVER("failed to downclock LVDS!\n"); DRM_DEBUG_DRIVER("failed to downclock LVDS!\n");
} }
} }
/** /**
......
...@@ -136,7 +136,7 @@ static void i9xx_write_infoframe(struct drm_encoder *encoder, ...@@ -136,7 +136,7 @@ static void i9xx_write_infoframe(struct drm_encoder *encoder,
val &= ~VIDEO_DIP_SELECT_MASK; 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) { for (i = 0; i < len; i += 4) {
I915_WRITE(VIDEO_DIP_DATA, *data); I915_WRITE(VIDEO_DIP_DATA, *data);
......
...@@ -750,7 +750,7 @@ static const struct dmi_system_id intel_no_lvds[] = { ...@@ -750,7 +750,7 @@ static const struct dmi_system_id intel_no_lvds[] = {
.ident = "Hewlett-Packard t5745", .ident = "Hewlett-Packard t5745",
.matches = { .matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_BOARD_NAME, "hp t5745"), DMI_MATCH(DMI_PRODUCT_NAME, "hp t5745"),
}, },
}, },
{ {
...@@ -758,7 +758,7 @@ static const struct dmi_system_id intel_no_lvds[] = { ...@@ -758,7 +758,7 @@ static const struct dmi_system_id intel_no_lvds[] = {
.ident = "Hewlett-Packard st5747", .ident = "Hewlett-Packard st5747",
.matches = { .matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_BOARD_NAME, "hp st5747"), DMI_MATCH(DMI_PRODUCT_NAME, "hp st5747"),
}, },
}, },
{ {
......
...@@ -241,8 +241,8 @@ int radeon_wb_init(struct radeon_device *rdev) ...@@ -241,8 +241,8 @@ int radeon_wb_init(struct radeon_device *rdev)
rdev->wb.use_event = true; rdev->wb.use_event = true;
} }
} }
/* always use writeback/events on NI */ /* always use writeback/events on NI, APUs */
if (ASIC_IS_DCE5(rdev)) { if (rdev->family >= CHIP_PALM) {
rdev->wb.enabled = true; rdev->wb.enabled = true;
rdev->wb.use_event = true; rdev->wb.use_event = true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment