Fix compatibility with xorg-server 21.1.3
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.
-
pScrn->modes
now needs to be set (correctly), it is/should be the same asqxl->x_modes
-
pScrn->currentMode
is not initialized, so takewidth
andheight
fromqxl->primary_mode.x_res
and.y_res
-
qxl_init_randr()
is required to initialize RandR attributes, but only does so ifnum_heads
is at least 1. So, initializeqxl->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.