Can I enable mode switching from wayland/weston?

Jasper St. Pierre jstpierre at mecheye.net
Thu Oct 1 11:03:46 PDT 2015


As I mentioned on your post on Reddit [0], SDL2's video mode hooks are
no-ops, which explains why SDL isn't changing the resolution. You
could change SDL's code to use a different fullscreen mode. I am still
struggling why you need to change the resolution with a modeset.

[0] https://www.reddit.com/r/wayland/comments/3mkhlf/weston_outputs_monitor_preferred_resolution/

On Thu, Oct 1, 2015 at 8:12 AM, Robert Folland <robert.folland at me.com> wrote:
>
>> On 01 Oct 2015, at 17:08, Giulio Camuffo <giuliocamuffo at gmail.com> wrote:
>>
>> 2015-10-01 18:03 GMT+03:00 Robert Folland <robert.folland at me.com>:
>>> On 01 Oct 2015, at 16:47, Giulio Camuffo <giuliocamuffo at gmail.com> wrote:
>>>>
>>>> 2015-10-01 16:40 GMT+03:00 Robert Folland <robert.folland at me.com>:
>>>>> Hi,
>>>>>
>>>>> I need to display video in different resolutions (the resolution of the recording), but with weston/wayland I always end up with the resolution preferred by the monitor (1920x1080 in my current setup).
>>>>>
>>>>> SDL2 thinks it is producing e.g. 1280x720, but that is not the real output to screen. This is probably due to weston scaling this to 1920x1080 for the monitor, intstead of doing a mode switching, which is what I require for my application.
>>>>
>>>> Why do you need a mode switch? Unless you're using a CRT the monitor
>>>> will scale the image up internally, and usually weston can do it
>>>> better.
>>>> Anyway, I assume SDL uses wl_shell, not xdg_shell, and
>>>> wl_shell_surface.set_fullscreen accepts several modes, and one of them
>>>> asks the compositor to perform a mode switch. Note that it *asks* to,
>>>> there is no way to force it, and that's by design.
>>>>
>>>
>>> I’ve set up a box to be an input source to other equipment. So it is providing input to another box instead of e.g cameras, playing out uncompressed video.
>>> So, it will not be displaying to monitors directly, but to a camera input on another box. And that camera input is accepting a range of resolutions.
>>>
>>> When I check the resolution actually asked for from within SDL it says it is producing my wanted resolution, but is is not actually apparing on the output. So I suspect it is not able to force it to weston.
>>>
>>> The monitor/camera input receiving the signal is providing a list of resolutions in its EDID data, and I guess one is preferred as a native resolution. But as long as there are more entries in that EDID list, would it not be a good idea to allow these to be “forced” through weston?
>>
>> It's not a good idea to let clients force modes, but it seems like you
>> just want weston to always use that resolution, am i right? If so you
>> can tell it to do so by setting the correct resolution in weston.ini.
>> Check "man weston.ini" for details.
>>
>
> Not really, this is a tool where users can change resolutions (actually change video sequences) on the fly. But, it may work to restart weston on every change, I can try that… thanks!
>
> -Robert
>
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>



-- 
  Jasper


More information about the wayland-devel mailing list