aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorRodrigo Vivi <rodrigo.vivi@intel.com>2014-06-13 08:10:03 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-06-13 15:21:36 -0400
commit7c8f8a7007cf0069488e0b4e3db5f89d715f297e (patch)
tree2270ba757de4371bb52af827b2569b0c2ba5bb74 /drivers/gpu/drm/i915/i915_gem.c
parent62942ed7279d3e06dc15ae3d47665eff3b373327 (diff)
drm/i915: Force PSR exit by inactivating it.
The perfect solution for psr_exit is the hardware tracking the changes and doing the psr exit by itself. This scenario works for HSW and BDW with some environments like Gnome and Wayland. However there are many other scenarios that this isn't true. Mainly one right now is KDE users on HSW and BDW with PSR on. User would miss many screen updates. For instances any key typed could be seen only when mouse cursor is moved. So this patch introduces the ability of trigger PSR exit on kernel side on some common cases that. Most of the cases are coverred by psr_exit at set_domain. The remaining cases are coverred by triggering it at set_domain, busy_ioctl, sw_finish and mark_busy. The downside here might be reducing the residency time on the cases this already work very wall like Gnome environment. But so far let's get focused on fixinge issues sio PSR couild be used for everybody and we could even get it enabled by default. Later we can add some alternatives to choose the level of PSR efficiency over boot flag of even over crtc property. v2: remove exit from connector_dpms. Daniel pointed this is the wrong way and also this isn't needed for BDW and HSW anyway. Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Vijay Purushothaman <vijay.a.purushothaman@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index c313cb2b641b..1794a041c13c 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1395,6 +1395,8 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data,
1395 goto unlock; 1395 goto unlock;
1396 } 1396 }
1397 1397
1398 intel_edp_psr_exit(dev, true);
1399
1398 /* Try to flush the object off the GPU without holding the lock. 1400 /* Try to flush the object off the GPU without holding the lock.
1399 * We will repeat the flush holding the lock in the normal manner 1401 * We will repeat the flush holding the lock in the normal manner
1400 * to catch cases where we are gazumped. 1402 * to catch cases where we are gazumped.
@@ -1440,6 +1442,8 @@ i915_gem_sw_finish_ioctl(struct drm_device *dev, void *data,
1440 if (ret) 1442 if (ret)
1441 return ret; 1443 return ret;
1442 1444
1445 intel_edp_psr_exit(dev, true);
1446
1443 obj = to_intel_bo(drm_gem_object_lookup(dev, file, args->handle)); 1447 obj = to_intel_bo(drm_gem_object_lookup(dev, file, args->handle));
1444 if (&obj->base == NULL) { 1448 if (&obj->base == NULL) {
1445 ret = -ENOENT; 1449 ret = -ENOENT;
@@ -4236,6 +4240,8 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
4236 if (ret) 4240 if (ret)
4237 return ret; 4241 return ret;
4238 4242
4243 intel_edp_psr_exit(dev, true);
4244
4239 obj = to_intel_bo(drm_gem_object_lookup(dev, file, args->handle)); 4245 obj = to_intel_bo(drm_gem_object_lookup(dev, file, args->handle));
4240 if (&obj->base == NULL) { 4246 if (&obj->base == NULL) {
4241 ret = -ENOENT; 4247 ret = -ENOENT;