Hi Philipp, Thanks for the review! On 21 July 2017 at 13:30, Philipp Zabel <p.za...@pengutronix.de> wrote: > On Tue, 2017-07-18 at 14:14 +0100, Daniel Stone wrote: >> @@ -3804,7 +3840,8 @@ drm_output_enable(struct weston_output *base) >> else >> b->cursors_are_broken = 1; >> >> - weston_compositor_stack_plane(b->compositor, &output->scanout_plane, >> + weston_compositor_stack_plane(b->compositor, >> + &output->scanout_plane->base, >> &b->compositor->primary_plane); > > If the scanout plane is still stacked during output enable ... > >> weston_log("Output %s, (connector %d, crtc %d)\n", >> @@ -3831,20 +3868,11 @@ drm_output_deinit(struct weston_output *base) >> [...] >> >> - weston_plane_release(&output->scanout_plane); >> - > > ... but not released anymore during deinit, won't then unplugging and > plugging in a monitor cause the second drm_output_enable to try to > insert the scanout plane into ec->plane_list a second time?
Ugh, you're right; this is quite hairy. > Also, will all view->plane references to the scanout plane in the > compositor->view_list still be cleared with this removed? I would imagine disabling the output would cause a repaint, which would in turn cause the buffer to get moved out of the scanout plane. That being said, I think a better plan would be to move the plane assignment (finding output->{scanout,cursor}_plane) into output creation, retain the stacking in output_enable, and then releasing the plane in output_disable. Cheers, Daniel _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel