intel-virtual-overlay: Reset damage across modesets
Some versions of the Xserver lose Damage tracking across the modeset, causing a loss of damage notifications and repainting to cease on the virtual outputs. We can workaround this by reattaching the damage every time we receive notification that the local Screen configuration changes. Reported-and-tested-by: Severin Strobl <fd@severin-strobl.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68987 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
5dea07c31d
commit
2263f8f26f
|
|
@ -1760,9 +1760,22 @@ static int display_init_damage(struct display *display)
|
|||
if (display->damage == 0)
|
||||
return EACCES;
|
||||
|
||||
display->flush = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void display_reset_damage(struct display *display)
|
||||
{
|
||||
Damage damage;
|
||||
|
||||
damage = XDamageCreate(display->dpy, display->root, XDamageReportRawRectangles);
|
||||
if (damage) {
|
||||
XDamageDestroy(display->dpy, display->damage);
|
||||
display->damage = damage;
|
||||
display->flush = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void display_init_randr_hpd(struct display *display)
|
||||
{
|
||||
int major, minor;
|
||||
|
|
@ -2632,8 +2645,10 @@ int main(int argc, char **argv)
|
|||
ret--;
|
||||
}
|
||||
|
||||
if (reconfigure)
|
||||
if (reconfigure) {
|
||||
context_update(&ctx);
|
||||
display_reset_damage(ctx.display);
|
||||
}
|
||||
|
||||
if (rr_update) {
|
||||
for (i = 0; i < ctx.nclone; i++)
|
||||
|
|
|
|||
Loading…
Reference in New Issue