drm/i915: introduce intel_has_sagv()
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Thu, 22 Sep 2016 21:00:28 +0000 (18:00 -0300)
committerJani Nikula <jani.nikula@intel.com>
Mon, 10 Oct 2016 13:06:37 +0000 (16:06 +0300)
commit6e7fdb873d6255ca3c999dd5c6c18962a769ed3e
tree17cda8c375930a45fbafd1c7846100c9a1a7f233
parent674f823b455cdb94d5773406c1caac170f87e1c4
drm/i915: introduce intel_has_sagv()

And use it to move knowledge about the SAGV-supporting platforms from
the callers to the SAGV code.

We'll add more platforms to intel_has_sagv(), so IMHO it makes more
sense to move all this to a single function instead of patching all
the callers every time we add SAGV support to a new platform.

v2: Move I915_SAGV_NOT_CONTROLLED to the new function (Lyude).

Cc: stable@vger.kernel.org
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1474578035-424-3-git-send-email-paulo.r.zanoni@intel.com
(cherry picked from commit 56feca91973459d0b62cbb2610b62d341025ed89)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_pm.c