sna: Indicate when we expect to call RRGetInfo during discovery
Continuing the udevless saga where we query for topology changes on calls to RRGetInfo() and so where we cannot call RRGetInfo() ourselves on discovering the changes (to facilitate hotplug). The next step is explicitly prevent the recursive call. References: https://bugs.freedesktop.org/show_bug.cgi?id=91929#c10 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
0d3e1d3b2e
commit
096ddef22d
|
|
@ -442,7 +442,7 @@ bool sna_mode_pre_init(ScrnInfoPtr scrn, struct sna *sna);
|
|||
bool sna_mode_fake_init(struct sna *sna, int num_fake);
|
||||
bool sna_mode_wants_tear_free(struct sna *sna);
|
||||
void sna_mode_adjust_frame(struct sna *sna, int x, int y);
|
||||
extern void sna_mode_discover(struct sna *sna);
|
||||
extern void sna_mode_discover(struct sna *sna, bool tell);
|
||||
extern void sna_mode_check(struct sna *sna);
|
||||
extern bool sna_mode_disable(struct sna *sna);
|
||||
extern void sna_mode_enable(struct sna *sna);
|
||||
|
|
|
|||
|
|
@ -2641,7 +2641,7 @@ error:
|
|||
sna_crtc->cursor_transform = saved_cursor_transform;
|
||||
sna_crtc->hwcursor = saved_hwcursor;
|
||||
sna_crtc->bo = saved_bo;
|
||||
sna_mode_discover(sna);
|
||||
sna_mode_discover(sna, true);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -4829,7 +4829,7 @@ output_check_status(struct sna *sna, struct sna_output *output)
|
|||
return output->status == status;
|
||||
}
|
||||
|
||||
void sna_mode_discover(struct sna *sna)
|
||||
void sna_mode_discover(struct sna *sna, bool tell)
|
||||
{
|
||||
ScreenPtr screen = xf86ScrnToScreen(sna->scrn);
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(sna->scrn);
|
||||
|
|
@ -4939,7 +4939,7 @@ void sna_mode_discover(struct sna *sna)
|
|||
* Note this could recurse once from udevless RRGetInfo() probes,
|
||||
* but only once.
|
||||
*/
|
||||
if (changed)
|
||||
if (changed && tell)
|
||||
RRGetInfo(screen, TRUE);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -780,7 +780,7 @@ sna_handle_uevents(int fd, void *closure)
|
|||
__FUNCTION__, sna->scrn->vtSema));
|
||||
|
||||
if (sna->scrn->vtSema) {
|
||||
sna_mode_discover(sna);
|
||||
sna_mode_discover(sna, true);
|
||||
sna_mode_check(sna);
|
||||
} else
|
||||
sna->flags |= SNA_REPROBE;
|
||||
|
|
@ -893,7 +893,7 @@ sna_randr_getinfo(ScreenPtr screen, Rotation *rotations)
|
|||
DBG(("%s()\n", __FUNCTION__));
|
||||
|
||||
if (!sna_uevent_poll(sna))
|
||||
sna_mode_discover(sna);
|
||||
sna_mode_discover(sna, false);
|
||||
|
||||
return sna->mode.rrGetInfo(screen, rotations);
|
||||
}
|
||||
|
|
@ -1222,7 +1222,7 @@ static Bool sna_enter_vt(VT_FUNC_ARGS_DECL)
|
|||
|
||||
if (sna->flags & SNA_REPROBE) {
|
||||
DBG(("%s: reporting deferred hotplug event\n", __FUNCTION__));
|
||||
sna_mode_discover(sna);
|
||||
sna_mode_discover(sna, true);
|
||||
}
|
||||
|
||||
sna_set_desired_mode(sna);
|
||||
|
|
|
|||
Loading…
Reference in New Issue