/drivers/gpu/drm/i915/ |
D | intel_runtime_pm.c | 78 static void init_intel_runtime_pm_wakeref(struct intel_runtime_pm *rpm) in init_intel_runtime_pm_wakeref() argument 80 spin_lock_init(&rpm->debug.lock); in init_intel_runtime_pm_wakeref() 84 track_intel_runtime_pm_wakeref(struct intel_runtime_pm *rpm) in track_intel_runtime_pm_wakeref() argument 89 if (!rpm->available) in track_intel_runtime_pm_wakeref() 96 spin_lock_irqsave(&rpm->debug.lock, flags); in track_intel_runtime_pm_wakeref() 98 if (!rpm->debug.count) in track_intel_runtime_pm_wakeref() 99 rpm->debug.last_acquire = stack; in track_intel_runtime_pm_wakeref() 101 stacks = krealloc(rpm->debug.owners, in track_intel_runtime_pm_wakeref() 102 (rpm->debug.count + 1) * sizeof(*stacks), in track_intel_runtime_pm_wakeref() 105 stacks[rpm->debug.count++] = stack; in track_intel_runtime_pm_wakeref() [all …]
|
D | intel_runtime_pm.h | 96 assert_rpm_device_not_suspended(struct intel_runtime_pm *rpm) in assert_rpm_device_not_suspended() argument 98 WARN_ONCE(rpm->suspended, in assert_rpm_device_not_suspended() 103 __assert_rpm_raw_wakeref_held(struct intel_runtime_pm *rpm, int wakeref_count) in __assert_rpm_raw_wakeref_held() argument 105 assert_rpm_device_not_suspended(rpm); in __assert_rpm_raw_wakeref_held() 111 __assert_rpm_wakelock_held(struct intel_runtime_pm *rpm, int wakeref_count) in __assert_rpm_wakelock_held() argument 113 __assert_rpm_raw_wakeref_held(rpm, wakeref_count); in __assert_rpm_wakelock_held() 119 assert_rpm_raw_wakeref_held(struct intel_runtime_pm *rpm) in assert_rpm_raw_wakeref_held() argument 121 __assert_rpm_raw_wakeref_held(rpm, atomic_read(&rpm->wakeref_count)); in assert_rpm_raw_wakeref_held() 125 assert_rpm_wakelock_held(struct intel_runtime_pm *rpm) in assert_rpm_wakelock_held() argument 127 __assert_rpm_wakelock_held(rpm, atomic_read(&rpm->wakeref_count)); in assert_rpm_wakelock_held() [all …]
|
D | intel_wakeref.c | 14 wf->wakeref = intel_runtime_pm_get(wf->rpm); in rpm_get() 21 intel_runtime_pm_put(wf->rpm, wakeref); in rpm_put() 97 struct intel_runtime_pm *rpm, in __intel_wakeref_init() argument 101 wf->rpm = rpm; in __intel_wakeref_init() 140 intel_runtime_pm_put(wf->rpm, wakeref); in wakeref_auto_timeout() 144 struct intel_runtime_pm *rpm) in intel_wakeref_auto_init() argument 150 wf->rpm = rpm; in intel_wakeref_auto_init() 164 assert_rpm_wakelock_held(wf->rpm); in intel_wakeref_auto() 170 wf->wakeref = intel_runtime_pm_get_if_in_use(wf->rpm); in intel_wakeref_auto()
|
D | intel_wakeref.h | 42 struct intel_runtime_pm *rpm; member 54 struct intel_runtime_pm *rpm, 57 #define intel_wakeref_init(wf, rpm, ops) do { \ argument 60 __intel_wakeref_init((wf), (rpm), (ops), &__key); \ 254 struct intel_runtime_pm *rpm; member 279 struct intel_runtime_pm *rpm);
|
D | i915_drv.c | 941 struct intel_runtime_pm *rpm = &dev_priv->runtime_pm; in i915_driver_release() local 946 disable_rpm_wakeref_asserts(rpm); in i915_driver_release() 957 enable_rpm_wakeref_asserts(rpm); in i915_driver_release() 958 intel_runtime_pm_driver_release(rpm); in i915_driver_release() 1162 struct intel_runtime_pm *rpm = &dev_priv->runtime_pm; in i915_drm_suspend_late() local 1165 disable_rpm_wakeref_asserts(rpm); in i915_drm_suspend_late() 1201 enable_rpm_wakeref_asserts(rpm); in i915_drm_suspend_late() 1203 intel_runtime_pm_driver_release(rpm); in i915_drm_suspend_late() 1520 struct intel_runtime_pm *rpm = &dev_priv->runtime_pm; in intel_runtime_suspend() local 1528 disable_rpm_wakeref_asserts(rpm); in intel_runtime_suspend() [all …]
|
/drivers/net/ethernet/marvell/octeontx2/af/ |
D | rpm.c | 43 static void rpm_write(rpm_t *rpm, u64 lmac, u64 offset, u64 val) in rpm_write() argument 45 cgx_write(rpm, lmac, offset, val); in rpm_write() 48 static u64 rpm_read(rpm_t *rpm, u64 lmac, u64 offset) in rpm_read() argument 50 return cgx_read(rpm, lmac, offset); in rpm_read() 55 rpm_t *rpm = rpmd; in rpm_get_nr_lmacs() local 57 return hweight8(rpm_read(rpm, 0, CGXX_CMRX_RX_LMACS) & 0xFULL); in rpm_get_nr_lmacs() 62 rpm_t *rpm = rpmd; in rpm_lmac_tx_enable() local 65 if (!is_lmac_valid(rpm, lmac_id)) in rpm_lmac_tx_enable() 68 cfg = rpm_read(rpm, lmac_id, RPMX_MTI_MAC100X_COMMAND_CONFIG); in rpm_lmac_tx_enable() 76 rpm_write(rpm, lmac_id, RPMX_MTI_MAC100X_COMMAND_CONFIG, cfg); in rpm_lmac_tx_enable() [all …]
|
/drivers/mfd/ |
D | qcom_rpm.c | 58 #define RPM_STATUS_REG(rpm, i) ((rpm)->status_regs + (i) * 4) argument 59 #define RPM_CTRL_REG(rpm, i) ((rpm)->ctrl_regs + (i) * 4) argument 60 #define RPM_REQ_REG(rpm, i) ((rpm)->req_regs + (i) * 4) argument 445 int qcom_rpm_write(struct qcom_rpm *rpm, in qcom_rpm_write() argument 451 const struct qcom_rpm_data *data = rpm->data; in qcom_rpm_write() 464 mutex_lock(&rpm->lock); in qcom_rpm_write() 467 writel_relaxed(buf[i], RPM_REQ_REG(rpm, res->target_id + i)); in qcom_rpm_write() 470 for (i = 0; i < rpm->data->req_sel_size; i++) { in qcom_rpm_write() 472 RPM_CTRL_REG(rpm, rpm->data->req_sel_off + i)); in qcom_rpm_write() 475 writel_relaxed(BIT(state), RPM_CTRL_REG(rpm, rpm->data->req_ctx_off)); in qcom_rpm_write() [all …]
|
/drivers/soc/qcom/ |
D | smd-rpm.c | 96 int qcom_rpm_smd_write(struct qcom_smd_rpm *rpm, in qcom_rpm_smd_write() argument 120 mutex_lock(&rpm->lock); in qcom_rpm_smd_write() 132 ret = rpmsg_send(rpm->rpm_channel, pkt, size); in qcom_rpm_smd_write() 136 left = wait_for_completion_timeout(&rpm->ack, RPM_REQUEST_TIMEOUT); in qcom_rpm_smd_write() 140 ret = rpm->ack_status; in qcom_rpm_smd_write() 144 mutex_unlock(&rpm->lock); in qcom_rpm_smd_write() 158 struct qcom_smd_rpm *rpm = dev_get_drvdata(&rpdev->dev); in qcom_smd_rpm_callback() local 167 dev_err(rpm->dev, "invalid request\n"); in qcom_smd_rpm_callback() 192 rpm->ack_status = status; in qcom_smd_rpm_callback() 193 complete(&rpm->ack); in qcom_smd_rpm_callback() [all …]
|
D | rpmpd.c | 108 struct qcom_smd_rpm *rpm; member 399 return qcom_rpm_smd_write(pd->rpm, QCOM_SMD_RPM_ACTIVE_STATE, in rpmpd_send_enable() 411 return qcom_rpm_smd_write(pd->rpm, state, pd->res_type, pd->res_id, in rpmpd_send_corner() 526 struct qcom_smd_rpm *rpm; in rpmpd_probe() local 530 rpm = dev_get_drvdata(pdev->dev.parent); in rpmpd_probe() 531 if (!rpm) { in rpmpd_probe() 561 rpmpds[i]->rpm = rpm; in rpmpd_probe()
|
/drivers/hwmon/ |
D | max31790.c | 48 #define RPM_TO_REG(rpm, sr) ((60 * (sr) * 8192) / ((rpm) * 2)) argument 145 static u8 bits_for_tach_period(int rpm) in bits_for_tach_period() argument 149 if (rpm < 500) in bits_for_tach_period() 151 else if (rpm < 1000) in bits_for_tach_period() 153 else if (rpm < 2000) in bits_for_tach_period() 155 else if (rpm < 4000) in bits_for_tach_period() 157 else if (rpm < 8000) in bits_for_tach_period() 169 int sr, rpm; in max31790_read_fan() local 178 rpm = 0; in max31790_read_fan() 180 rpm = RPM_FROM_REG(data->tach[channel], sr); in max31790_read_fan() [all …]
|
D | aspeed-pwm-tacho.c | 616 int rpm; in rpm_show() local 619 rpm = aspeed_get_fan_tach_ch_rpm(priv, index); in rpm_show() 620 if (rpm < 0) in rpm_show() 621 return rpm; in rpm_show() 623 return sprintf(buf, "%d\n", rpm); in rpm_show() 673 static SENSOR_DEVICE_ATTR_RO(fan1_input, rpm, 0); 674 static SENSOR_DEVICE_ATTR_RO(fan2_input, rpm, 1); 675 static SENSOR_DEVICE_ATTR_RO(fan3_input, rpm, 2); 676 static SENSOR_DEVICE_ATTR_RO(fan4_input, rpm, 3); 677 static SENSOR_DEVICE_ATTR_RO(fan5_input, rpm, 4); [all …]
|
D | ultra45_env.c | 102 int rpm, period; in show_fan_speed() local 108 rpm = FAN_PERIOD_TO_RPM(period); in show_fan_speed() 110 rpm = 0; in show_fan_speed() 112 return sprintf(buf, "%d\n", rpm); in show_fan_speed() 119 unsigned long rpm; in set_fan_speed() local 125 err = kstrtoul(buf, 10, &rpm); in set_fan_speed() 129 if (!rpm) in set_fan_speed() 132 period = FAN_RPM_TO_PERIOD(rpm); in set_fan_speed()
|
D | gpio-fan.c | 25 int rpm; member 153 static int rpm_to_speed_index(struct gpio_fan_data *fan_data, unsigned long rpm) in rpm_to_speed_index() argument 159 if (speed[i].rpm >= rpm) in rpm_to_speed_index() 246 return sprintf(buf, "%d\n", fan_data->speed[0].rpm); in fan1_min_show() 255 fan_data->speed[fan_data->num_speed - 1].rpm); in fan1_max_show() 263 return sprintf(buf, "%d\n", fan_data->speed[fan_data->speed_index].rpm); in fan1_input_show() 270 unsigned long rpm; in set_rpm() local 273 if (kstrtoul(buf, 10, &rpm)) in set_rpm() 283 set_fan_speed(fan_data, rpm_to_speed_index(fan_data, rpm)); in set_rpm() 474 speed[i].rpm = u; in gpio_fan_get_of_data()
|
D | g762.c | 182 static inline unsigned char cnt_from_rpm(unsigned long rpm, u32 clk_freq, u16 p, in cnt_from_rpm() argument 188 if (!rpm) /* to stop the fan, set cnt to 255 */ in cnt_from_rpm() 191 rpm = clamp_val(rpm, f1 / (255 * f2), ULONG_MAX / f2); in cnt_from_rpm() 192 return DIV_ROUND_CLOSEST(f1, rpm * f2); in cnt_from_rpm() 727 unsigned int rpm = 0; in fan1_input_show() local 735 rpm = rpm_from_cnt(data->act_cnt, data->clk_freq, in fan1_input_show() 742 return sprintf(buf, "%u\n", rpm); in fan1_input_show() 931 unsigned int rpm; in fan1_target_show() local 937 rpm = rpm_from_cnt(data->set_cnt, data->clk_freq, in fan1_target_show() 943 return sprintf(buf, "%u\n", rpm); in fan1_target_show()
|
D | g760a.c | 110 unsigned int rpm = 0; in fan1_input_show() local 114 rpm = rpm_from_cnt(data->act_cnt, data->clk, data->fan_div); in fan1_input_show() 117 return sprintf(buf, "%d\n", rpm); in fan1_input_show()
|
/drivers/clk/qcom/ |
D | clk-rpm.c | 89 struct qcom_rpm *rpm; member 94 struct qcom_rpm *rpm; member 121 ret = qcom_rpm_write(r->rpm, QCOM_RPM_ACTIVE_STATE, in clk_rpm_handoff() 125 ret = qcom_rpm_write(r->rpm, QCOM_RPM_SLEEP_STATE, in clk_rpm_handoff() 137 return qcom_rpm_write(r->rpm, QCOM_RPM_ACTIVE_STATE, in clk_rpm_set_rate_active() 145 return qcom_rpm_write(r->rpm, QCOM_RPM_SLEEP_STATE, in clk_rpm_set_rate_sleep() 257 ret = qcom_rpm_write(r->rpm, QCOM_RPM_ACTIVE_STATE, clk_id, &value, 1); in clk_rpm_xo_prepare() 278 ret = qcom_rpm_write(r->rpm, QCOM_RPM_ACTIVE_STATE, clk_id, &value, 1); in clk_rpm_xo_unprepare() 293 ret = qcom_rpm_write(r->rpm, QCOM_RPM_ACTIVE_STATE, in clk_rpm_fixed_prepare() 307 ret = qcom_rpm_write(r->rpm, QCOM_RPM_ACTIVE_STATE, in clk_rpm_fixed_unprepare() [all …]
|
D | clk-smd-rpm.c | 144 struct qcom_smd_rpm *rpm; member 154 struct qcom_rpm *rpm; member 175 ret = qcom_rpm_smd_write(r->rpm, QCOM_SMD_RPM_ACTIVE_STATE, in clk_smd_rpm_handoff() 180 ret = qcom_rpm_smd_write(r->rpm, QCOM_SMD_RPM_SLEEP_STATE, in clk_smd_rpm_handoff() 198 return qcom_rpm_smd_write(r->rpm, QCOM_SMD_RPM_ACTIVE_STATE, in clk_smd_rpm_set_rate_active() 212 return qcom_rpm_smd_write(r->rpm, QCOM_SMD_RPM_SLEEP_STATE, in clk_smd_rpm_set_rate_sleep() 379 static int clk_smd_rpm_enable_scaling(struct qcom_smd_rpm *rpm) in clk_smd_rpm_enable_scaling() argument 388 ret = qcom_rpm_smd_write(rpm, QCOM_SMD_RPM_SLEEP_STATE, in clk_smd_rpm_enable_scaling() 396 ret = qcom_rpm_smd_write(rpm, QCOM_SMD_RPM_ACTIVE_STATE, in clk_smd_rpm_enable_scaling() 1109 struct qcom_smd_rpm *rpm; in rpm_smd_clk_probe() local [all …]
|
/drivers/interconnect/qcom/ |
D | Makefile | 19 icc-smd-rpm-objs := smd-rpm.o icc-rpm.o 37 obj-$(CONFIG_INTERCONNECT_QCOM_SMD_RPM) += icc-smd-rpm.o
|
/drivers/gpu/drm/i915/gvt/ |
D | aperture_gm.c | 137 assert_rpm_wakelock_held(uncore->rpm); in intel_vgpu_write_fence() 176 wakeref = intel_runtime_pm_get(uncore->rpm); in free_vgpu_fence() 187 intel_runtime_pm_put(uncore->rpm, wakeref); in free_vgpu_fence() 198 wakeref = intel_runtime_pm_get(uncore->rpm); in alloc_vgpu_fence() 214 intel_runtime_pm_put(uncore->rpm, wakeref); in alloc_vgpu_fence() 228 intel_runtime_pm_put_unchecked(uncore->rpm); in alloc_vgpu_fence() 325 with_intel_runtime_pm(gvt->gt->uncore->rpm, wakeref) in intel_vgpu_reset_resource()
|
/drivers/gpu/drm/i915/gt/ |
D | selftest_reset.c | 52 wakeref = intel_runtime_pm_get(gt->uncore->rpm); in __igt_reset_stolen() 172 intel_runtime_pm_put(gt->uncore->rpm, wakeref); in __igt_reset_stolen() 215 wakeref = intel_runtime_pm_get(gt->uncore->rpm); in igt_global_reset() 226 intel_runtime_pm_put(gt->uncore->rpm, wakeref); in igt_global_reset() 243 wakeref = intel_runtime_pm_get(gt->uncore->rpm); in igt_wedged_reset() 250 intel_runtime_pm_put(gt->uncore->rpm, wakeref); in igt_wedged_reset()
|
D | intel_gt_pm.c | 126 intel_wakeref_init(>->wakeref, gt->uncore->rpm, &wf_ops); in intel_gt_pm_init_early() 158 wakeref = intel_runtime_pm_get(gt->uncore->rpm); in gt_sanitize() 196 intel_runtime_pm_put(gt->uncore->rpm, wakeref); in gt_sanitize() 336 with_intel_runtime_pm(gt->uncore->rpm, wakeref) { in intel_gt_suspend_late()
|
D | selftest_llc.c | 18 wakeref = intel_runtime_pm_get(llc_to_gt(llc)->uncore->rpm); in gen6_verify_ring_freq() 65 intel_runtime_pm_put(llc_to_gt(llc)->uncore->rpm, wakeref); in gen6_verify_ring_freq()
|
D | intel_engine_pm.c | 295 struct intel_runtime_pm *rpm = engine->uncore->rpm; in intel_engine_init__pm() local 297 intel_wakeref_init(&engine->wakeref, rpm, &wf_ops); in intel_engine_init__pm()
|
/drivers/thunderbolt/ |
D | icm.c | 100 bool rpm; member 112 u8 *proto_version, size_t *nboot_acl, bool *rpm); 456 u8 *proto_version, size_t *nboot_acl, bool *rpm) in icm_fr_driver_ready() argument 857 sw->rpm = intel_vss_is_rtd3(pkg->ep_name, sizeof(pkg->ep_name)); in icm_fr_device_connected() 1015 u8 *proto_version, size_t *nboot_acl, bool *rpm) in icm_tr_driver_ready() argument 1037 if (rpm) in icm_tr_driver_ready() 1038 *rpm = !!(reply.hdr.flags & ICM_TR_FLAGS_RTD3); in icm_tr_driver_ready() 1280 sw->rpm = force_rtd3; in __icm_tr_device_connected() 1281 if (!sw->rpm) in __icm_tr_device_connected() 1282 sw->rpm = intel_vss_is_rtd3(pkg->ep_name, in __icm_tr_device_connected() [all …]
|
/drivers/regulator/ |
D | qcom_smd-regulator.c | 18 struct qcom_smd_rpm *rpm; member 74 ret = qcom_rpm_smd_write(vreg->rpm, QCOM_SMD_RPM_ACTIVE_STATE, in rpm_reg_write_active() 1206 struct device_node *node, struct qcom_smd_rpm *rpm, in rpm_regulator_init_vreg() argument 1224 vreg->rpm = rpm; in rpm_regulator_init_vreg() 1255 struct qcom_smd_rpm *rpm; in rpm_reg_probe() local 1258 rpm = dev_get_drvdata(pdev->dev.parent); in rpm_reg_probe() 1259 if (!rpm) { in rpm_reg_probe() 1275 ret = rpm_regulator_init_vreg(vreg, dev, node, rpm, vreg_data); in rpm_reg_probe()
|