Beginnings of multiple monitor
Kristian Høgsberg
krh at bitplanet.net
Wed Feb 9 17:27:21 PST 2011
On Wed, Feb 9, 2011 at 7:01 PM, Marty Jack <martyj19 at comcast.net> wrote:
> I have a little patch that allocates the CRTCs to avoid the multiple monitor black screen. If you don't want it right now that's fine too.
>
> I don't know what Kristian's ultimate vision of this is. Do we allow windows to move like they do now on a virtual desktop where you can slide one to a RightOf monitor by dragging it and it appears part on one and part on the other?
>
> A lot of the data structure and processing change for multiple monitors would depend on whether it is possible to have one pair of big FBs added to both CRTCs at the same time, with different (x,y,w,h) if it is tiled and the same (x,y) if it is cloned or how he would want to handle this case [moving the rbo, fb_id, image up to drm_compositor]. With some philosophical guidance I could get the underpinnings in place.
As Alex says, the plan is to have one fb per crtc. The compositor
will render the scenegraph into two framebuffers which we will then
page flip to each crtc. Eventually we'll only rerender the parts that
change so that typically we'll only update the fb where something
changed.
Kristian
> diff --git a/compositor/compositor-drm.c b/compositor/compositor-drm.c
> index 6df6b34..d8827b7 100644
> --- a/compositor/compositor-drm.c
> +++ b/compositor/compositor-drm.c
> @@ -37,6 +37,7 @@ struct drm_compositor {
> struct udev *udev;
> struct wl_event_source *drm_source;
>
> + uint32_t crtc_allocator;
> struct tty *tty;
> };
>
> @@ -198,7 +199,7 @@ create_output_for_connector(struct drm_compositor *ec,
> }
>
> for (i = 0; i < resources->count_crtcs; i++) {
> - if (encoder->possible_crtcs & (1 << i))
> + if ((encoder->possible_crtcs & (1 << i)) && ( ! (ec->crtc_allocator & (1 << i))))
> break;
> }
> if (i == resources->count_crtcs) {
> @@ -210,6 +211,7 @@ create_output_for_connector(struct drm_compositor *ec,
> wlsc_output_init(&output->base, &ec->base, 0, 0,
> mode->hdisplay, mode->vdisplay);
>
> + ec->crtc_allocator |= (1 << i);
> output->crtc_id = resources->crtcs[i];
> output->connector_id = connector->connector_id;
> output->mode = *mode;
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
More information about the wayland-devel
mailing list