drm/i915: Move SAGV block time to dev_priv
authorJames Ausmus <james.ausmus@intel.com>
Wed, 9 Oct 2019 17:23:14 +0000 (10:23 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Thu, 10 Oct 2019 18:00:47 +0000 (11:00 -0700)
commitb068a86071ca743de28a607a0b22b41b1a3f5fb3
treef06b0f402c5731a30340c2e964443ec88e65def9
parent52111c4628a29973d8be266f45b464318912b199
drm/i915: Move SAGV block time to dev_priv

In prep for newer platforms having more complicated ways to determine
the SAGV block time, move the variable to dev_priv, and extract the
setting to an initial setup function. While we're at it, update the if
ladder to follow the new gen -> old gen order preference, and warn on
any non-specified gen.

v2: Shorten the function name (Ville), return directly (Ville), move
sagv_block_time_us value to dev_priv (Ville)

v3: Change sagv_block_time_us to u32 (Lucas), Change fallback value to
-1 (Lucas), use intel_has_sagv for setup check rather than hand-rolling
(Lucas)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: James Ausmus <james.ausmus@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191004221449.1317-1-james.ausmus@intel.com
Link: https://patchwork.freedesktop.org/patch/msgid/20191009172315.11004-1-lucas.demarchi@intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_pm.c