Merge branch 'pm-runtime'
Merge updates related to runtime PM for 6.20-rc1/7.0-rc1: - Make several drivers discard pm_runtime_put() return value in preparation for converting that function to a void one (Rafael Wysocki) * pm-runtime: drm: Discard pm_runtime_put() return value genirq/chip: Change irq_chip_pm_put() return type to void scsi: ufs: core: Discard pm_runtime_put() return values platform/chrome: cros_hps_i2c: Discard pm_runtime_put() return value coresight: Discard pm_runtime_put() return values hwspinlock: omap: Discard pm_runtime_put() return value watchdog: rzv2h_wdt: Discard pm_runtime_put() return value watchdog: rz: Discard pm_runtime_put() return values media: ccs: Discard pm_runtime_put() return value drm/imagination: Discard pm_runtime_put() return value USB: core: Discard pm_runtime_put() return valuemaster
commit
073dcc0283
|
|
@ -77,7 +77,6 @@ static void malidp_crtc_atomic_disable(struct drm_crtc *crtc,
|
|||
crtc);
|
||||
struct malidp_drm *malidp = crtc_to_malidp_device(crtc);
|
||||
struct malidp_hw_device *hwdev = malidp->dev;
|
||||
int err;
|
||||
|
||||
/* always disable planes on the CRTC that is being turned off */
|
||||
drm_atomic_helper_disable_planes_on_crtc(old_state, false);
|
||||
|
|
@ -87,10 +86,7 @@ static void malidp_crtc_atomic_disable(struct drm_crtc *crtc,
|
|||
|
||||
clk_disable_unprepare(hwdev->pxlclk);
|
||||
|
||||
err = pm_runtime_put(crtc->dev->dev);
|
||||
if (err < 0) {
|
||||
DRM_DEBUG_DRIVER("Failed to disable runtime power management: %d\n", err);
|
||||
}
|
||||
pm_runtime_put(crtc->dev->dev);
|
||||
}
|
||||
|
||||
static const struct gamma_curve_segment {
|
||||
|
|
|
|||
|
|
@ -280,9 +280,7 @@ static void imx8qm_ldb_bridge_atomic_disable(struct drm_bridge *bridge,
|
|||
clk_disable_unprepare(imx8qm_ldb->clk_bypass);
|
||||
clk_disable_unprepare(imx8qm_ldb->clk_pixel);
|
||||
|
||||
ret = pm_runtime_put(dev);
|
||||
if (ret < 0)
|
||||
DRM_DEV_ERROR(dev, "failed to put runtime PM: %d\n", ret);
|
||||
pm_runtime_put(dev);
|
||||
}
|
||||
|
||||
static const u32 imx8qm_ldb_bus_output_fmts[] = {
|
||||
|
|
|
|||
|
|
@ -282,9 +282,7 @@ static void imx8qxp_ldb_bridge_atomic_disable(struct drm_bridge *bridge,
|
|||
if (is_split && companion)
|
||||
companion->funcs->atomic_disable(companion, state);
|
||||
|
||||
ret = pm_runtime_put(dev);
|
||||
if (ret < 0)
|
||||
DRM_DEV_ERROR(dev, "failed to put runtime PM: %d\n", ret);
|
||||
pm_runtime_put(dev);
|
||||
}
|
||||
|
||||
static const u32 imx8qxp_ldb_bus_output_fmts[] = {
|
||||
|
|
|
|||
|
|
@ -181,11 +181,8 @@ static void imx8qxp_pc_bridge_atomic_disable(struct drm_bridge *bridge,
|
|||
{
|
||||
struct imx8qxp_pc_channel *ch = bridge->driver_private;
|
||||
struct imx8qxp_pc *pc = ch->pc;
|
||||
int ret;
|
||||
|
||||
ret = pm_runtime_put(pc->dev);
|
||||
if (ret < 0)
|
||||
DRM_DEV_ERROR(pc->dev, "failed to put runtime PM: %d\n", ret);
|
||||
pm_runtime_put(pc->dev);
|
||||
}
|
||||
|
||||
static const u32 imx8qxp_pc_bus_output_fmts[] = {
|
||||
|
|
|
|||
|
|
@ -127,11 +127,8 @@ static void imx8qxp_pxl2dpi_bridge_atomic_disable(struct drm_bridge *bridge,
|
|||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct imx8qxp_pxl2dpi *p2d = bridge->driver_private;
|
||||
int ret;
|
||||
|
||||
ret = pm_runtime_put(p2d->dev);
|
||||
if (ret < 0)
|
||||
DRM_DEV_ERROR(p2d->dev, "failed to put runtime PM: %d\n", ret);
|
||||
pm_runtime_put(p2d->dev);
|
||||
|
||||
if (p2d->companion)
|
||||
p2d->companion->funcs->atomic_disable(p2d->companion, state);
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ pvr_power_get(struct pvr_device *pvr_dev)
|
|||
return pm_runtime_resume_and_get(drm_dev->dev);
|
||||
}
|
||||
|
||||
static __always_inline int
|
||||
static __always_inline void
|
||||
pvr_power_put(struct pvr_device *pvr_dev)
|
||||
{
|
||||
struct drm_device *drm_dev = from_pvr_device(pvr_dev);
|
||||
|
||||
return pm_runtime_put(drm_dev->dev);
|
||||
pm_runtime_put(drm_dev->dev);
|
||||
}
|
||||
|
||||
int pvr_power_domains_init(struct pvr_device *pvr_dev);
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ dc_crtc_atomic_disable(struct drm_crtc *crtc, struct drm_atomic_state *state)
|
|||
drm_atomic_get_new_crtc_state(state, crtc);
|
||||
struct dc_drm_device *dc_drm = to_dc_drm_device(crtc->dev);
|
||||
struct dc_crtc *dc_crtc = to_dc_crtc(crtc);
|
||||
int idx, ret;
|
||||
int idx;
|
||||
|
||||
if (!drm_dev_enter(crtc->dev, &idx))
|
||||
goto out;
|
||||
|
|
@ -313,16 +313,10 @@ dc_crtc_atomic_disable(struct drm_crtc *crtc, struct drm_atomic_state *state)
|
|||
dc_fg_disable_clock(dc_crtc->fg);
|
||||
|
||||
/* request pixel engine power-off as plane is off too */
|
||||
ret = pm_runtime_put(dc_drm->pe->dev);
|
||||
if (ret)
|
||||
dc_crtc_err(crtc, "failed to put DC pixel engine RPM: %d\n",
|
||||
ret);
|
||||
pm_runtime_put(dc_drm->pe->dev);
|
||||
|
||||
/* request display engine power-off when CRTC is disabled */
|
||||
ret = pm_runtime_put(dc_crtc->de->dev);
|
||||
if (ret < 0)
|
||||
dc_crtc_err(crtc, "failed to put DC display engine RPM: %d\n",
|
||||
ret);
|
||||
pm_runtime_put(dc_crtc->de->dev);
|
||||
|
||||
drm_dev_exit(idx);
|
||||
|
||||
|
|
|
|||
|
|
@ -848,7 +848,6 @@ static void vc4_hdmi_encoder_post_crtc_powerdown(struct drm_encoder *encoder,
|
|||
struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
|
||||
struct drm_device *drm = vc4_hdmi->connector.dev;
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
int idx;
|
||||
|
||||
mutex_lock(&vc4_hdmi->mutex);
|
||||
|
|
@ -867,9 +866,7 @@ static void vc4_hdmi_encoder_post_crtc_powerdown(struct drm_encoder *encoder,
|
|||
clk_disable_unprepare(vc4_hdmi->pixel_bvb_clock);
|
||||
clk_disable_unprepare(vc4_hdmi->pixel_clock);
|
||||
|
||||
ret = pm_runtime_put(&vc4_hdmi->pdev->dev);
|
||||
if (ret < 0)
|
||||
drm_err(drm, "Failed to release power domain: %d\n", ret);
|
||||
pm_runtime_put(&vc4_hdmi->pdev->dev);
|
||||
|
||||
drm_dev_exit(idx);
|
||||
|
||||
|
|
|
|||
|
|
@ -542,7 +542,7 @@ static void vc4_vec_encoder_disable(struct drm_encoder *encoder,
|
|||
{
|
||||
struct drm_device *drm = encoder->dev;
|
||||
struct vc4_vec *vec = encoder_to_vc4_vec(encoder);
|
||||
int idx, ret;
|
||||
int idx;
|
||||
|
||||
if (!drm_dev_enter(drm, &idx))
|
||||
return;
|
||||
|
|
@ -556,17 +556,9 @@ static void vc4_vec_encoder_disable(struct drm_encoder *encoder,
|
|||
|
||||
clk_disable_unprepare(vec->clock);
|
||||
|
||||
ret = pm_runtime_put(&vec->pdev->dev);
|
||||
if (ret < 0) {
|
||||
drm_err(drm, "Failed to release power domain: %d\n", ret);
|
||||
goto err_dev_exit;
|
||||
}
|
||||
pm_runtime_put(&vec->pdev->dev);
|
||||
|
||||
drm_dev_exit(idx);
|
||||
return;
|
||||
|
||||
err_dev_exit:
|
||||
drm_dev_exit(idx);
|
||||
}
|
||||
|
||||
static void vc4_vec_encoder_enable(struct drm_encoder *encoder,
|
||||
|
|
|
|||
|
|
@ -101,9 +101,7 @@ static int omap_hwspinlock_probe(struct platform_device *pdev)
|
|||
* runtime PM will make sure the clock of this module is
|
||||
* enabled again iff at least one lock is requested
|
||||
*/
|
||||
ret = pm_runtime_put(&pdev->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
pm_runtime_put(&pdev->dev);
|
||||
|
||||
/* one of the four lsb's must be set, and nothing else */
|
||||
if (hweight_long(i & 0xf) != 1 || i > 8)
|
||||
|
|
|
|||
|
|
@ -451,10 +451,10 @@ err:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int debug_disable_func(void)
|
||||
static void debug_disable_func(void)
|
||||
{
|
||||
struct debug_drvdata *drvdata;
|
||||
int cpu, ret, err = 0;
|
||||
int cpu;
|
||||
|
||||
/*
|
||||
* Disable debug power domains, records the error and keep
|
||||
|
|
@ -466,12 +466,8 @@ static int debug_disable_func(void)
|
|||
if (!drvdata)
|
||||
continue;
|
||||
|
||||
ret = pm_runtime_put(drvdata->dev);
|
||||
if (ret < 0)
|
||||
err = ret;
|
||||
pm_runtime_put(drvdata->dev);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static ssize_t debug_func_knob_write(struct file *f,
|
||||
|
|
@ -492,7 +488,7 @@ static ssize_t debug_func_knob_write(struct file *f,
|
|||
if (val)
|
||||
ret = debug_enable_func();
|
||||
else
|
||||
ret = debug_disable_func();
|
||||
debug_disable_func();
|
||||
|
||||
if (ret) {
|
||||
pr_err("%s: unable to %s debug function: %d\n",
|
||||
|
|
|
|||
|
|
@ -1974,7 +1974,9 @@ static int ccs_post_streamoff(struct v4l2_subdev *subdev)
|
|||
struct ccs_sensor *sensor = to_ccs_sensor(subdev);
|
||||
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
|
||||
|
||||
return pm_runtime_put(&client->dev);
|
||||
pm_runtime_put(&client->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ccs_enum_mbus_code(struct v4l2_subdev *subdev,
|
||||
|
|
|
|||
|
|
@ -46,7 +46,9 @@ static int hps_release(struct inode *inode, struct file *file)
|
|||
struct hps_drvdata, misc_device);
|
||||
struct device *dev = &hps->client->dev;
|
||||
|
||||
return pm_runtime_put(dev);
|
||||
pm_runtime_put(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct file_operations hps_fops = {
|
||||
|
|
|
|||
|
|
@ -348,9 +348,9 @@ static inline int ufshcd_rpm_resume(struct ufs_hba *hba)
|
|||
return pm_runtime_resume(&hba->ufs_device_wlun->sdev_gendev);
|
||||
}
|
||||
|
||||
static inline int ufshcd_rpm_put(struct ufs_hba *hba)
|
||||
static inline void ufshcd_rpm_put(struct ufs_hba *hba)
|
||||
{
|
||||
return pm_runtime_put(&hba->ufs_device_wlun->sdev_gendev);
|
||||
pm_runtime_put(&hba->ufs_device_wlun->sdev_gendev);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1810,13 +1810,11 @@ EXPORT_SYMBOL_GPL(usb_autopm_put_interface);
|
|||
void usb_autopm_put_interface_async(struct usb_interface *intf)
|
||||
{
|
||||
struct usb_device *udev = interface_to_usbdev(intf);
|
||||
int status;
|
||||
|
||||
usb_mark_last_busy(udev);
|
||||
status = pm_runtime_put(&intf->dev);
|
||||
dev_vdbg(&intf->dev, "%s: cnt %d -> %d\n",
|
||||
__func__, atomic_read(&intf->dev.power.usage_count),
|
||||
status);
|
||||
pm_runtime_put(&intf->dev);
|
||||
dev_vdbg(&intf->dev, "%s: cnt %d\n",
|
||||
__func__, atomic_read(&intf->dev.power.usage_count));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usb_autopm_put_interface_async);
|
||||
|
||||
|
|
|
|||
|
|
@ -132,9 +132,7 @@ static int rzg2l_wdt_stop(struct watchdog_device *wdev)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = pm_runtime_put(wdev->parent);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
pm_runtime_put(wdev->parent);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,9 +174,7 @@ static int rzv2h_wdt_stop(struct watchdog_device *wdev)
|
|||
if (priv->of_data->wdtdcr)
|
||||
rzt2h_wdt_wdtdcr_count_stop(priv);
|
||||
|
||||
ret = pm_runtime_put(wdev->parent);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
pm_runtime_put(wdev->parent);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -270,9 +268,7 @@ static int rzt2h_wdt_wdtdcr_init(struct platform_device *pdev,
|
|||
|
||||
rzt2h_wdt_wdtdcr_count_stop(priv);
|
||||
|
||||
ret = pm_runtime_put(&pdev->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
pm_runtime_put(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -658,7 +658,7 @@ extern void handle_fasteoi_nmi(struct irq_desc *desc);
|
|||
|
||||
extern int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg);
|
||||
extern int irq_chip_pm_get(struct irq_data *data);
|
||||
extern int irq_chip_pm_put(struct irq_data *data);
|
||||
extern void irq_chip_pm_put(struct irq_data *data);
|
||||
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
|
||||
extern void handle_fasteoi_ack_irq(struct irq_desc *desc);
|
||||
extern void handle_fasteoi_mask_irq(struct irq_desc *desc);
|
||||
|
|
|
|||
|
|
@ -974,7 +974,7 @@ __irq_do_set_handler(struct irq_desc *desc, irq_flow_handler_t handle,
|
|||
irq_state_set_disabled(desc);
|
||||
if (is_chained) {
|
||||
desc->action = NULL;
|
||||
WARN_ON(irq_chip_pm_put(irq_desc_get_irq_data(desc)));
|
||||
irq_chip_pm_put(irq_desc_get_irq_data(desc));
|
||||
}
|
||||
desc->depth = 1;
|
||||
}
|
||||
|
|
@ -1530,20 +1530,20 @@ int irq_chip_pm_get(struct irq_data *data)
|
|||
}
|
||||
|
||||
/**
|
||||
* irq_chip_pm_put - Disable power for an IRQ chip
|
||||
* irq_chip_pm_put - Drop a PM reference on an IRQ chip
|
||||
* @data: Pointer to interrupt specific data
|
||||
*
|
||||
* Disable the power to the IRQ chip referenced by the interrupt data
|
||||
* structure, belongs. Note that power will only be disabled, once this
|
||||
* function has been called for all IRQs that have called irq_chip_pm_get().
|
||||
* Drop a power management reference, acquired via irq_chip_pm_get(), on the IRQ
|
||||
* chip represented by the interrupt data structure.
|
||||
*
|
||||
* Note that this will not disable power to the IRQ chip until this function
|
||||
* has been called for all IRQs that have called irq_chip_pm_get() and it may
|
||||
* not disable power at all (if user space prevents that, for example).
|
||||
*/
|
||||
int irq_chip_pm_put(struct irq_data *data)
|
||||
void irq_chip_pm_put(struct irq_data *data)
|
||||
{
|
||||
struct device *dev = irq_get_pm_device(data);
|
||||
int retval = 0;
|
||||
|
||||
if (IS_ENABLED(CONFIG_PM) && dev)
|
||||
retval = pm_runtime_put(dev);
|
||||
|
||||
return (retval < 0) ? retval : 0;
|
||||
if (dev)
|
||||
pm_runtime_put(dev);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue