Lines Matching full:i915

300 static int hwm_pcode_read_i1(struct drm_i915_private *i915, u32 *uval)  in hwm_pcode_read_i1()  argument
303 if (IS_DG1(i915) || IS_DG2(i915)) in hwm_pcode_read_i1()
306 return snb_pcode_read_p(&i915->uncore, PCODE_POWER_SETUP, in hwm_pcode_read_i1()
310 static int hwm_pcode_write_i1(struct drm_i915_private *i915, u32 uval) in hwm_pcode_write_i1() argument
312 return snb_pcode_write_p(&i915->uncore, PCODE_POWER_SETUP, in hwm_pcode_write_i1()
350 struct drm_i915_private *i915 = ddat->uncore->i915; in hwm_in_is_visible() local
354 return IS_DG1(i915) || IS_DG2(i915) ? 0444 : 0; in hwm_in_is_visible()
382 struct drm_i915_private *i915 = ddat->uncore->i915; in hwm_power_is_visible() local
392 return (hwm_pcode_read_i1(i915, &uval) || in hwm_power_is_visible()
515 ret = hwm_pcode_read_i1(ddat->uncore->i915, &uval); in hwm_power_read()
538 return hwm_pcode_write_i1(ddat->uncore->i915, uval); in hwm_power_write()
544 void i915_hwmon_power_max_disable(struct drm_i915_private *i915, bool *old) in i915_hwmon_power_max_disable() argument
546 struct i915_hwmon *hwmon = i915->hwmon; in i915_hwmon_power_max_disable()
562 void i915_hwmon_power_max_restore(struct drm_i915_private *i915, bool old) in i915_hwmon_power_max_restore() argument
564 struct i915_hwmon *hwmon = i915->hwmon; in i915_hwmon_power_max_restore()
612 struct drm_i915_private *i915 = ddat->uncore->i915; in hwm_curr_is_visible() local
617 return (hwm_pcode_read_i1(i915, &uval) || in hwm_curr_is_visible()
632 ret = hwm_pcode_read_i1(ddat->uncore->i915, &uval); in hwm_curr_read()
653 return hwm_pcode_write_i1(ddat->uncore->i915, uval); in hwm_curr_write()
836 hwm_get_preregistration_info(struct drm_i915_private *i915) in hwm_get_preregistration_info() argument
838 struct i915_hwmon *hwmon = i915->hwmon; in hwm_get_preregistration_info()
839 struct intel_uncore *uncore = &i915->uncore; in hwm_get_preregistration_info()
850 if (IS_DG1(i915) || IS_DG2(i915)) { in hwm_get_preregistration_info()
899 for_each_gt(gt, i915, i) in hwm_get_preregistration_info()
904 void i915_hwmon_register(struct drm_i915_private *i915) in i915_hwmon_register() argument
906 struct device *dev = i915->drm.dev; in i915_hwmon_register()
915 if (!IS_DGFX(i915)) in i915_hwmon_register()
922 i915->hwmon = hwmon; in i915_hwmon_register()
927 ddat->uncore = &i915->uncore; in i915_hwmon_register()
928 snprintf(ddat->name, sizeof(ddat->name), "i915"); in i915_hwmon_register()
932 for_each_gt(gt, i915, i) { in i915_hwmon_register()
941 hwm_get_preregistration_info(i915); in i915_hwmon_register()
953 for_each_gt(gt, i915, i) { in i915_hwmon_register()
971 i915_hwmon_unregister(i915); in i915_hwmon_register()
974 void i915_hwmon_unregister(struct drm_i915_private *i915) in i915_hwmon_unregister() argument
976 struct i915_hwmon *hwmon = i915->hwmon; in i915_hwmon_unregister()
983 for_each_gt(gt, i915, i) in i915_hwmon_unregister()
992 kfree(i915->hwmon); in i915_hwmon_unregister()
993 i915->hwmon = NULL; in i915_hwmon_unregister()