Merge tag 'drm-intel-next-fixes-2016-08-05' of git://anongit.freedesktop.org/drm-intel into drm-next
3 intel fixes. * tag 'drm-intel-next-fixes-2016-08-05' of git://anongit.freedesktop.org/drm-intel: drm/i915/fbdev: Check for the framebuffer before use drm/i915: Never fully mask the the EI up rps interrupt on SNB/IVB drm/i915: Wait up to 3ms for the pcu to ack the cdclk change request on SKL
This commit is contained in:
Коммит
e8285cec4e
|
@ -5691,15 +5691,7 @@ static bool skl_cdclk_pcu_ready(struct drm_i915_private *dev_priv)
|
||||||
|
|
||||||
static bool skl_cdclk_wait_for_pcu_ready(struct drm_i915_private *dev_priv)
|
static bool skl_cdclk_wait_for_pcu_ready(struct drm_i915_private *dev_priv)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
return _wait_for(skl_cdclk_pcu_ready(dev_priv), 3000, 10) == 0;
|
||||||
|
|
||||||
for (i = 0; i < 15; i++) {
|
|
||||||
if (skl_cdclk_pcu_ready(dev_priv))
|
|
||||||
return true;
|
|
||||||
udelay(10);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void skl_set_cdclk(struct drm_i915_private *dev_priv, int cdclk, int vco)
|
static void skl_set_cdclk(struct drm_i915_private *dev_priv, int cdclk, int vco)
|
||||||
|
|
|
@ -782,7 +782,7 @@ void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous
|
||||||
struct intel_fbdev *ifbdev = dev_priv->fbdev;
|
struct intel_fbdev *ifbdev = dev_priv->fbdev;
|
||||||
struct fb_info *info;
|
struct fb_info *info;
|
||||||
|
|
||||||
if (!ifbdev)
|
if (!ifbdev || !ifbdev->fb)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
info = ifbdev->helper.fbdev;
|
info = ifbdev->helper.fbdev;
|
||||||
|
@ -827,31 +827,28 @@ void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous
|
||||||
|
|
||||||
void intel_fbdev_output_poll_changed(struct drm_device *dev)
|
void intel_fbdev_output_poll_changed(struct drm_device *dev)
|
||||||
{
|
{
|
||||||
struct drm_i915_private *dev_priv = to_i915(dev);
|
struct intel_fbdev *ifbdev = to_i915(dev)->fbdev;
|
||||||
if (dev_priv->fbdev)
|
|
||||||
drm_fb_helper_hotplug_event(&dev_priv->fbdev->helper);
|
if (ifbdev && ifbdev->fb)
|
||||||
|
drm_fb_helper_hotplug_event(&ifbdev->helper);
|
||||||
}
|
}
|
||||||
|
|
||||||
void intel_fbdev_restore_mode(struct drm_device *dev)
|
void intel_fbdev_restore_mode(struct drm_device *dev)
|
||||||
{
|
{
|
||||||
int ret;
|
struct intel_fbdev *ifbdev = to_i915(dev)->fbdev;
|
||||||
struct drm_i915_private *dev_priv = to_i915(dev);
|
|
||||||
struct intel_fbdev *ifbdev = dev_priv->fbdev;
|
|
||||||
struct drm_fb_helper *fb_helper;
|
|
||||||
|
|
||||||
if (!ifbdev)
|
if (!ifbdev)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
intel_fbdev_sync(ifbdev);
|
intel_fbdev_sync(ifbdev);
|
||||||
|
if (!ifbdev->fb)
|
||||||
|
return;
|
||||||
|
|
||||||
fb_helper = &ifbdev->helper;
|
if (drm_fb_helper_restore_fbdev_mode_unlocked(&ifbdev->helper)) {
|
||||||
|
|
||||||
ret = drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper);
|
|
||||||
if (ret) {
|
|
||||||
DRM_DEBUG("failed to restore crtc mode\n");
|
DRM_DEBUG("failed to restore crtc mode\n");
|
||||||
} else {
|
} else {
|
||||||
mutex_lock(&fb_helper->dev->struct_mutex);
|
mutex_lock(&dev->struct_mutex);
|
||||||
intel_fb_obj_invalidate(ifbdev->fb->obj, ORIGIN_GTT);
|
intel_fb_obj_invalidate(ifbdev->fb->obj, ORIGIN_GTT);
|
||||||
mutex_unlock(&fb_helper->dev->struct_mutex);
|
mutex_unlock(&dev->struct_mutex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4892,7 +4892,8 @@ void gen6_rps_idle(struct drm_i915_private *dev_priv)
|
||||||
else
|
else
|
||||||
gen6_set_rps(dev_priv, dev_priv->rps.idle_freq);
|
gen6_set_rps(dev_priv, dev_priv->rps.idle_freq);
|
||||||
dev_priv->rps.last_adj = 0;
|
dev_priv->rps.last_adj = 0;
|
||||||
I915_WRITE(GEN6_PMINTRMSK, 0xffffffff);
|
I915_WRITE(GEN6_PMINTRMSK,
|
||||||
|
gen6_sanitize_rps_pm_mask(dev_priv, ~0));
|
||||||
}
|
}
|
||||||
mutex_unlock(&dev_priv->rps.hw_lock);
|
mutex_unlock(&dev_priv->rps.hw_lock);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче