amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdkfd: Add Aldebaran virtualization support
@ 2021-04-29 20:13 Zhigang Luo
  2021-04-29 20:13 ` [PATCH 2/2] drm/amdgpu: " Zhigang Luo
  0 siblings, 1 reply; 5+ messages in thread
From: Zhigang Luo @ 2021-04-29 20:13 UTC (permalink / raw)
  To: amd-gfx; +Cc: Zhigang Luo

update kfd_supported_devices to enable Aldebaran virtualization support

Signed-off-by: Zhigang Luo <zhigang.luo@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
index ae3cabb47a26..dedb8e33b953 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -578,7 +578,7 @@ static const struct kfd_device_info *kfd_supported_devices[][2] = {
 	[CHIP_VEGA20] = {&vega20_device_info, NULL},
 	[CHIP_RENOIR] = {&renoir_device_info, NULL},
 	[CHIP_ARCTURUS] = {&arcturus_device_info, &arcturus_device_info},
-	[CHIP_ALDEBARAN] = {&aldebaran_device_info, NULL},
+	[CHIP_ALDEBARAN] = {&aldebaran_device_info, &aldebaran_device_info},
 	[CHIP_NAVI10] = {&navi10_device_info, NULL},
 	[CHIP_NAVI12] = {&navi12_device_info, &navi12_device_info},
 	[CHIP_NAVI14] = {&navi14_device_info, NULL},
-- 
2.17.1

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

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

* [PATCH 2/2] drm/amdgpu: Add Aldebaran virtualization support
  2021-04-29 20:13 [PATCH 1/2] drm/amdkfd: Add Aldebaran virtualization support Zhigang Luo
@ 2021-04-29 20:13 ` Zhigang Luo
  2021-04-29 20:16   ` Alex Deucher
  0 siblings, 1 reply; 5+ messages in thread
From: Zhigang Luo @ 2021-04-29 20:13 UTC (permalink / raw)
  To: amd-gfx; +Cc: Zhigang Luo

1. add Aldebaran in virtualization detection list.
2. disable Aldebaran virtual display support as there is no GFX
   engine in Aldebaran.
3. skip TMR loading if Aldebaran is in virtualizatin mode as it
   shares the one host loaded.

Signed-off-by: Zhigang Luo <zhigang.luo@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c  | 1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 9 ++++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 623044414bb5..17b728d2c1f2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -422,6 +422,7 @@ static bool psp_skip_tmr(struct psp_context *psp)
 	switch (psp->adev->asic_type) {
 	case CHIP_NAVI12:
 	case CHIP_SIENNA_CICHLID:
+	case CHIP_ALDEBARAN:
 		return true;
 	default:
 		return false;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index 0c9c5255aa42..691066e9c1f3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -50,9 +50,11 @@ void amdgpu_virt_init_setting(struct amdgpu_device *adev)
 	struct drm_device *ddev = adev_to_drm(adev);
 
 	/* enable virtual display */
-	if (adev->mode_info.num_crtc == 0)
-		adev->mode_info.num_crtc = 1;
-	adev->enable_virtual_display = true;
+	if (adev->asic_type != CHIP_ALDEBARAN) {
+		if (adev->mode_info.num_crtc == 0)
+			adev->mode_info.num_crtc = 1;
+		adev->enable_virtual_display = true;
+	}
 	ddev->driver_features &= ~DRIVER_ATOMIC;
 	adev->cg_flags = 0;
 	adev->pg_flags = 0;
@@ -679,6 +681,7 @@ void amdgpu_detect_virtualization(struct amdgpu_device *adev)
 		case CHIP_VEGA10:
 		case CHIP_VEGA20:
 		case CHIP_ARCTURUS:
+		case CHIP_ALDEBARAN:
 			soc15_set_virt_ops(adev);
 			break;
 		case CHIP_NAVI10:
-- 
2.17.1

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

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

* Re: [PATCH 2/2] drm/amdgpu: Add Aldebaran virtualization support
  2021-04-29 20:13 ` [PATCH 2/2] drm/amdgpu: " Zhigang Luo
@ 2021-04-29 20:16   ` Alex Deucher
  2021-04-29 20:22     ` Luo, Zhigang
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Deucher @ 2021-04-29 20:16 UTC (permalink / raw)
  To: Zhigang Luo; +Cc: amd-gfx list

On Thu, Apr 29, 2021 at 4:13 PM Zhigang Luo <zhigang.luo@amd.com> wrote:
>
> 1. add Aldebaran in virtualization detection list.
> 2. disable Aldebaran virtual display support as there is no GFX
>    engine in Aldebaran.
> 3. skip TMR loading if Aldebaran is in virtualizatin mode as it
>    shares the one host loaded.
>
> Signed-off-by: Zhigang Luo <zhigang.luo@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c  | 1 +
>  drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 9 ++++++---
>  2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> index 623044414bb5..17b728d2c1f2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> @@ -422,6 +422,7 @@ static bool psp_skip_tmr(struct psp_context *psp)
>         switch (psp->adev->asic_type) {
>         case CHIP_NAVI12:
>         case CHIP_SIENNA_CICHLID:
> +       case CHIP_ALDEBARAN:
>                 return true;
>         default:
>                 return false;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> index 0c9c5255aa42..691066e9c1f3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> @@ -50,9 +50,11 @@ void amdgpu_virt_init_setting(struct amdgpu_device *adev)
>         struct drm_device *ddev = adev_to_drm(adev);
>
>         /* enable virtual display */
> -       if (adev->mode_info.num_crtc == 0)
> -               adev->mode_info.num_crtc = 1;
> -       adev->enable_virtual_display = true;
> +       if (adev->asic_type != CHIP_ALDEBARAN) {

We should check for ARCTURUS here as well.

Alex

> +               if (adev->mode_info.num_crtc == 0)
> +                       adev->mode_info.num_crtc = 1;
> +               adev->enable_virtual_display = true;
> +       }
>         ddev->driver_features &= ~DRIVER_ATOMIC;
>         adev->cg_flags = 0;
>         adev->pg_flags = 0;
> @@ -679,6 +681,7 @@ void amdgpu_detect_virtualization(struct amdgpu_device *adev)
>                 case CHIP_VEGA10:
>                 case CHIP_VEGA20:
>                 case CHIP_ARCTURUS:
> +               case CHIP_ALDEBARAN:
>                         soc15_set_virt_ops(adev);
>                         break;
>                 case CHIP_NAVI10:
> --
> 2.17.1
>
> _______________________________________________
> 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] 5+ messages in thread

* RE: [PATCH 2/2] drm/amdgpu: Add Aldebaran virtualization support
  2021-04-29 20:16   ` Alex Deucher
@ 2021-04-29 20:22     ` Luo, Zhigang
  2021-04-29 20:24       ` Alex Deucher
  0 siblings, 1 reply; 5+ messages in thread
From: Luo, Zhigang @ 2021-04-29 20:22 UTC (permalink / raw)
  To: Alex Deucher; +Cc: amd-gfx list

[AMD Official Use Only - Internal Distribution Only]

Thanks Alex.

 I will add it.

--Zhigang

-----Original Message-----
From: Alex Deucher <alexdeucher@gmail.com>
Sent: April 29, 2021 4:17 PM
To: Luo, Zhigang <Zhigang.Luo@amd.com>
Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/amdgpu: Add Aldebaran virtualization support

On Thu, Apr 29, 2021 at 4:13 PM Zhigang Luo <zhigang.luo@amd.com> wrote:
>
> 1. add Aldebaran in virtualization detection list.
> 2. disable Aldebaran virtual display support as there is no GFX
>    engine in Aldebaran.
> 3. skip TMR loading if Aldebaran is in virtualizatin mode as it
>    shares the one host loaded.
>
> Signed-off-by: Zhigang Luo <zhigang.luo@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c  | 1 +
> drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 9 ++++++---
>  2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> index 623044414bb5..17b728d2c1f2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> @@ -422,6 +422,7 @@ static bool psp_skip_tmr(struct psp_context *psp)
>         switch (psp->adev->asic_type) {
>         case CHIP_NAVI12:
>         case CHIP_SIENNA_CICHLID:
> +       case CHIP_ALDEBARAN:
>                 return true;
>         default:
>                 return false;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> index 0c9c5255aa42..691066e9c1f3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> @@ -50,9 +50,11 @@ void amdgpu_virt_init_setting(struct amdgpu_device *adev)
>         struct drm_device *ddev = adev_to_drm(adev);
>
>         /* enable virtual display */
> -       if (adev->mode_info.num_crtc == 0)
> -               adev->mode_info.num_crtc = 1;
> -       adev->enable_virtual_display = true;
> +       if (adev->asic_type != CHIP_ALDEBARAN) {

We should check for ARCTURUS here as well.

Alex

> +               if (adev->mode_info.num_crtc == 0)
> +                       adev->mode_info.num_crtc = 1;
> +               adev->enable_virtual_display = true;
> +       }
>         ddev->driver_features &= ~DRIVER_ATOMIC;
>         adev->cg_flags = 0;
>         adev->pg_flags = 0;
> @@ -679,6 +681,7 @@ void amdgpu_detect_virtualization(struct amdgpu_device *adev)
>                 case CHIP_VEGA10:
>                 case CHIP_VEGA20:
>                 case CHIP_ARCTURUS:
> +               case CHIP_ALDEBARAN:
>                         soc15_set_virt_ops(adev);
>                         break;
>                 case CHIP_NAVI10:
> --
> 2.17.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Czh
> igang.luo%40amd.com%7C6379911fec0b46ae127e08d90b4bc186%7C3dd8961fe4884
> e608e11a82d994e183d%7C0%7C0%7C637553242264820358%7CUnknown%7CTWFpbGZsb
> 3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%
> 7C1000&amp;sdata=sDmmizo0SMOhi8dTIVLRVpkLEocssobJCCQEyASwbGk%3D&amp;re
> served=0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH 2/2] drm/amdgpu: Add Aldebaran virtualization support
  2021-04-29 20:22     ` Luo, Zhigang
@ 2021-04-29 20:24       ` Alex Deucher
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2021-04-29 20:24 UTC (permalink / raw)
  To: Luo, Zhigang; +Cc: amd-gfx list

On Thu, Apr 29, 2021 at 4:22 PM Luo, Zhigang <Zhigang.Luo@amd.com> wrote:
>
> [AMD Official Use Only - Internal Distribution Only]
>
> Thanks Alex.
>
>  I will add it.

With that fixed, the series is:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

>
> --Zhigang
>
> -----Original Message-----
> From: Alex Deucher <alexdeucher@gmail.com>
> Sent: April 29, 2021 4:17 PM
> To: Luo, Zhigang <Zhigang.Luo@amd.com>
> Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>
> Subject: Re: [PATCH 2/2] drm/amdgpu: Add Aldebaran virtualization support
>
> On Thu, Apr 29, 2021 at 4:13 PM Zhigang Luo <zhigang.luo@amd.com> wrote:
> >
> > 1. add Aldebaran in virtualization detection list.
> > 2. disable Aldebaran virtual display support as there is no GFX
> >    engine in Aldebaran.
> > 3. skip TMR loading if Aldebaran is in virtualizatin mode as it
> >    shares the one host loaded.
> >
> > Signed-off-by: Zhigang Luo <zhigang.luo@amd.com>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c  | 1 +
> > drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 9 ++++++---
> >  2 files changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> > index 623044414bb5..17b728d2c1f2 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> > @@ -422,6 +422,7 @@ static bool psp_skip_tmr(struct psp_context *psp)
> >         switch (psp->adev->asic_type) {
> >         case CHIP_NAVI12:
> >         case CHIP_SIENNA_CICHLID:
> > +       case CHIP_ALDEBARAN:
> >                 return true;
> >         default:
> >                 return false;
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> > index 0c9c5255aa42..691066e9c1f3 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> > @@ -50,9 +50,11 @@ void amdgpu_virt_init_setting(struct amdgpu_device *adev)
> >         struct drm_device *ddev = adev_to_drm(adev);
> >
> >         /* enable virtual display */
> > -       if (adev->mode_info.num_crtc == 0)
> > -               adev->mode_info.num_crtc = 1;
> > -       adev->enable_virtual_display = true;
> > +       if (adev->asic_type != CHIP_ALDEBARAN) {
>
> We should check for ARCTURUS here as well.
>
> Alex
>
> > +               if (adev->mode_info.num_crtc == 0)
> > +                       adev->mode_info.num_crtc = 1;
> > +               adev->enable_virtual_display = true;
> > +       }
> >         ddev->driver_features &= ~DRIVER_ATOMIC;
> >         adev->cg_flags = 0;
> >         adev->pg_flags = 0;
> > @@ -679,6 +681,7 @@ void amdgpu_detect_virtualization(struct amdgpu_device *adev)
> >                 case CHIP_VEGA10:
> >                 case CHIP_VEGA20:
> >                 case CHIP_ARCTURUS:
> > +               case CHIP_ALDEBARAN:
> >                         soc15_set_virt_ops(adev);
> >                         break;
> >                 case CHIP_NAVI10:
> > --
> > 2.17.1
> >
> > _______________________________________________
> > amd-gfx mailing list
> > amd-gfx@lists.freedesktop.org
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> > s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Czh
> > igang.luo%40amd.com%7C6379911fec0b46ae127e08d90b4bc186%7C3dd8961fe4884
> > e608e11a82d994e183d%7C0%7C0%7C637553242264820358%7CUnknown%7CTWFpbGZsb
> > 3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%
> > 7C1000&amp;sdata=sDmmizo0SMOhi8dTIVLRVpkLEocssobJCCQEyASwbGk%3D&amp;re
> > served=0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

end of thread, other threads:[~2021-04-29 20:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 20:13 [PATCH 1/2] drm/amdkfd: Add Aldebaran virtualization support Zhigang Luo
2021-04-29 20:13 ` [PATCH 2/2] drm/amdgpu: " Zhigang Luo
2021-04-29 20:16   ` Alex Deucher
2021-04-29 20:22     ` Luo, Zhigang
2021-04-29 20:24       ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).