xf86-video-amdgpu: Branch 'master'

Michel Dänzer daenzer at kemper.freedesktop.org
Wed Jan 20 00:18:09 PST 2016


 src/amdgpu_kms.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

New commits:
commit 8853b07ae8169c409740c40d45cd335bd608f2a7
Author: Michel Dänzer <michel.daenzer at amd.com>
Date:   Tue Jan 19 17:35:11 2016 +0900

    Set the RandR primary output on startup if Xorg hasn't
    
    Fixes xrandr (XRRGetOutputPrimary) not reporting any output as primary
    after startup.
    
    (Ported from radeon commit b16856b25086ffb27365ac2249b8da921066ce62)
    
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 30bce08..e090c25 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -167,6 +167,7 @@ static Bool AMDGPUCreateScreenResources_KMS(ScreenPtr pScreen)
 {
 	ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
 	AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
+	rrScrPrivPtr rrScrPriv = rrGetScrPriv(pScreen);
 	PixmapPtr pixmap;
 
 	pScreen->CreateScreenResources = info->CreateScreenResources;
@@ -174,6 +175,20 @@ static Bool AMDGPUCreateScreenResources_KMS(ScreenPtr pScreen)
 		return FALSE;
 	pScreen->CreateScreenResources = AMDGPUCreateScreenResources_KMS;
 
+	/* Set the RandR primary output if Xorg hasn't */
+	if (
+#ifdef AMDGPU_PIXMAP_SHARING
+	    !pScreen->isGPU &&
+#endif
+	    !rrScrPriv->primaryOutput)
+	{
+		xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+
+		rrScrPriv->primaryOutput = xf86_config->output[0]->randr_output;
+		RROutputChanged(rrScrPriv->primaryOutput, FALSE);
+		rrScrPriv->layoutChanged = TRUE;
+	}
+
 	if (!drmmode_set_desired_modes(pScrn, &info->drmmode, pScrn->is_gpu))
 		return FALSE;
 


More information about the xorg-commit mailing list