sna: Fixup sna->scrn == scrn assert for early initialisation
Very early on when creating the sna privates, we call to_sna(scrn) before we have even set the sna->scrn backpointer. Reorder the code such that we always set sna->scrn before the first to_sna() so that the assert(to_sna(scrn)->scrn == scrn) can always hold. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
af6d8e9e8f
commit
032a581fd7
|
|
@ -554,12 +554,12 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int probe)
|
|||
probe = (uintptr_t)scrn->driverPrivate & 1;
|
||||
sna->info = (void *)((uintptr_t)scrn->driverPrivate & ~3);
|
||||
scrn->driverPrivate = sna;
|
||||
sna->scrn = scrn;
|
||||
|
||||
sna->cpu_features = sna_cpu_detect();
|
||||
sna->acpi.fd = sna_acpi_open();
|
||||
}
|
||||
sna = to_sna(scrn);
|
||||
sna->scrn = scrn;
|
||||
sna->pEnt = pEnt;
|
||||
sna->flags = probe;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue