mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-06 09:40:12 +01:00
Patch brown-bag fix for bug 19017 (scrn->virtualX/virtualY 0 before PreInit)
When a driver uses a crtc during device detection, the scrn has not yet been
configured and virtualX/virtualY are still zero. This caused the X server
to try and allocate a shadow frame buffer, which couldn't work.
Detect this by checking for zero virtualX/virtualY values.
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 063eb6743c)
This commit is contained in:
parent
ae2cbbff9f
commit
09039fb89f
1 changed files with 6 additions and 0 deletions
|
|
@ -366,6 +366,12 @@ xf86CrtcFitsScreen (xf86CrtcPtr crtc, struct pict_f_transform *crtc_to_fb)
|
|||
ScrnInfoPtr pScrn = crtc->scrn;
|
||||
BoxRec b;
|
||||
|
||||
/* When called before PreInit, the driver is
|
||||
* presumably doing load detect
|
||||
*/
|
||||
if (pScrn->virtualX == 0 || pScrn->virtualY == 0)
|
||||
return TRUE;
|
||||
|
||||
b.x1 = 0;
|
||||
b.y1 = 0;
|
||||
b.x2 = crtc->mode.HDisplay;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue