Skip to contentSkip to conversation

drm/amdgpu: Skip init fbdev if virtual_display is enabled

PATCH In review Danijel Slivka 2 participants 6 messages May 20, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Skip init fbdev if virtual_display is enabled

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

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -0
index 3b9dc1803be9..8d03eec49eef 100644
@@ -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))
Signature · 1 line
2.25.1
#1 lore raw
Quoted 3 lines · Danijel Slivka

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

Quoted 21 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -1
index 3b9dc1803be9..8d03eec49eef 100644
@@ -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

#2 lore raw

[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 <[email protected]>
Sent: Friday, May 20, 2022 3:30 PM
To: Slivka, Danijel <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is enabled

Quoted 3 lines · Danijel Slivka

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

Quoted 22 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -1
index 3b9dc1803be9..8d03eec49eef 100644
@@ -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

#3 lore raw
Quoted 6 lines · Danijel

[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

Quoted 58 lines
        /*
         * 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 <[email protected]>
Sent: Friday, May 20, 2022 3:30 PM
To: Slivka, Danijel <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is enabled

Quoted 3 lines · Danijel Slivka

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

Quoted 22 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -1
index 3b9dc1803be9..8d03eec49eef 100644
@@ -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

#4 lore raw

[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 <[email protected]>
Sent: Friday, May 20, 2022 4:33 PM
To: Slivka, Danijel <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is enabled

Quoted 6 lines · Danijel

[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

Quoted 59 lines
        /*
         * 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 <[email protected]>
Sent: Friday, May 20, 2022 3:30 PM
To: Slivka, Danijel <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is enabled

Quoted 3 lines · Danijel Slivka

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

Quoted 22 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -1
index 3b9dc1803be9..8d03eec49eef 100644
@@ -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

#5 lore raw
Quoted 4 lines · Danijel

[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

Quoted 82 lines

BR,
Danijel Slivka

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

Quoted 6 lines · Danijel

[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

Quoted 59 lines
        /*
         * 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 <[email protected]>
Sent: Friday, May 20, 2022 3:30 PM
To: Slivka, Danijel <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Skip init fbdev if virtual_display is enabled

Quoted 3 lines · Danijel Slivka

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

Quoted 22 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -1
index 3b9dc1803be9..8d03eec49eef 100644
@@ -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