All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] drm/amdgpu: use drm_device pointer directly rather than convert again
@ 2023-03-10  5:04 Guchun Chen
  2023-03-10  7:04 ` Christian König
  0 siblings, 1 reply; 2+ messages in thread
From: Guchun Chen @ 2023-03-10  5:04 UTC (permalink / raw)
  To: amd-gfx, alexander.deucher, hawking.zhang, evan.quan, christian.koenig
  Cc: Guchun Chen

The convert from adev is redundant.

Signed-off-by: Guchun Chen <guchun.chen@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 41ef3368556b..2937912b7757 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -5575,7 +5575,7 @@ int amdgpu_device_baco_enter(struct drm_device *dev)
 	struct amdgpu_device *adev = drm_to_adev(dev);
 	struct amdgpu_ras *ras = amdgpu_ras_get_context(adev);
 
-	if (!amdgpu_device_supports_baco(adev_to_drm(adev)))
+	if (!amdgpu_device_supports_baco(dev))
 		return -ENOTSUPP;
 
 	if (ras && adev->ras_enabled &&
@@ -5591,7 +5591,7 @@ int amdgpu_device_baco_exit(struct drm_device *dev)
 	struct amdgpu_ras *ras = amdgpu_ras_get_context(adev);
 	int ret = 0;
 
-	if (!amdgpu_device_supports_baco(adev_to_drm(adev)))
+	if (!amdgpu_device_supports_baco(dev))
 		return -ENOTSUPP;
 
 	ret = amdgpu_dpm_baco_exit(adev);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/2] drm/amdgpu: use drm_device pointer directly rather than convert again
  2023-03-10  5:04 [PATCH 2/2] drm/amdgpu: use drm_device pointer directly rather than convert again Guchun Chen
@ 2023-03-10  7:04 ` Christian König
  0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2023-03-10  7:04 UTC (permalink / raw)
  To: Guchun Chen, amd-gfx, alexander.deucher, hawking.zhang,
	evan.quan, christian.koenig

Am 10.03.23 um 06:04 schrieb Guchun Chen:
> The convert from adev is redundant.
>
> Signed-off-by: Guchun Chen <guchun.chen@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 41ef3368556b..2937912b7757 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -5575,7 +5575,7 @@ int amdgpu_device_baco_enter(struct drm_device *dev)
>   	struct amdgpu_device *adev = drm_to_adev(dev);
>   	struct amdgpu_ras *ras = amdgpu_ras_get_context(adev);
>   
> -	if (!amdgpu_device_supports_baco(adev_to_drm(adev)))
> +	if (!amdgpu_device_supports_baco(dev))
>   		return -ENOTSUPP;
>   
>   	if (ras && adev->ras_enabled &&
> @@ -5591,7 +5591,7 @@ int amdgpu_device_baco_exit(struct drm_device *dev)
>   	struct amdgpu_ras *ras = amdgpu_ras_get_context(adev);
>   	int ret = 0;
>   
> -	if (!amdgpu_device_supports_baco(adev_to_drm(adev)))
> +	if (!amdgpu_device_supports_baco(dev))
>   		return -ENOTSUPP;
>   
>   	ret = amdgpu_dpm_baco_exit(adev);


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-10  7:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-10  5:04 [PATCH 2/2] drm/amdgpu: use drm_device pointer directly rather than convert again Guchun Chen
2023-03-10  7:04 ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.