All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/3] drm/amdgpu: use runpm flag rather than fbcon for kfd runtime suspend (v2)
@ 2021-02-04 20:04 Alex Deucher
  2021-02-05  2:20 ` Lazar, Lijo
  2021-02-05  6:08 ` Bhardwaj, Rajneesh
  0 siblings, 2 replies; 4+ messages in thread
From: Alex Deucher @ 2021-02-04 20:04 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher

the flag used by kfd is not actually related to fbcon, it just happens
to align.  Use the runpm flag instead so that we can decouple it from
the fbcon flag.

v2: fix resume as well

Signed-off-by: Alex Deucher <alexander.deucher@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 0ee6514ee55c..b7ebd424bbc7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3734,7 +3734,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
 
 	r = amdgpu_device_ip_suspend_phase1(adev);
 
-	amdgpu_amdkfd_suspend(adev, !fbcon);
+	amdgpu_amdkfd_suspend(adev, adev->in_runpm);
 
 	/* evict vram memory */
 	amdgpu_bo_evict_vram(adev);
@@ -3818,7 +3818,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
 			}
 		}
 	}
-	r = amdgpu_amdkfd_resume(adev, !fbcon);
+	r = amdgpu_amdkfd_resume(adev, adev->in_runpm);
 	if (r)
 		return r;
 
-- 
2.29.2

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH 2/3] drm/amdgpu: use runpm flag rather than fbcon for kfd runtime suspend (v2)
  2021-02-04 20:04 [PATCH 2/3] drm/amdgpu: use runpm flag rather than fbcon for kfd runtime suspend (v2) Alex Deucher
@ 2021-02-05  2:20 ` Lazar, Lijo
  2021-02-05  2:27   ` Felix Kuehling
  2021-02-05  6:08 ` Bhardwaj, Rajneesh
  1 sibling, 1 reply; 4+ messages in thread
From: Lazar, Lijo @ 2021-02-05  2:20 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx; +Cc: Deucher, Alexander


[-- Attachment #1.1: Type: text/plain, Size: 2304 bytes --]

[AMD Official Use Only - Internal Distribution Only]

If it's part of adev, does it need an arg? Can't kfd check it directly?

Thanks,
Lijo
________________________________
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Alex Deucher <alexdeucher@gmail.com>
Sent: Friday, February 5, 2021 1:34:50 AM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: [PATCH 2/3] drm/amdgpu: use runpm flag rather than fbcon for kfd runtime suspend (v2)

the flag used by kfd is not actually related to fbcon, it just happens
to align.  Use the runpm flag instead so that we can decouple it from
the fbcon flag.

v2: fix resume as well

Signed-off-by: Alex Deucher <alexander.deucher@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 0ee6514ee55c..b7ebd424bbc7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3734,7 +3734,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)

         r = amdgpu_device_ip_suspend_phase1(adev);

-       amdgpu_amdkfd_suspend(adev, !fbcon);
+       amdgpu_amdkfd_suspend(adev, adev->in_runpm);

         /* evict vram memory */
         amdgpu_bo_evict_vram(adev);
@@ -3818,7 +3818,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
                         }
                 }
         }
-       r = amdgpu_amdkfd_resume(adev, !fbcon);
+       r = amdgpu_amdkfd_resume(adev, adev->in_runpm);
         if (r)
                 return r;

--
2.29.2

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Clijo.lazar%40amd.com%7C9c0a731196964976779a08d8c9482859%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637480659051377089%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=HZniciTDOipp%2FQvNqdbKUERQUSciId5HmhQYviQfxaw%3D&amp;reserved=0

[-- Attachment #1.2: Type: text/html, Size: 4364 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH 2/3] drm/amdgpu: use runpm flag rather than fbcon for kfd runtime suspend (v2)
  2021-02-05  2:20 ` Lazar, Lijo
@ 2021-02-05  2:27   ` Felix Kuehling
  0 siblings, 0 replies; 4+ messages in thread
From: Felix Kuehling @ 2021-02-05  2:27 UTC (permalink / raw)
  To: Lazar, Lijo, Alex Deucher, amd-gfx; +Cc: Deucher, Alexander

Am 2021-02-04 um 9:20 p.m. schrieb Lazar, Lijo:
>
> [AMD Official Use Only - Internal Distribution Only]
>
>
> [AMD Official Use Only - Internal Distribution Only]
>
>
> If it's part of adev, does it need an arg? Can't kfd check it directly?

We could. Actually amdgpu_amdkfd_suspend/resume are just a set of
wrapper functions before calling into KFD. That would be the perfect
place to check the adev->run_pm flag.

Either way, this patch is

Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>

Regards,
  Felix


>
> Thanks,
> Lijo
> ------------------------------------------------------------------------
> *From:* amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of
> Alex Deucher <alexdeucher@gmail.com>
> *Sent:* Friday, February 5, 2021 1:34:50 AM
> *To:* amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
> *Cc:* Deucher, Alexander <Alexander.Deucher@amd.com>
> *Subject:* [PATCH 2/3] drm/amdgpu: use runpm flag rather than fbcon
> for kfd runtime suspend (v2)
>  
> the flag used by kfd is not actually related to fbcon, it just happens
> to align.  Use the runpm flag instead so that we can decouple it from
> the fbcon flag.
>
> v2: fix resume as well
>
> Signed-off-by: Alex Deucher <alexander.deucher@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 0ee6514ee55c..b7ebd424bbc7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3734,7 +3734,7 @@ int amdgpu_device_suspend(struct drm_device
> *dev, bool fbcon)
>  
>          r = amdgpu_device_ip_suspend_phase1(adev);
>  
> -       amdgpu_amdkfd_suspend(adev, !fbcon);
> +       amdgpu_amdkfd_suspend(adev, adev->in_runpm);
>  
>          /* evict vram memory */
>          amdgpu_bo_evict_vram(adev);
> @@ -3818,7 +3818,7 @@ int amdgpu_device_resume(struct drm_device *dev,
> bool fbcon)
>                          }
>                  }
>          }
> -       r = amdgpu_amdkfd_resume(adev, !fbcon);
> +       r = amdgpu_amdkfd_resume(adev, adev->in_runpm);
>          if (r)
>                  return r;
>  
> -- 
> 2.29.2
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* RE: [PATCH 2/3] drm/amdgpu: use runpm flag rather than fbcon for kfd runtime suspend (v2)
  2021-02-04 20:04 [PATCH 2/3] drm/amdgpu: use runpm flag rather than fbcon for kfd runtime suspend (v2) Alex Deucher
  2021-02-05  2:20 ` Lazar, Lijo
@ 2021-02-05  6:08 ` Bhardwaj, Rajneesh
  1 sibling, 0 replies; 4+ messages in thread
From: Bhardwaj, Rajneesh @ 2021-02-05  6:08 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx; +Cc: Deucher, Alexander

[AMD Public Use]

Reviewed-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>

-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Thursday, February 4, 2021 3:05 PM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: [PATCH 2/3] drm/amdgpu: use runpm flag rather than fbcon for kfd runtime suspend (v2)

[CAUTION: External Email]

the flag used by kfd is not actually related to fbcon, it just happens to align.  Use the runpm flag instead so that we can decouple it from the fbcon flag.

v2: fix resume as well

Signed-off-by: Alex Deucher <alexander.deucher@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 0ee6514ee55c..b7ebd424bbc7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3734,7 +3734,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)

        r = amdgpu_device_ip_suspend_phase1(adev);

-       amdgpu_amdkfd_suspend(adev, !fbcon);
+       amdgpu_amdkfd_suspend(adev, adev->in_runpm);

        /* evict vram memory */
        amdgpu_bo_evict_vram(adev);
@@ -3818,7 +3818,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
                        }
                }
        }
-       r = amdgpu_amdkfd_resume(adev, !fbcon);
+       r = amdgpu_amdkfd_resume(adev, adev->in_runpm);
        if (r)
                return r;

--
2.29.2

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Crajneesh.bhardwaj%40amd.com%7C9c0a731196964976779a08d8c9482859%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637480659048145725%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=SYs%2FSx9iZmQemW3IcKm7z3Kv5QQQVwjOA7b5idtxE%2Fk%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

end of thread, other threads:[~2021-02-05  6:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 20:04 [PATCH 2/3] drm/amdgpu: use runpm flag rather than fbcon for kfd runtime suspend (v2) Alex Deucher
2021-02-05  2:20 ` Lazar, Lijo
2021-02-05  2:27   ` Felix Kuehling
2021-02-05  6:08 ` Bhardwaj, Rajneesh

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.