Merge tag 'drm-intel-fixes-2015-01-29' of git://anongit.freedesktop.org/drm-intel into drm-fixes
misc i915 fixes, mostly all stable material as well. * tag 'drm-intel-fixes-2015-01-29' of git://anongit.freedesktop.org/drm-intel: drm/i915: BDW Fix Halo PCI IDs marked as ULT. drm/i915: Fix and clean BDW PCH identification drm/i915: Only fence tiled region of object. drm/i915: fix inconsistent brightness after resume drm/i915: Init PPGTT before context enable
This commit is contained in:
commit
a78b80f51e
@ -462,19 +462,13 @@ void intel_detect_pch(struct drm_device *dev)
|
||||
} else if (id == INTEL_PCH_LPT_DEVICE_ID_TYPE) {
|
||||
dev_priv->pch_type = PCH_LPT;
|
||||
DRM_DEBUG_KMS("Found LynxPoint PCH\n");
|
||||
WARN_ON(!IS_HASWELL(dev));
|
||||
WARN_ON(IS_HSW_ULT(dev));
|
||||
} else if (IS_BROADWELL(dev)) {
|
||||
dev_priv->pch_type = PCH_LPT;
|
||||
dev_priv->pch_id =
|
||||
INTEL_PCH_LPT_LP_DEVICE_ID_TYPE;
|
||||
DRM_DEBUG_KMS("This is Broadwell, assuming "
|
||||
"LynxPoint LP PCH\n");
|
||||
WARN_ON(!IS_HASWELL(dev) && !IS_BROADWELL(dev));
|
||||
WARN_ON(IS_HSW_ULT(dev) || IS_BDW_ULT(dev));
|
||||
} else if (id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE) {
|
||||
dev_priv->pch_type = PCH_LPT;
|
||||
DRM_DEBUG_KMS("Found LynxPoint LP PCH\n");
|
||||
WARN_ON(!IS_HASWELL(dev));
|
||||
WARN_ON(!IS_HSW_ULT(dev));
|
||||
WARN_ON(!IS_HASWELL(dev) && !IS_BROADWELL(dev));
|
||||
WARN_ON(!IS_HSW_ULT(dev) && !IS_BDW_ULT(dev));
|
||||
} else if (id == INTEL_PCH_SPT_DEVICE_ID_TYPE) {
|
||||
dev_priv->pch_type = PCH_SPT;
|
||||
DRM_DEBUG_KMS("Found SunrisePoint PCH\n");
|
||||
|
@ -2159,8 +2159,7 @@ struct drm_i915_cmd_table {
|
||||
#define IS_HSW_EARLY_SDV(dev) (IS_HASWELL(dev) && \
|
||||
(INTEL_DEVID(dev) & 0xFF00) == 0x0C00)
|
||||
#define IS_BDW_ULT(dev) (IS_BROADWELL(dev) && \
|
||||
((INTEL_DEVID(dev) & 0xf) == 0x2 || \
|
||||
(INTEL_DEVID(dev) & 0xf) == 0x6 || \
|
||||
((INTEL_DEVID(dev) & 0xf) == 0x6 || \
|
||||
(INTEL_DEVID(dev) & 0xf) == 0xe))
|
||||
#define IS_BDW_GT3(dev) (IS_BROADWELL(dev) && \
|
||||
(INTEL_DEVID(dev) & 0x00F0) == 0x0020)
|
||||
|
@ -3148,6 +3148,13 @@ static void i965_write_fence_reg(struct drm_device *dev, int reg,
|
||||
u32 size = i915_gem_obj_ggtt_size(obj);
|
||||
uint64_t val;
|
||||
|
||||
/* Adjust fence size to match tiled area */
|
||||
if (obj->tiling_mode != I915_TILING_NONE) {
|
||||
uint32_t row_size = obj->stride *
|
||||
(obj->tiling_mode == I915_TILING_Y ? 32 : 8);
|
||||
size = (size / row_size) * row_size;
|
||||
}
|
||||
|
||||
val = (uint64_t)((i915_gem_obj_ggtt_offset(obj) + size - 4096) &
|
||||
0xfffff000) << 32;
|
||||
val |= i915_gem_obj_ggtt_offset(obj) & 0xfffff000;
|
||||
@ -4884,13 +4891,12 @@ i915_gem_init_hw(struct drm_device *dev)
|
||||
for (i = 0; i < NUM_L3_SLICES(dev); i++)
|
||||
i915_gem_l3_remap(&dev_priv->ring[RCS], i);
|
||||
|
||||
/*
|
||||
* XXX: Contexts should only be initialized once. Doing a switch to the
|
||||
* default context switch however is something we'd like to do after
|
||||
* reset or thaw (the latter may not actually be necessary for HW, but
|
||||
* goes with our code better). Context switching requires rings (for
|
||||
* the do_switch), but before enabling PPGTT. So don't move this.
|
||||
*/
|
||||
ret = i915_ppgtt_init_hw(dev);
|
||||
if (ret && ret != -EIO) {
|
||||
DRM_ERROR("PPGTT enable failed %d\n", ret);
|
||||
i915_gem_cleanup_ringbuffer(dev);
|
||||
}
|
||||
|
||||
ret = i915_gem_context_enable(dev_priv);
|
||||
if (ret && ret != -EIO) {
|
||||
DRM_ERROR("Context enable failed %d\n", ret);
|
||||
@ -4899,12 +4905,6 @@ i915_gem_init_hw(struct drm_device *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = i915_ppgtt_init_hw(dev);
|
||||
if (ret && ret != -EIO) {
|
||||
DRM_ERROR("PPGTT enable failed %d\n", ret);
|
||||
i915_gem_cleanup_ringbuffer(dev);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -962,7 +962,7 @@ void intel_panel_enable_backlight(struct intel_connector *connector)
|
||||
|
||||
WARN_ON(panel->backlight.max == 0);
|
||||
|
||||
if (panel->backlight.level == 0) {
|
||||
if (panel->backlight.level <= panel->backlight.min) {
|
||||
panel->backlight.level = panel->backlight.max;
|
||||
if (panel->backlight.device)
|
||||
panel->backlight.device->props.brightness =
|
||||
|
Loading…
Reference in New Issue
Block a user