Re: [PATCH xserver 1/2] meson: Enable SUN-DES-1 auth code

2018-01-19 Thread Jon Turney

On 18/01/2018 21:00, Eric Anholt wrote:

Jon Turney writes:


On 08/01/2018 20:50, Adam Jackson wrote:

---
   include/meson.build | 1 +
   meson_options.txt   | 1 +
   os/meson.build  | 4 
   3 files changed, 6 insertions(+)


After this, I needed something like the attached.


I'm curious, why tirpc instead of rpcsvc like xtrans did before?


XTRANS_SECURE_RPC_FLAGS does something totally other (and doesn't think 
secure RPC can be used if the libc in use has no RPC functions)


If RPC functions have been found in libc, it adds rpcsvr if it's needed 
to provide getsecretkey (claiming that's the case on BSD)

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver 1/2] meson: Enable SUN-DES-1 auth code

2018-01-19 Thread Jon Turney

On 18/01/2018 21:27, Adam Jackson wrote:

On Wed, 2018-01-17 at 19:02 +, Jon Turney wrote:

On 08/01/2018 20:50, Adam Jackson wrote:

---
   include/meson.build | 1 +
   meson_options.txt   | 1 +
   os/meson.build  | 4 
   3 files changed, 6 insertions(+)


After this, I needed something like the attached.


Eep, indeed you would. But I think we should actually prefer tirpc if
it's available, glibc's rpc code has been deprecated for years and I
believe the next Fedora release is going to try removing the headers
for it again.


I guess XTRANS_SECURE_RPC_FLAGS will also need adjusting to express that 
preference



Is the extra-underscore thing really necessary? I'd have hoped meson
would take care of that.


This is not due to leading-underscore ABI issues, it's due to me looking 
at the following in os/rpcauth.c:


#ifdef SVR4
if ((why = __authenticate(, )) != AUTH_OK) {
#else
if ((why = _authenticate(, )) != AUTH_OK) {
#endif

I've no idea if that's legitimate or not :)

(This is the function that os/rpcauth.c actually uses, as opposed to the 
function(s) that XTRANS_SECURE_RPC_FLAGS check for)


I'll see if I can revise this patch to prefer tirpc.
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xwayland] xwayland: use RandR 1.2 interface

2018-01-19 Thread Robert Mader
From: rpm-build 

This adds the RandR 1.2 interface to xwayland and allows modes
advertised by the compositor to be set.

RandR 1.2 will be needed to implement fake-mode-setting.

As RandR 1.2 does not allow to set unregistered modes and xwayland
only lists those send by the compositor, it's save to enable mode-
setting already, as only compositors which send multiple modes
are affected.
Compositors should only send multiple modes if they can handle
the resulting behaviour.
---
 hw/xwayland/xwayland-output.c | 76 +++
 1 file changed, 76 insertions(+)

diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index 19d8e0c..fb021d2 100644
--- a/hw/xwayland/xwayland-output.c
+++ b/hw/xwayland/xwayland-output.c
@@ -411,12 +411,75 @@ xwl_randr_get_info(ScreenPtr pScreen, Rotation * 
rotations)
 return TRUE;
 }
 
+#ifdef RANDR_10_INTERFACE
 static Bool
 xwl_randr_set_config(ScreenPtr pScreen,
  Rotation rotation, int rate, RRScreenSizePtr pSize)
 {
 return FALSE;
 }
+#endif
+
+#if RANDR_12_INTERFACE
+static Bool
+xwl_randr_screen_set_size(ScreenPtr pScreen,
+  CARD16 width,
+  CARD16 height,
+  CARD32 mmWidth, CARD32 mmHeight)
+{
+return TRUE;
+}
+
+static Bool
+xwl_randr_crtc_set(ScreenPtr pScreen,
+   RRCrtcPtr crtc,
+   RRModePtr mode,
+   int x,
+   int y,
+   Rotation rotation,
+   int numOutputs, RROutputPtr * outputs)
+{
+return RRCrtcNotify(crtc, mode, x, y,
+   rotation,
+   NULL,
+   numOutputs, outputs);
+}
+
+static Bool
+xwl_randr_crtc_set_gamma(ScreenPtr pScreen, RRCrtcPtr crtc)
+{
+return TRUE;
+}
+
+static Bool
+xwl_randr_Crtc_get_gamma(ScreenPtr pScreen, RRCrtcPtr crtc)
+{
+return TRUE;
+}
+
+static Bool
+xwl_randr_output_set_property(ScreenPtr pScreen,
+  RROutputPtr output,
+  Atom property,
+  RRPropertyValuePtr value)
+{
+return TRUE;
+}
+
+static Bool
+xwl_output_validate_mode(ScreenPtr pScreen,
+ RROutputPtr output,
+ RRModePtr mode)
+{
+return TRUE;
+}
+
+static void
+xwl_randr_mode_destroy(ScreenPtr pScreen, RRModePtr mode)
+{
+return;
+}
+#endif
 
 Bool
 xwl_screen_init_output(struct xwl_screen *xwl_screen)
@@ -430,7 +493,20 @@ xwl_screen_init_output(struct xwl_screen *xwl_screen)
 
 rp = rrGetScrPriv(xwl_screen->screen);
 rp->rrGetInfo = xwl_randr_get_info;
+
+#if RANDR_10_INTERFACE
 rp->rrSetConfig = xwl_randr_set_config;
+#endif
+
+#if RANDR_12_INTERFACE
+rp->rrScreenSetSize = xwl_randr_screen_set_size;
+rp->rrCrtcSet = xwl_randr_crtc_set;
+rp->rrCrtcSetGamma = xwl_randr_crtc_set_gamma;
+rp->rrCrtcGetGamma = xwl_randr_Crtc_get_gamma;
+rp->rrOutputSetProperty = xwl_randr_output_set_property;
+rp->rrOutputValidateMode = xwl_output_validate_mode;
+rp->rrModeDestroy = xwl_randr_mode_destroy;
+#endif
 
 return TRUE;
 }
-- 
2.14.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel