<div dir="ltr"><div class=""><span class=""><div class="">Quanxian,<br></div><div class="">I haven't looked through the code line-by-line, but I do have a few general comments.<br><br></div><div class="">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.<br>
<br></div><div class="">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.<span class=""> For standard applications, I believe the intention is
that any modesetting they do will be done in a very controlled manner
through the shell.</span><br><br></div><div class="">Thanks,<br></div><div class="">--Jason Ekstrand<br></div></span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 26, 2014 at 9:27 PM, Quanxian Wang <span dir="ltr"><<a href="mailto:quanxian.wang@intel.com" target="_blank">quanxian.wang@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">These patches will provide weston randr protocol,<br>
its implementation and randr application.<br>
<br>
The idea is from xrandr provided by xserver. *Dynamic* mode<br>
setting is the main objective of this protocol. Remember,<br>
it is one shot operation. For example, if setting the mode,<br>
just call one request wl_randr_set_mode without any other operation.<br>
<br>
With this protocol, weston-wrandr application is developped to help<br>
user implement randr protocol in command line just like xrandr command<br>
in xserver.<br>
<br>
For wayland customer, this application could *DYNAMICALLY*<br>
do mode setting in command line.<br>
<br>
For wayland application developer, weston randr protocol provide<br>
a external interface to *DYNAMICALLY* do mode setting instead of<br>
static configuring weston at the very beginning.<br>
<br>
Weston protocol wrandr will provide interface to<br>
1) set output mode<br>
2) set output transform<br>
3) move output to relative position<br>
4) provide disconnected output information<br>
<br>
Currently randr has more functions to be defined and implemented.<br>
Some other functions are planned. But at first we need support.<br>
If this protocol is accepted, we could have the chance moving on.<br>
<br>
The advantage is<br>
randr architecture have been defined at this commit. New function will<br>
be very easy to be added in the protocol.<br>
<br>
One note:<br>
Currently wl_output doesn't provide wl_output_send_name function,<br>
I have to implemented it in randr protocol. Actually it will be very<br>
easily implemented in wl_output interface. If this commit series is<br>
accepted, I will provide the patch to add wl_output_send_name to make<br>
issue simply resolved instead of in randr protocol.<br>
'<br>
<br>
Here are some test cases.<br>
<br>
1. weston-randr -q # query all output mode info and disconnected output<br>
<br>
HDMI3<br>
1)1440x900@60 (current)<br>
2)1920x1200@60<br>
3)1680x1050@60<br>
...<br>
<br>
VGA1<br>
1)1280x1024@60 (current)<br>
2)1152x864@60<br>
3)1024x768@60<br>
...<br>
<br>
HDMI1 disconnected<br>
HDMI2 disconnected<br>
DP1 disconnected<br>
DP2 disconnected<br>
...<br>
<br>
2. weston-randr --output HDMI3 # query HDMI3 output mode info<br>
<br>
HDMI3<br>
1)1440x900@60 (current)<br>
2)1920x1200@60<br>
3)1680x1050@60<br>
<br>
3. weston-randr --output HDMI3 -m 2 # which will set mode as 1920x1200<br>
<br>
4. weston-randr --output HDMI3 -R 1 # rotate HDMI3 output 90 degree<br>
<br>
5. weston-randr --output HDMI3 -leftof VGA1 # put HDMI3 output leftof VGA1<br>
<br>
6. weston-randr --output HDMI3 -rightof VGA1 # put HDMI3 output rightof VGA1<br>
<br>
Quanxian Wang (6):<br>
Add weston randr protocol<br>
Add weston_randr definition and randr_backend intreface<br>
Add the detailed implementation of randr protocol<br>
Initialize the randr interface in drm backend<br>
Add weston-randr application<br>
Change the size of Panel and Background after output's is changed<br>
<br>
clients/Makefile.am | 9 +<br>
clients/desktop-shell.c | 60 +++++<br>
clients/window.c | 7 +<br>
clients/window.h | 2 +<br>
clients/wrandr.c | 642 ++++++++++++++++++++++++++++++++++++++++++++++++<br>
protocol/Makefile.am | 1 +<br>
protocol/randr.xml | 151 ++++++++++++<br>
src/Makefile.am | 4 +<br>
src/compositor-drm.c | 67 +++++<br>
src/compositor.c | 466 +++++++++++++++++++++++++++++++----<br>
src/compositor.h | 14 ++<br>
11 files changed, 1376 insertions(+), 47 deletions(-)<br>
create mode 100644 clients/wrandr.c<br>
create mode 100644 protocol/randr.xml<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
1.8.1.2<br>
<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</font></span></blockquote></div><br></div>