summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h
diff options
context:
space:
mode:
authorVinay Belgaumkar <vinay.belgaumkar@intel.com>2021-07-30 13:21:10 -0700
committerJohn Harrison <John.C.Harrison@Intel.com>2021-08-03 16:05:30 -0700
commit63c0eb30bfe9269d79f0cb9cbe6ff86b14928a19 (patch)
treecb9191ae1889f4b13b863e813d502e44e241ca35 /drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h
parent869cd27ece296be710d2039ba930abea3185268f (diff)
drm/i915/guc/slpc: Enable SLPC and add related H2G events
Add methods for interacting with GuC for enabling SLPC. Enable SLPC after GuC submission has been established. GuC load will fail if SLPC cannot be successfully initialized. Add various helper methods to set/unset the parameters for SLPC. They can be set using H2G calls or directly setting bits in the shared data structure. v2: Address several review comments, add new helpers for decoding the SLPC min/max frequencies. Use masks instead of hardcoded constants. (Michal W) v3: Split global_state_to_string function, and check for positive non-zero return value from intel_guc_send() (Michal W) v4: Optimize the stringify function and other comments (Michal W) v5: Enable slpc as well before declaring GuC submission status (Michal W) v6: Checkpatch() Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Signed-off-by: Sundaresan Sujaritha <sujaritha.sundaresan@intel.com> Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210730202119.23810-6-vinay.belgaumkar@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h')
-rw-r--r--drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h
index 8bd753167234..3cefe19b17b2 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h
@@ -8,6 +8,8 @@
#include <linux/types.h>
+#define SLPC_RESET_TIMEOUT_MS 5
+
struct intel_guc_slpc {
struct i915_vma *vma;
struct slpc_shared_data *vaddr;