Beginnings of multiple monitor

Marty Jack martyj19 at comcast.net
Wed Feb 9 16:16:58 PST 2011



On 02/09/2011 07:08 PM, Alex Deucher wrote:
> 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.
>>
> 
> The sensible way to handle this is one surface per crtc otherwise we
> run into the same problems we hit with X where a multi-head desktop is
> too wide for the render/texture limits of the hardware.
> 
> Alex
> 

Well if that's the case, the rest of it is already correct, or at least the part in that module is.  The rest of it is user-experience relating to the case where the window is part on one screen and part on another or maybe it snaps over.

I do notice that there are starting to be telephones with multiple screens (e.g. Kyocera Echo) so this is of interest outside of the classic desktop.

>> 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