[PATCH] modesetting: Update props for dynamically added outputs

Ville Syrjala ville.syrjala at linux.intel.com
Tue Aug 20 16:01:14 UTC 2019


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Dynamically added outputs should have their properties
properly updated as well. Otherwise we're left with an output
with many of its propeties not exposed.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index e0d7cfb5c708..f621df52f3f7 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -3003,8 +3003,14 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
                                 "DPMS");
     }
 
-    if (dynamic)
+    if (dynamic) {
         output->randr_output = RROutputCreate(xf86ScrnToScreen(pScrn), output->name, strlen(output->name), output);
+        if (output->randr_output) {
+            drmmode_output_create_resources(output);
+            RRPostPendingProperties(output->randr_output);
+        }
+    }
+
     return 1;
 
  out_free_encoders:
-- 
2.21.0



More information about the xorg-devel mailing list