[PATCH] modesetting: Update props for dynamically added outputs

Michel Dänzer michel at daenzer.net
Wed Aug 21 08:04:38 UTC 2019


On 2019-08-20 6:01 p.m., Ville Syrjala wrote:
> 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:
> 

Reviewed-by: Michel Dänzer <michel at daenzer.net>


P.S. xserver patches are now being reviewed as GitLab merge requests:
https://gitlab.freedesktop.org/xorg/xserver/merge_requests

-- 
Earthling Michel Dänzer               |               https://redhat.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-devel mailing list