lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 24 Sep 2014 16:37:53 -0400
From:	Alex Deucher <alexdeucher@...il.com>
To:	Vinod Koul <vinod.koul@...el.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Maling list - DRI developers 
	<dri-devel@...ts.freedesktop.org>,
	Alex Deucher <alexander.deucher@....com>,
	subhransu.s.prusty@...el.com,
	Christian König <christian.koenig@....com>
Subject: Re: [PATCH 06/27] drm/radeon: use pm_runtime_last_busy_and_autosuspend
 helper

On Wed, Sep 24, 2014 at 12:14 PM, Vinod Koul <vinod.koul@...el.com> wrote:
> Use the new pm_runtime_last_busy_and_autosuspend helper instead of open
> coding the same code
>
> Signed-off-by: Vinod Koul <vinod.koul@...el.com>

Acked-by: Alex Deucher <alexander.deucher@....com>

I don't care which tree this goes through.

> ---
>  drivers/gpu/drm/radeon/radeon_connectors.c |   15 +++++----------
>  drivers/gpu/drm/radeon/radeon_drv.c        |    5 ++---
>  drivers/gpu/drm/radeon/radeon_kms.c        |    6 ++----
>  3 files changed, 9 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
> index 300c4b3..b48cf9d 100644
> --- a/drivers/gpu/drm/radeon/radeon_connectors.c
> +++ b/drivers/gpu/drm/radeon/radeon_connectors.c
> @@ -852,8 +852,7 @@ radeon_lvds_detect(struct drm_connector *connector, bool force)
>         /* check acpi lid status ??? */
>
>         radeon_connector_update_scratch_regs(connector, ret);
> -       pm_runtime_mark_last_busy(connector->dev->dev);
> -       pm_runtime_put_autosuspend(connector->dev->dev);
> +       pm_runtime_last_busy_and_autosuspend(connector->dev->dev);
>         return ret;
>  }
>
> @@ -1025,8 +1024,7 @@ radeon_vga_detect(struct drm_connector *connector, bool force)
>         radeon_connector_update_scratch_regs(connector, ret);
>
>  out:
> -       pm_runtime_mark_last_busy(connector->dev->dev);
> -       pm_runtime_put_autosuspend(connector->dev->dev);
> +       pm_runtime_last_busy_and_autosuspend(connector->dev->dev);
>
>         return ret;
>  }
> @@ -1103,8 +1101,7 @@ radeon_tv_detect(struct drm_connector *connector, bool force)
>         if (ret == connector_status_connected)
>                 ret = radeon_connector_analog_encoder_conflict_solve(connector, encoder, ret, false);
>         radeon_connector_update_scratch_regs(connector, ret);
> -       pm_runtime_mark_last_busy(connector->dev->dev);
> -       pm_runtime_put_autosuspend(connector->dev->dev);
> +       pm_runtime_last_busy_and_autosuspend(connector->dev->dev);
>         return ret;
>  }
>
> @@ -1321,8 +1318,7 @@ out:
>         radeon_connector_update_scratch_regs(connector, ret);
>
>  exit:
> -       pm_runtime_mark_last_busy(connector->dev->dev);
> -       pm_runtime_put_autosuspend(connector->dev->dev);
> +       pm_runtime_last_busy_and_autosuspend(connector->dev->dev);
>
>         return ret;
>  }
> @@ -1638,8 +1634,7 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
>
>         radeon_connector_update_scratch_regs(connector, ret);
>  out:
> -       pm_runtime_mark_last_busy(connector->dev->dev);
> -       pm_runtime_put_autosuspend(connector->dev->dev);
> +       pm_runtime_last_busy_and_autosuspend(connector->dev->dev);
>
>         return ret;
>  }
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index 092d067..548d129 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -503,9 +503,8 @@ long radeon_drm_ioctl(struct file *filp,
>                 return ret;
>
>         ret = drm_ioctl(filp, cmd, arg);
> -
> -       pm_runtime_mark_last_busy(dev->dev);
> -       pm_runtime_put_autosuspend(dev->dev);
> +
> +       pm_runtime_last_busy_and_autosuspend(dev->dev);
>         return ret;
>  }
>
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> index eb7164d..80f061d 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> @@ -147,8 +147,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
>                 pm_runtime_set_autosuspend_delay(dev->dev, 5000);
>                 pm_runtime_set_active(dev->dev);
>                 pm_runtime_allow(dev->dev);
> -               pm_runtime_mark_last_busy(dev->dev);
> -               pm_runtime_put_autosuspend(dev->dev);
> +               pm_runtime_last_busy_and_autosuspend(dev->dev);
>         }
>
>  out:
> @@ -632,8 +631,7 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
>                 file_priv->driver_priv = fpriv;
>         }
>
> -       pm_runtime_mark_last_busy(dev->dev);
> -       pm_runtime_put_autosuspend(dev->dev);
> +       pm_runtime_last_busy_and_autosuspend(dev->dev);
>         return 0;
>  }
>
> --
> 1.7.0.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ