Re: [PATCH] drm/meson: enable runtime PM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kevin,

On 25/09/2019 21:31, Kevin Hilman wrote:
> From: Kevin Hilman <khilman@xxxxxxxxxxxx>
> 
> On some SoCs, the VPU is in a power-domain and needs runtime PM
> enabled and used in order to keep the power domain on.
> 
> Signed-off-by: Kevin Hilman <khilman@xxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/meson/meson_drv.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
> index 2310c96fff46..256b6a0e9c6b 100644
> --- a/drivers/gpu/drm/meson/meson_drv.c
> +++ b/drivers/gpu/drm/meson/meson_drv.c
> @@ -14,6 +14,7 @@
>  #include <linux/platform_device.h>
>  #include <linux/component.h>
>  #include <linux/of_graph.h>
> +#include <linux/pm_runtime.h>
>  
>  #include <drm/drmP.h>
>  #include <drm/drm_atomic.h>
> @@ -274,6 +275,7 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
>  
>  	/* Hardware Initialization */
>  
> +	pm_runtime_get_sync(dev);
>  	meson_vpu_init(priv);
>  	meson_venc_init(priv);
>  	meson_vpp_init(priv);
> @@ -416,6 +418,7 @@ static int meson_drv_probe(struct platform_device *pdev)
>  	struct device_node *ep, *remote;
>  	int count = 0;
>  
> +	pm_runtime_enable(&pdev->dev);
>  	for_each_endpoint_of_node(np, ep) {
>  		remote = of_graph_get_remote_port_parent(ep);
>  		if (!remote || !of_device_is_available(remote)) {
> @@ -440,6 +443,7 @@ static int meson_drv_probe(struct platform_device *pdev)
>  	}
>  
>  	/* If no output endpoints were available, simply bail out */
> +	pm_runtime_disable(&pdev->dev);
>  	return 0;
>  };
>  
> 

I'll rather implement true runtime PM instead,

Neil
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux