Message ID | 1253589047.24464.3.camel@ubuntu-pli1.bj.intel.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On Tue, 22 Sep 2009 11:10:47 +0800 Li Peng <peng.li@linux.intel.com> wrote: > The cache line flush in i915_gem_detach_phys_object() is big overhead > if userspace app keep updating cursor bo and turn it on and off. > We can keep using the physical objects attached at first time and > don't detach them at cursor turning off. It will reduce the overhead. > > Signed-off-by: Li Peng <peng.li@intel.com> I recently pushed a change to the 2D driver to avoid the on/off calls; it might help avoid the overhead you're fixing here. commit b8c5c996e888485c3a16d645c8490592534a7882 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Tue Sep 15 19:45:47 2009 -0700 Eliminate cursor flicker Jesse
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 748ed50..8e90ce2 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -2744,7 +2744,7 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc, if (intel_crtc->cursor_bo) { if (dev_priv->cursor_needs_physical) { - if (intel_crtc->cursor_bo != bo) + if (intel_crtc->cursor_bo != bo && handle) i915_gem_detach_phys_object(dev, intel_crtc->cursor_bo); } else i915_gem_object_unpin(intel_crtc->cursor_bo);
The cache line flush in i915_gem_detach_phys_object() is big overhead if userspace app keep updating cursor bo and turn it on and off. We can keep using the physical objects attached at first time and don't detach them at cursor turning off. It will reduce the overhead. Signed-off-by: Li Peng <peng.li@intel.com> --- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)