Commit 725a5b54 authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter

drm/i915: Only run idle processing from i915_gem_retire_requests_worker

When adding the fb idle detection to mark-inactive, it was forgotten
that userspace can drive the processing of retire-requests. We assumed
that it would be principally driven by the retire requests worker,
running once every second whilst active and so we would get the deferred
timer for free. Instead we spend too many CPU cycles reclocking the LVDS
preventing real work from being done.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reported-and-tested-by: default avatarAlexander Lam <lambchop468@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58843
Cc: stable@vger.kernel.org
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent f82855d3
...@@ -1899,9 +1899,6 @@ i915_gem_object_move_to_inactive(struct drm_i915_gem_object *obj) ...@@ -1899,9 +1899,6 @@ i915_gem_object_move_to_inactive(struct drm_i915_gem_object *obj)
BUG_ON(obj->base.write_domain & ~I915_GEM_GPU_DOMAINS); BUG_ON(obj->base.write_domain & ~I915_GEM_GPU_DOMAINS);
BUG_ON(!obj->active); BUG_ON(!obj->active);
if (obj->pin_count) /* are we a framebuffer? */
intel_mark_fb_idle(obj);
list_move_tail(&obj->mm_list, &dev_priv->mm.inactive_list); list_move_tail(&obj->mm_list, &dev_priv->mm.inactive_list);
list_del_init(&obj->ring_list); list_del_init(&obj->ring_list);
......
...@@ -6725,11 +6725,6 @@ void intel_mark_busy(struct drm_device *dev) ...@@ -6725,11 +6725,6 @@ void intel_mark_busy(struct drm_device *dev)
void intel_mark_idle(struct drm_device *dev) void intel_mark_idle(struct drm_device *dev)
{ {
}
void intel_mark_fb_busy(struct drm_i915_gem_object *obj)
{
struct drm_device *dev = obj->base.dev;
struct drm_crtc *crtc; struct drm_crtc *crtc;
if (!i915_powersave) if (!i915_powersave)
...@@ -6739,12 +6734,11 @@ void intel_mark_fb_busy(struct drm_i915_gem_object *obj) ...@@ -6739,12 +6734,11 @@ void intel_mark_fb_busy(struct drm_i915_gem_object *obj)
if (!crtc->fb) if (!crtc->fb)
continue; continue;
if (to_intel_framebuffer(crtc->fb)->obj == obj) intel_decrease_pllclock(crtc);
intel_increase_pllclock(crtc);
} }
} }
void intel_mark_fb_idle(struct drm_i915_gem_object *obj) void intel_mark_fb_busy(struct drm_i915_gem_object *obj)
{ {
struct drm_device *dev = obj->base.dev; struct drm_device *dev = obj->base.dev;
struct drm_crtc *crtc; struct drm_crtc *crtc;
...@@ -6757,7 +6751,7 @@ void intel_mark_fb_idle(struct drm_i915_gem_object *obj) ...@@ -6757,7 +6751,7 @@ void intel_mark_fb_idle(struct drm_i915_gem_object *obj)
continue; continue;
if (to_intel_framebuffer(crtc->fb)->obj == obj) if (to_intel_framebuffer(crtc->fb)->obj == obj)
intel_decrease_pllclock(crtc); intel_increase_pllclock(crtc);
} }
} }
......
...@@ -452,9 +452,8 @@ extern bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, ...@@ -452,9 +452,8 @@ extern bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg,
extern void intel_dvo_init(struct drm_device *dev); extern void intel_dvo_init(struct drm_device *dev);
extern void intel_tv_init(struct drm_device *dev); extern void intel_tv_init(struct drm_device *dev);
extern void intel_mark_busy(struct drm_device *dev); extern void intel_mark_busy(struct drm_device *dev);
extern void intel_mark_idle(struct drm_device *dev);
extern void intel_mark_fb_busy(struct drm_i915_gem_object *obj); extern void intel_mark_fb_busy(struct drm_i915_gem_object *obj);
extern void intel_mark_fb_idle(struct drm_i915_gem_object *obj); extern void intel_mark_idle(struct drm_device *dev);
extern bool intel_lvds_init(struct drm_device *dev); extern bool intel_lvds_init(struct drm_device *dev);
extern bool intel_is_dual_link_lvds(struct drm_device *dev); extern bool intel_is_dual_link_lvds(struct drm_device *dev);
extern void intel_dp_init(struct drm_device *dev, int output_reg, extern void intel_dp_init(struct drm_device *dev, int output_reg,
......
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