Skip to content

Fix compatibility with xorg-server 21.1.3

Joe Breuer requested to merge jmbreuer/xf86-video-qxl:fix-xorg-server-21 into master

xf86-video-qxl as it is does not work with xorg-server 21.1.3 (21.x from the looks of it). For the most part, now required fields are not initialized, leading to SEGFAULTs when trying to initialize the driver.

I tracked down three issues, with this patch xf86-video-qxl works for me.

  1. pScrn->modes now needs to be set (correctly), it is/should be the same as qxl->x_modes
  2. pScrn->currentMode is not initialized, so take width and height from qxl->primary_mode.x_res and .y_res
  3. qxl_init_randr() is required to initialize RandR attributes, but only does so if num_heads is at least 1. So, initialize qxl->num_heads to 1 if no option is given.

This is what I found and seemed obvious / plausible to me following up where the code breaks. I'm by no means an expert on X driver code. Nonetheless, this is a working solution for me and could be used by others until possibly a more proper fix is generally available.

Merge request reports