Lines Matching refs:i915
54 static int __sandybridge_pcode_rw(struct drm_i915_private *i915, in __sandybridge_pcode_rw() argument
60 struct intel_uncore *uncore = &i915->uncore; in __sandybridge_pcode_rw()
62 lockdep_assert_held(&i915->sb_lock); in __sandybridge_pcode_rw()
91 if (GRAPHICS_VER(i915) > 6) in __sandybridge_pcode_rw()
97 int sandybridge_pcode_read(struct drm_i915_private *i915, u32 mbox, in sandybridge_pcode_read() argument
102 mutex_lock(&i915->sb_lock); in sandybridge_pcode_read()
103 err = __sandybridge_pcode_rw(i915, mbox, val, val1, in sandybridge_pcode_read()
106 mutex_unlock(&i915->sb_lock); in sandybridge_pcode_read()
109 drm_dbg(&i915->drm, in sandybridge_pcode_read()
117 int sandybridge_pcode_write_timeout(struct drm_i915_private *i915, in sandybridge_pcode_write_timeout() argument
124 mutex_lock(&i915->sb_lock); in sandybridge_pcode_write_timeout()
125 err = __sandybridge_pcode_rw(i915, mbox, &val, NULL, in sandybridge_pcode_write_timeout()
128 mutex_unlock(&i915->sb_lock); in sandybridge_pcode_write_timeout()
131 drm_dbg(&i915->drm, in sandybridge_pcode_write_timeout()
139 static bool skl_pcode_try_request(struct drm_i915_private *i915, u32 mbox, in skl_pcode_try_request() argument
143 *status = __sandybridge_pcode_rw(i915, mbox, &request, NULL, in skl_pcode_try_request()
169 int skl_pcode_request(struct drm_i915_private *i915, u32 mbox, u32 request, in skl_pcode_request() argument
175 mutex_lock(&i915->sb_lock); in skl_pcode_request()
178 skl_pcode_try_request(i915, mbox, request, reply_mask, reply, &status) in skl_pcode_request()
204 drm_dbg_kms(&i915->drm, in skl_pcode_request()
206 drm_WARN_ON_ONCE(&i915->drm, timeout_base_ms > 3); in skl_pcode_request()
212 mutex_unlock(&i915->sb_lock); in skl_pcode_request()
217 int intel_pcode_init(struct drm_i915_private *i915) in intel_pcode_init() argument
221 if (!IS_DGFX(i915)) in intel_pcode_init()
224 ret = skl_pcode_request(i915, DG1_PCODE_STATUS, in intel_pcode_init()
229 drm_dbg(&i915->drm, "PCODE init status %d\n", ret); in intel_pcode_init()
232 drm_err(&i915->drm, "Pcode did not report uncore initialization completion!\n"); in intel_pcode_init()