[1/3] drm/exynos: Drop useless check from exynos_drm_{suspend,resume}

Message ID 20180611122500.11587-2-m.szyprowski@samsung.com
State New
Headers show
Series
  • Exynos DRM: cleanup of suspend/resume code
Related show

Commit Message

Marek Szyprowski June 11, 2018, 12:24 p.m.
The virtual Exynos DRM device has no runtime PM enabled, so checking
for its runtime suspended state is useless.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

---
 drivers/gpu/drm/exynos/exynos_drm_drv.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.17.1

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Inki Dae July 24, 2018, 7:12 a.m. | #1
2018년 06월 11일 21:24에 Marek Szyprowski 이(가) 쓴 글:
> The virtual Exynos DRM device has no runtime PM enabled, so checking

> for its runtime suspended state is useless.

> 

> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

> ---

>  drivers/gpu/drm/exynos/exynos_drm_drv.c | 6 +++---

>  1 file changed, 3 insertions(+), 3 deletions(-)

> 

> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c

> index a81b4a5e24a7..c0b4a03ae1b6 100644

> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c

> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c

> @@ -153,7 +153,7 @@ static int exynos_drm_suspend(struct device *dev)

>  	struct drm_device *drm_dev = dev_get_drvdata(dev);

>  	struct exynos_drm_private *private;

>  

> -	if (pm_runtime_suspended(dev) || !drm_dev)

> +	if (!drm_dev)

>  		return 0;

>  

>  	private = drm_dev->dev_private;

> @@ -175,8 +175,8 @@ static int exynos_drm_resume(struct device *dev)

>  	struct drm_device *drm_dev = dev_get_drvdata(dev);

>  	struct exynos_drm_private *private;

>  

> -	if (pm_runtime_suspended(dev) || !drm_dev)

> -		return 0;

> +	if (!drm_dev)

> +		return;


return 0. I will fix it.

Thanks,
Inki Dae

>  

>  	private = drm_dev->dev_private;

>  	drm_atomic_helper_resume(drm_dev, private->suspend_state);

> 

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Marek Szyprowski July 24, 2018, 7:49 a.m. | #2
Hi Inki,

On 2018-07-24 09:12, Inki Dae wrote:
> 2018년 06월 11일 21:24에 Marek Szyprowski 이(가) 쓴 글:

>> The virtual Exynos DRM device has no runtime PM enabled, so checking

>> for its runtime suspended state is useless.

>>

>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

>> ---

>>   drivers/gpu/drm/exynos/exynos_drm_drv.c | 6 +++---

>>   1 file changed, 3 insertions(+), 3 deletions(-)

>>

>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c

>> index a81b4a5e24a7..c0b4a03ae1b6 100644

>> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c

>> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c

>> @@ -153,7 +153,7 @@ static int exynos_drm_suspend(struct device *dev)

>>   	struct drm_device *drm_dev = dev_get_drvdata(dev);

>>   	struct exynos_drm_private *private;

>>   

>> -	if (pm_runtime_suspended(dev) || !drm_dev)

>> +	if (!drm_dev)

>>   		return 0;

>>   

>>   	private = drm_dev->dev_private;

>> @@ -175,8 +175,8 @@ static int exynos_drm_resume(struct device *dev)

>>   	struct drm_device *drm_dev = dev_get_drvdata(dev);

>>   	struct exynos_drm_private *private;

>>   

>> -	if (pm_runtime_suspended(dev) || !drm_dev)

>> -		return 0;

>> +	if (!drm_dev)

>> +		return;

> return 0. I will fix it.


Ah, my fault. This is a result of reordering the patches in the final 
patchset.
After patch 2/3 exynos_drm_resume is assigned to .complete callback, 
which use
'void' return signature, so the 'return 0' has to be changed to 'return' 
again
then. Thanks for fixing this.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Inki Dae July 24, 2018, 7:53 a.m. | #3
2018년 07월 24일 16:49에 Marek Szyprowski 이(가) 쓴 글:
> Hi Inki,

> 

> On 2018-07-24 09:12, Inki Dae wrote:

>> 2018년 06월 11일 21:24에 Marek Szyprowski 이(가) 쓴 글:

>>> The virtual Exynos DRM device has no runtime PM enabled, so checking

>>> for its runtime suspended state is useless.

>>>

>>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

>>> ---

>>>   drivers/gpu/drm/exynos/exynos_drm_drv.c | 6 +++---

>>>   1 file changed, 3 insertions(+), 3 deletions(-)

>>>

>>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c

>>> index a81b4a5e24a7..c0b4a03ae1b6 100644

>>> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c

>>> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c

>>> @@ -153,7 +153,7 @@ static int exynos_drm_suspend(struct device *dev)

>>>   	struct drm_device *drm_dev = dev_get_drvdata(dev);

>>>   	struct exynos_drm_private *private;

>>>   

>>> -	if (pm_runtime_suspended(dev) || !drm_dev)

>>> +	if (!drm_dev)

>>>   		return 0;

>>>   

>>>   	private = drm_dev->dev_private;

>>> @@ -175,8 +175,8 @@ static int exynos_drm_resume(struct device *dev)

>>>   	struct drm_device *drm_dev = dev_get_drvdata(dev);

>>>   	struct exynos_drm_private *private;

>>>   

>>> -	if (pm_runtime_suspended(dev) || !drm_dev)

>>> -		return 0;

>>> +	if (!drm_dev)

>>> +		return;

>> return 0. I will fix it.

> 

> Ah, my fault. This is a result of reordering the patches in the final 

> patchset.

> After patch 2/3 exynos_drm_resume is assigned to .complete callback, 

> which use

> 'void' return signature, so the 'return 0' has to be changed to 'return' 

> again


Already done. :)

> then. Thanks for fixing this.

> 

> Best regards

> 

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index a81b4a5e24a7..c0b4a03ae1b6 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -153,7 +153,7 @@  static int exynos_drm_suspend(struct device *dev)
 	struct drm_device *drm_dev = dev_get_drvdata(dev);
 	struct exynos_drm_private *private;
 
-	if (pm_runtime_suspended(dev) || !drm_dev)
+	if (!drm_dev)
 		return 0;
 
 	private = drm_dev->dev_private;
@@ -175,8 +175,8 @@  static int exynos_drm_resume(struct device *dev)
 	struct drm_device *drm_dev = dev_get_drvdata(dev);
 	struct exynos_drm_private *private;
 
-	if (pm_runtime_suspended(dev) || !drm_dev)
-		return 0;
+	if (!drm_dev)
+		return;
 
 	private = drm_dev->dev_private;
 	drm_atomic_helper_resume(drm_dev, private->suspend_state);