[PATCH 0/6] Add weston randr protocol

Jason Ekstrand jason at jlekstrand.net
Wed Feb 26 19:28:50 PST 2014


Quanxian,
I haven't looked through the code line-by-line, but I do have a few general
comments.

First, please double-check your copyright blocks.  One of your files is
copyrighted Benjamin Franzke and another is copyrighted Collabora.  I don't
think that was intended.

Second, it doesn't appear that you have any security mechanism for this?  I
don't think we want arbitrary clients to be allowed to rotate, change mode,
and change output layout.  While I agree that it would be great to have a
tool (possibly even a command-line one) to do these things dynamically, we
shouldn't make it a public interface that just anyone can bind to.  I'm not
saying that some sort of randr interface isn't needed. I'm simply that it
should be privileged and we need a well-defined mechanism for keeping rogue
applications from messing up the compositor for everyone else.  For
standard applications, I believe the intention is that any modesetting they
do will be done in a very controlled manner through the shell.

Thanks,
--Jason Ekstrand


On Wed, Feb 26, 2014 at 9:27 PM, Quanxian Wang <quanxian.wang at intel.com>wrote:

> These patches will provide weston randr protocol,
> its implementation and randr application.
>
> The idea is from xrandr provided by xserver. *Dynamic* mode
> setting is the main objective of this protocol. Remember,
> it is one shot operation. For example, if setting the mode,
> just call one request wl_randr_set_mode without any other operation.
>
> With this protocol, weston-wrandr application is developped to help
> user implement randr protocol in command line just like xrandr command
> in xserver.
>
> For wayland customer, this application could *DYNAMICALLY*
> do mode setting in command line.
>
> For wayland application developer, weston randr protocol provide
> a external interface to *DYNAMICALLY* do mode setting instead of
> static configuring weston at the very beginning.
>
> Weston protocol wrandr will provide interface to
> 1) set output mode
> 2) set output transform
> 3) move output to relative position
> 4) provide disconnected output information
>
> Currently randr has more functions to be defined and implemented.
> Some other functions are planned. But at first we need support.
> If this protocol is accepted, we could have the chance moving on.
>
> The advantage is
> randr architecture have been defined at this commit. New function will
> be very easy to be added in the protocol.
>
> One note:
> Currently wl_output doesn't provide wl_output_send_name function,
> I have to implemented it in randr protocol. Actually it will be very
> easily implemented in wl_output interface. If this commit series is
> accepted, I will provide the patch to add wl_output_send_name to make
> issue simply resolved instead of in randr protocol.
> '
>
> Here are some test cases.
>
> 1. weston-randr -q # query all output mode info and disconnected output
>
> HDMI3
> 1)1440x900 at 60 (current)
> 2)1920x1200 at 60
> 3)1680x1050 at 60
> ...
>
> VGA1
> 1)1280x1024 at 60 (current)
> 2)1152x864 at 60
> 3)1024x768 at 60
> ...
>
> HDMI1 disconnected
> HDMI2 disconnected
> DP1 disconnected
> DP2 disconnected
> ...
>
> 2. weston-randr --output HDMI3 # query HDMI3 output mode info
>
> HDMI3
> 1)1440x900 at 60 (current)
> 2)1920x1200 at 60
> 3)1680x1050 at 60
>
> 3. weston-randr --output HDMI3 -m 2 # which will set mode as 1920x1200
>
> 4. weston-randr --output HDMI3 -R 1 # rotate HDMI3 output 90 degree
>
> 5. weston-randr --output HDMI3 -leftof VGA1 # put HDMI3 output leftof VGA1
>
> 6. weston-randr --output HDMI3 -rightof VGA1 # put HDMI3 output rightof
> VGA1
>
> Quanxian Wang (6):
>   Add weston randr protocol
>   Add weston_randr definition and randr_backend intreface
>   Add the detailed implementation of randr protocol
>   Initialize the randr interface in drm backend
>   Add weston-randr application
>   Change the size of Panel and Background after output's is changed
>
>  clients/Makefile.am     |   9 +
>  clients/desktop-shell.c |  60 +++++
>  clients/window.c        |   7 +
>  clients/window.h        |   2 +
>  clients/wrandr.c        | 642
> ++++++++++++++++++++++++++++++++++++++++++++++++
>  protocol/Makefile.am    |   1 +
>  protocol/randr.xml      | 151 ++++++++++++
>  src/Makefile.am         |   4 +
>  src/compositor-drm.c    |  67 +++++
>  src/compositor.c        | 466 +++++++++++++++++++++++++++++++----
>  src/compositor.h        |  14 ++
>  11 files changed, 1376 insertions(+), 47 deletions(-)
>  create mode 100644 clients/wrandr.c
>  create mode 100644 protocol/randr.xml
>
> --
> 1.8.1.2
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140226/4961c94c/attachment-0001.html>


More information about the wayland-devel mailing list