All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is enabled
@ 2022-05-20  7:59 Danijel Slivka
  2022-05-20 13:29 ` Alex Deucher
  0 siblings, 1 reply; 6+ messages in thread
From: Danijel Slivka @ 2022-05-20  7:59 UTC (permalink / raw)
  To: amd-gfx; +Cc: Danijel Slivka

In case virtaul_display is enabled there is no hw DCE so
need to skip setting up fbdev.

Signed-off-by: Danijel Slivka <danijel.slivka@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 3b9dc1803be9..8d03eec49eef 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -2095,6 +2095,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
 	 * 2. don't init fbdev if there are no connectors
 	 */
 	if (adev->mode_info.mode_config_initialized &&
+	    !adev->enable_virtual_display &&
 	    !list_empty(&adev_to_drm(adev)->mode_config.connector_list)) {
 		/* select 8 bpp console on low vram cards */
 		if (adev->gmc.real_vram_size <= (32*1024*1024))
-- 
2.25.1


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

* Re: [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is enabled
  2022-05-20  7:59 [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is enabled Danijel Slivka
@ 2022-05-20 13:29 ` Alex Deucher
  2022-05-20 14:12   ` Slivka, Danijel
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Deucher @ 2022-05-20 13:29 UTC (permalink / raw)
  To: Danijel Slivka; +Cc: amd-gfx list

On Fri, May 20, 2022 at 3:59 AM Danijel Slivka <danijel.slivka@amd.com> wrote:
>
> In case virtaul_display is enabled there is no hw DCE so
> need to skip setting up fbdev.

Wouldn't you theoretically still want fbdev even if it is virtual?

Alex

>
> Signed-off-by: Danijel Slivka <danijel.slivka@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 3b9dc1803be9..8d03eec49eef 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -2095,6 +2095,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
>          * 2. don't init fbdev if there are no connectors
>          */
>         if (adev->mode_info.mode_config_initialized &&
> +           !adev->enable_virtual_display &&
>             !list_empty(&adev_to_drm(adev)->mode_config.connector_list)) {
>                 /* select 8 bpp console on low vram cards */
>                 if (adev->gmc.real_vram_size <= (32*1024*1024))
> --
> 2.25.1
>

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

* RE: [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is enabled
  2022-05-20 13:29 ` Alex Deucher
@ 2022-05-20 14:12   ` Slivka, Danijel
  2022-05-20 14:32     ` Alex Deucher
  0 siblings, 1 reply; 6+ messages in thread
From: Slivka, Danijel @ 2022-05-20 14:12 UTC (permalink / raw)
  To: Alex Deucher; +Cc: amd-gfx list

[AMD Official Use Only - General]

Hi,

Based on the code we shouldn't init the fbdev on hw without DCE:

        /*
         * 1. don't init fbdev on hw without DCE
         * 2. don't init fbdev if there are no connectors
         */
        if (adev->mode_info.mode_config_initialized &&
            !list_empty(&adev_to_drm(adev)->mode_config.connector_list)) {
                /* select 8 bpp console on low vram cards */
                if (adev->gmc.real_vram_size <= (32*1024*1024))
                        drm_fbdev_generic_setup(adev_to_drm(adev), 8);
                else
                        drm_fbdev_generic_setup(adev_to_drm(adev), 32);
        }

For virtualization we always use virtual_display and doesn’t have the hw DCE for that reason setting up fbdev should be skipped.


BR,
Danijel Slivka

-----Original Message-----
From: Alex Deucher <alexdeucher@gmail.com>
Sent: Friday, May 20, 2022 3:30 PM
To: Slivka, Danijel <Danijel.Slivka@amd.com>
Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is enabled

On Fri, May 20, 2022 at 3:59 AM Danijel Slivka <danijel.slivka@amd.com> wrote:
>
> In case virtaul_display is enabled there is no hw DCE so need to skip
> setting up fbdev.

Wouldn't you theoretically still want fbdev even if it is virtual?

Alex

>
> Signed-off-by: Danijel Slivka <danijel.slivka@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 3b9dc1803be9..8d03eec49eef 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -2095,6 +2095,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
>          * 2. don't init fbdev if there are no connectors
>          */
>         if (adev->mode_info.mode_config_initialized &&
> +           !adev->enable_virtual_display &&
>             !list_empty(&adev_to_drm(adev)->mode_config.connector_list)) {
>                 /* select 8 bpp console on low vram cards */
>                 if (adev->gmc.real_vram_size <= (32*1024*1024))
> --
> 2.25.1
>

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

* Re: [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is enabled
  2022-05-20 14:12   ` Slivka, Danijel
@ 2022-05-20 14:32     ` Alex Deucher
  2022-05-20 14:49       ` Slivka, Danijel
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Deucher @ 2022-05-20 14:32 UTC (permalink / raw)
  To: Slivka, Danijel; +Cc: amd-gfx list

On Fri, May 20, 2022 at 10:12 AM Slivka, Danijel <Danijel.Slivka@amd.com> wrote:
>
> [AMD Official Use Only - General]
>
> Hi,
>
> Based on the code we shouldn't init the fbdev on hw without DCE:

That comment means don't init fbdev on chips without display hardware
(either real or virtual).  E.g., iceland or MI100.

Alex

>
>         /*
>          * 1. don't init fbdev on hw without DCE
>          * 2. don't init fbdev if there are no connectors
>          */
>         if (adev->mode_info.mode_config_initialized &&
>             !list_empty(&adev_to_drm(adev)->mode_config.connector_list)) {
>                 /* select 8 bpp console on low vram cards */
>                 if (adev->gmc.real_vram_size <= (32*1024*1024))
>                         drm_fbdev_generic_setup(adev_to_drm(adev), 8);
>                 else
>                         drm_fbdev_generic_setup(adev_to_drm(adev), 32);
>         }
>
> For virtualization we always use virtual_display and doesn’t have the hw DCE for that reason setting up fbdev should be skipped.
>
>
> BR,
> Danijel Slivka
>
> -----Original Message-----
> From: Alex Deucher <alexdeucher@gmail.com>
> Sent: Friday, May 20, 2022 3:30 PM
> To: Slivka, Danijel <Danijel.Slivka@amd.com>
> Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>
> Subject: Re: [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is enabled
>
> On Fri, May 20, 2022 at 3:59 AM Danijel Slivka <danijel.slivka@amd.com> wrote:
> >
> > In case virtaul_display is enabled there is no hw DCE so need to skip
> > setting up fbdev.
>
> Wouldn't you theoretically still want fbdev even if it is virtual?
>
> Alex
>
> >
> > Signed-off-by: Danijel Slivka <danijel.slivka@amd.com>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > index 3b9dc1803be9..8d03eec49eef 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > @@ -2095,6 +2095,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
> >          * 2. don't init fbdev if there are no connectors
> >          */
> >         if (adev->mode_info.mode_config_initialized &&
> > +           !adev->enable_virtual_display &&
> >             !list_empty(&adev_to_drm(adev)->mode_config.connector_list)) {
> >                 /* select 8 bpp console on low vram cards */
> >                 if (adev->gmc.real_vram_size <= (32*1024*1024))
> > --
> > 2.25.1
> >

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

* RE: [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is enabled
  2022-05-20 14:32     ` Alex Deucher
@ 2022-05-20 14:49       ` Slivka, Danijel
  2022-05-20 14:52         ` Alex Deucher
  0 siblings, 1 reply; 6+ messages in thread
From: Slivka, Danijel @ 2022-05-20 14:49 UTC (permalink / raw)
  To: Alex Deucher; +Cc: amd-gfx list

[AMD Official Use Only - General]

But for virtual display enabled we are not using display capability so shouldn't it be considered as hw without DCE.

BR,
Danijel Slivka

-----Original Message-----
From: Alex Deucher <alexdeucher@gmail.com>
Sent: Friday, May 20, 2022 4:33 PM
To: Slivka, Danijel <Danijel.Slivka@amd.com>
Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is enabled

On Fri, May 20, 2022 at 10:12 AM Slivka, Danijel <Danijel.Slivka@amd.com> wrote:
>
> [AMD Official Use Only - General]
>
> Hi,
>
> Based on the code we shouldn't init the fbdev on hw without DCE:

That comment means don't init fbdev on chips without display hardware (either real or virtual).  E.g., iceland or MI100.

Alex

>
>         /*
>          * 1. don't init fbdev on hw without DCE
>          * 2. don't init fbdev if there are no connectors
>          */
>         if (adev->mode_info.mode_config_initialized &&
>             !list_empty(&adev_to_drm(adev)->mode_config.connector_list)) {
>                 /* select 8 bpp console on low vram cards */
>                 if (adev->gmc.real_vram_size <= (32*1024*1024))
>                         drm_fbdev_generic_setup(adev_to_drm(adev), 8);
>                 else
>                         drm_fbdev_generic_setup(adev_to_drm(adev), 32);
>         }
>
> For virtualization we always use virtual_display and doesn’t have the hw DCE for that reason setting up fbdev should be skipped.
>
>
> BR,
> Danijel Slivka
>
> -----Original Message-----
> From: Alex Deucher <alexdeucher@gmail.com>
> Sent: Friday, May 20, 2022 3:30 PM
> To: Slivka, Danijel <Danijel.Slivka@amd.com>
> Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>
> Subject: Re: [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is
> enabled
>
> On Fri, May 20, 2022 at 3:59 AM Danijel Slivka <danijel.slivka@amd.com> wrote:
> >
> > In case virtaul_display is enabled there is no hw DCE so need to
> > skip setting up fbdev.
>
> Wouldn't you theoretically still want fbdev even if it is virtual?
>
> Alex
>
> >
> > Signed-off-by: Danijel Slivka <danijel.slivka@amd.com>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > index 3b9dc1803be9..8d03eec49eef 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > @@ -2095,6 +2095,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
> >          * 2. don't init fbdev if there are no connectors
> >          */
> >         if (adev->mode_info.mode_config_initialized &&
> > +           !adev->enable_virtual_display &&
> >             !list_empty(&adev_to_drm(adev)->mode_config.connector_list)) {
> >                 /* select 8 bpp console on low vram cards */
> >                 if (adev->gmc.real_vram_size <= (32*1024*1024))
> > --
> > 2.25.1
> >

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

* Re: [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is enabled
  2022-05-20 14:49       ` Slivka, Danijel
@ 2022-05-20 14:52         ` Alex Deucher
  0 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2022-05-20 14:52 UTC (permalink / raw)
  To: Slivka, Danijel; +Cc: amd-gfx list

On Fri, May 20, 2022 at 10:49 AM Slivka, Danijel <Danijel.Slivka@amd.com> wrote:
>
> [AMD Official Use Only - General]
>
> But for virtual display enabled we are not using display capability so shouldn't it be considered as hw without DCE.

I thought the goal of virtual DCE was for it to be just like real DCE.
Why would you want to treat it differently?  There is no need to
register an fbdev device if there is no display hardware, virtual or
real, but I don't see why you would want to treat virtual DCE any
differently than real DCE.

Alex

>
> BR,
> Danijel Slivka
>
> -----Original Message-----
> From: Alex Deucher <alexdeucher@gmail.com>
> Sent: Friday, May 20, 2022 4:33 PM
> To: Slivka, Danijel <Danijel.Slivka@amd.com>
> Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>
> Subject: Re: [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is enabled
>
> On Fri, May 20, 2022 at 10:12 AM Slivka, Danijel <Danijel.Slivka@amd.com> wrote:
> >
> > [AMD Official Use Only - General]
> >
> > Hi,
> >
> > Based on the code we shouldn't init the fbdev on hw without DCE:
>
> That comment means don't init fbdev on chips without display hardware (either real or virtual).  E.g., iceland or MI100.
>
> Alex
>
> >
> >         /*
> >          * 1. don't init fbdev on hw without DCE
> >          * 2. don't init fbdev if there are no connectors
> >          */
> >         if (adev->mode_info.mode_config_initialized &&
> >             !list_empty(&adev_to_drm(adev)->mode_config.connector_list)) {
> >                 /* select 8 bpp console on low vram cards */
> >                 if (adev->gmc.real_vram_size <= (32*1024*1024))
> >                         drm_fbdev_generic_setup(adev_to_drm(adev), 8);
> >                 else
> >                         drm_fbdev_generic_setup(adev_to_drm(adev), 32);
> >         }
> >
> > For virtualization we always use virtual_display and doesn’t have the hw DCE for that reason setting up fbdev should be skipped.
> >
> >
> > BR,
> > Danijel Slivka
> >
> > -----Original Message-----
> > From: Alex Deucher <alexdeucher@gmail.com>
> > Sent: Friday, May 20, 2022 3:30 PM
> > To: Slivka, Danijel <Danijel.Slivka@amd.com>
> > Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>
> > Subject: Re: [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is
> > enabled
> >
> > On Fri, May 20, 2022 at 3:59 AM Danijel Slivka <danijel.slivka@amd.com> wrote:
> > >
> > > In case virtaul_display is enabled there is no hw DCE so need to
> > > skip setting up fbdev.
> >
> > Wouldn't you theoretically still want fbdev even if it is virtual?
> >
> > Alex
> >
> > >
> > > Signed-off-by: Danijel Slivka <danijel.slivka@amd.com>
> > > ---
> > >  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > > index 3b9dc1803be9..8d03eec49eef 100644
> > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > > @@ -2095,6 +2095,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
> > >          * 2. don't init fbdev if there are no connectors
> > >          */
> > >         if (adev->mode_info.mode_config_initialized &&
> > > +           !adev->enable_virtual_display &&
> > >             !list_empty(&adev_to_drm(adev)->mode_config.connector_list)) {
> > >                 /* select 8 bpp console on low vram cards */
> > >                 if (adev->gmc.real_vram_size <= (32*1024*1024))
> > > --
> > > 2.25.1
> > >

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

end of thread, other threads:[~2022-05-20 14:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20  7:59 [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is enabled Danijel Slivka
2022-05-20 13:29 ` Alex Deucher
2022-05-20 14:12   ` Slivka, Danijel
2022-05-20 14:32     ` Alex Deucher
2022-05-20 14:49       ` Slivka, Danijel
2022-05-20 14:52         ` Alex Deucher

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.