drm/i915: Reorganize .disable hooks for pre-DDI DP
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 20 Sep 2017 15:12:51 +0000 (18:12 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 20 Sep 2017 16:55:47 +0000 (19:55 +0300)
commit1a8ff6076e8f3e197831455e4bba8fa2f5f1d0f1
treee94a1bdf9f238462e9f6ab695889a41a04a6270e
parent76a4b41d654c0eaaf3b4ebc65fc0728d205f028a
drm/i915: Reorganize .disable hooks for pre-DDI DP

Most of our DP encoder hooks are split into per-platform variants.
.disable() an exception, and thus it's a bit messy. Let's split it
up as well. We'll leave the common parts in a helper called by
each platform specific hook. Now each platform has mostly its own
hooks. Some hooks are still shared between vlv and chv, and between
g4x and ilk. None of the remaining shared hooks have any platform
checks in them however so duplicating them doesn't seem particularly
useful.

There is a subtle change on VLV/CHV where we now disable PSR before
audio, whereas before we disabled PSR after audio. That should be
totally fine, and PSR is disabled by default anyway. Jani also pointed
out to me that PSR + audio doesn't seem like a particularly realistic
combination.

v2: Drop the PSR HAS_DDI check here (Rodrigo)
    Pimp up the commit message a bit based on a chat with Jani

Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170920151251.5961-1-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/intel_dp.c