Skip to contentSkip to conversation

Skip some initialization steps for GPU screens

PATCH In review Michel Dänzer 2 participants 3 messages Mar 9, 2017 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Skip some initialization steps for GPU screens

From: Michel Dänzer <[email protected]>

Xorg doesn't use the following functionality of GPU screens, so don't bother initializing it:

* DRI page flipping
* DRI3 / Present / SYNC fences
* XVideo / XvMC
* Root window with background None

(Ported from radeon commit 67ae5e00a748ad52cf92738d401afff2947b1891)

---
 src/amdgpu_drv.h |  2 ++
 src/amdgpu_kms.c | 90 ++++++++++++++++++++++++++++++--------------------------
 2 files changed, 51 insertions(+), 41 deletions(-)
src/amdgpu_drv.h +2 -0
index 0700daecb..532d99daa 100644
@@ -169,8 +169,10 @@ typedef enum {
 #if XF86_CRTC_VERSION >= 5
 #define AMDGPU_PIXMAP_SHARING 1
 #define amdgpu_is_gpu_screen(screen) (screen)->isGPU
+#define amdgpu_is_gpu_scrn(scrn) (scrn)->is_gpu
 #else
 #define amdgpu_is_gpu_screen(screen) 0
+#define amdgpu_is_gpu_scrn(scrn) 0
 #endif
 
 #define AMDGPU_VSYNC_TIMEOUT	20000	/* Maximum wait for VSYNC (in usecs) */
src/amdgpu_kms.c +49 -41

121 lines not on this page · raw message

Signature · 6 lines
2.11.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20170309070305.15832-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org

#2 lore raw

PATCH 2/2 Pass TRUE to drmmode_set_desired_modes the first time for GPU screens

From: Michel Dänzer <[email protected]>

This is the only place we call drmmode_set_desired_modes for GPU screens during server startup. Without this change, the display outputs of secondary GPUs may stay on even while Xorg isn't using them.

(Ported from radeon commit 9a71445094b728f3d78db8f6808b4782ee19a453)

---
 src/amdgpu_kms.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/amdgpu_kms.c +2 -1
index 3deaef76c..4821e932f 100644
@@ -243,7 +243,8 @@ static Bool AMDGPUCreateScreenResources_KMS(ScreenPtr pScreen)
 		}
 	}
 
-	if (!drmmode_set_desired_modes(pScrn, &info->drmmode, FALSE))
+	if (!drmmode_set_desired_modes(pScrn, &info->drmmode,
+				       amdgpu_is_gpu_screen(pScreen)))
 		return FALSE;
 
 	drmmode_uevent_init(pScrn, &info->drmmode);
Signature · 6 lines
2.11.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20170309070305.15832-2-michel-otUistvHUpPR7s880joybQ@public.gmane.org

Reviewed-by
#4 lore raw

Re: [PATCH xf86-video-amdgpu 2/2] Pass TRUE to drmmode_set_desired_modes the first time for GPU screens

Quoted 9 lines · Michel Dänzer

From: Michel Dänzer <[email protected]>

This is the only place we call drmmode_set_desired_modes for GPU screens during server startup. Without this change, the display outputs of secondary GPUs may stay on even while Xorg isn't using them.

(Ported from radeon commit 9a71445094b728f3d78db8f6808b4782ee19a453)

Series is:

Quoted 21 lines
---
 src/amdgpu_kms.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/amdgpu_kms.c +2 -2
index 3deaef76c..4821e932f 100644
@@ -243,7 +243,8 @@ static Bool AMDGPUCreateScreenResources_KMS(ScreenPtr pScreen)
                }
        }
 
-       if (!drmmode_set_desired_modes(pScrn, &info->drmmode, FALSE))
+       if (!drmmode_set_desired_modes(pScrn, &info->drmmode,
+                                      amdgpu_is_gpu_screen(pScreen)))
                return FALSE;
 
        drmmode_uevent_init(pScrn, &info->drmmode);
--

2.11.0

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx