drm/i915: remove unused restore_gtt_mappings optimization during suspend
authorImre Deak <imre.deak@intel.com>
Thu, 23 Oct 2014 16:23:20 +0000 (19:23 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 24 Oct 2014 14:34:18 +0000 (16:34 +0200)
commitf4a12ead50580c17c3641ac1a453e68b5a5195dd
treeb64cc44f2197b95fc9a23b583c90cc2f706e06d1
parent097dd83763bfe8e8643957c0b90819742fb01cd9
drm/i915: remove unused restore_gtt_mappings optimization during suspend

The logic to skip restoring GTT mappings was added to speed up
suspend/resume, but not on old GENs where not restoring them caused
problems. The check for old GENs is based on the existence of OpRegion,
but this doesn't work since opregion is initialized only after
the check. So we end up always restoring the mappings.

On my BYT - which has OpRegion - skipping restoring the mappings during
suspend doesn't work, I get a GPU hang after resume. Also the logic of
when to allow the optimization during S4 is reversed: we should allow it
during S4 thaw but not during S4 restore, but atm we have it the other
way around in the code.

Since correctness wins over optimal code and since the optimization
wasn't used anyway I decided not to try to fix it at this point, but
just remove it. This allows us to unify the S3 and S4 handlers in the
following patches.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.c