[PATCH 2/4] xfree86: Only set RR caps that are appropriate to main/gpu screen.

Timo Aaltonen tjaalton at ubuntu.com
Thu Mar 16 10:29:42 UTC 2017


From: Maarten Lankhorst <maarten.lankhorst at ubuntu.com>

Ubuntu bug https://launchpad.net/bugs/1277014

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at ubuntu.com>
---
 hw/xfree86/modes/xf86RandR12.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index d834619..6d6977f 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1671,10 +1671,16 @@ xf86RandR12CreateObjects12(ScreenPtr pScreen)
     }
 
     if (config->name) {
+        uint32_t caps = pScrn->capabilities;
         config->randr_provider = RRProviderCreate(pScreen, config->name,
                                                   strlen(config->name));
 
-        RRProviderSetCapabilities(config->randr_provider, pScrn->capabilities);
+        if (!pScreen->isGPU)
+            caps &= RR_Capability_SinkOffload | RR_Capability_SourceOutput;
+        else
+            caps &= RR_Capability_SourceOffload | RR_Capability_SinkOutput;
+
+        RRProviderSetCapabilities(config->randr_provider, caps);
     }
 
     return TRUE;
-- 
2.7.4



More information about the xorg-devel mailing list