Re: [PATCH xserver] xkb: XkbSetMap on the lastSlave needs to change the master

2018-03-05 Thread Peter Hutterer
On Sat, Mar 03, 2018 at 01:41:12AM +, Samir Benmendil wrote:
> The layout needs to be set on the master too if the layout is changed on
> the device that was last used by the master.
> 
> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=85256
> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91571
> 
> Signed-off-by: Samir Benmendil 
> ---
>  xkb/xkb.c | 26 +-
>  1 file changed, 25 insertions(+), 1 deletion(-)
> 
> diff --git a/xkb/xkb.c b/xkb/xkb.c
> index 678f82368..12460034b 100644
> --- a/xkb/xkb.c
> +++ b/xkb/xkb.c
> @@ -2626,6 +2626,8 @@ ProcXkbSetMap(ClientPtr client)
>  if (rc != Success)
>  return rc;
>  
> +DeviceIntPtr master = GetMaster(dev, MASTER_KEYBOARD);
> +
>  if (stuff->deviceSpec == XkbUseCoreKbd) {
>  DeviceIntPtr other;
>  
> @@ -2641,9 +2643,21 @@ ProcXkbSetMap(ClientPtr client)
>  }
>  }
>  }
> +} else {
> +DeviceIntPtr other;
> +
> +for (other = inputInfo.devices; other; other = other->next) {
> +if (other != dev && GetMaster(other, MASTER_KEYBOARD) != dev &&
> +(other != master || dev != master->lastSlave))
> +continue;

wouldn't this be sufficient here:
if (master && master->lastSlave == dev) {
rc = _XkbSetMapChecks(client, other, stuff, tmp);
...
}

there can only be one master keyboard per slave and it can only have one
lastSlave.

> +
> +rc = _XkbSetMapChecks(client, other, stuff, tmp);
> +if (rc != Success)
> +return rc;
> +}
>  }
>  
> -/* We know now that we will succed with the SetMap. In theory anyway. */
> +/* We know now that we will succeed with the SetMap. In theory anyway. */
>  rc = _XkbSetMap(client, dev, stuff, tmp);
>  if (rc != Success)
>  return rc;
> @@ -2664,6 +2678,16 @@ ProcXkbSetMap(ClientPtr client)
> sync. */
>  }
>  }
> +} else {
> +DeviceIntPtr other;
> +
> +for (other = inputInfo.devices; other; other = other->next) {
> +if (other != dev && GetMaster(other, MASTER_KEYBOARD) != dev &&
> +(other != master || dev != master->lastSlave))
> +continue;
> +
> +_XkbSetMap(client, other, stuff, tmp); //ignore rc

same as above

Cheers,
   Peter
 
> +}
>  }
>  
>  return Success;
> -- 
> 2.14.2
> 
> ___
> 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
> 
___
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 xf86-video-vmware] saa: Build compatibility with xserver 1.20

2018-03-05 Thread Adam Jackson
On Tue, 2017-11-07 at 15:45 -0500, Adam Jackson wrote:
> fbGetRotatedPixmap went away with 24bpp support, just treat it as NULL
> and we'll do the right thing.

Ping?

- ajax
___
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] xkb: XkbSetMap on the lastSlave needs to change the master

2018-03-05 Thread Adam Jackson
On Mon, 2018-03-05 at 09:01 +, Daniel Stone wrote:
> Hi,
> 
> On 3 March 2018 at 01:41, Samir Benmendil  wrote:
> > The layout needs to be set on the master too if the layout is changed on
> > the device that was last used by the master.
> 
> I have a vague recollection that not doing this was a deliberate
> choice, but in hindsight, it was also a bad choice.
> 
> Acked-by: Daniel Stone 

Merged, thanks:

remote: I: patch #207965 updated using rev 
5d3fd3856b718cfbc87d17f1de698ced94923c78.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   ce8da9364..5d3fd3856  master -> master

- ajax
___
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: [RFC xserver v7 14/14] dri3: Enable DRI3 version 1.1

2018-03-05 Thread Adam Jackson
On Thu, 2018-03-01 at 16:53 -0800, Keith Packard wrote:
> Louis-Francis Ratté-Boulianne  writes:
> 
> > Enable DRI3 v1.1 now that all functions have been implemented and
> > that there is at least one backend implementing the driver hooks
> > (modesetting/glamor).
> > 
> > Signed-off-by: Louis-Francis Ratté-Boulianne 
> > Reviewed-by: Daniel Stone 
> 
> This all looks fine to me; I'm not familiar enough with the atomic
> modesetting interface to the kernel to really be able to review the code
> in depth though...
> 
> Acked-by: Keith Packard 

Been running with this for a few days and it all seems cromulent. Fixed
up a distcheck bug in one of the patches, and merged:

remote: I: patch #207205 updated using rev 
6e7c40f62db66f5b59b2cf59f1e6a26e4fd21bda.
remote: I: patch #205086 updated using rev 
e2ef3b44fa697f2ed453767e98da72ea56d4046f.
remote: E: failed to find patch for rev 
4023d537341b9c36b9bb248c206e40694e4b08d2.
remote: I: patch #205087 updated using rev 
2f807c2324b46fbd9a557e7a4f177a392d5851b3.
remote: E: failed to find patch for rev 
9817c14f6a2ea5db44459659131c13f403716df1.
remote: I: patch #179099 updated using rev 
ca1c390ec7bf617c0147d69cf874dadce28e903b.
remote: I: patch #207208 updated using rev 
e375f29662ad7589cc6d8d179846da9b8a897122.
remote: I: patch #207141 updated using rev 
9d147305b4048dcec7ea4eda3eeea83f843f7788.
remote: E: failed to find patch for rev 
c8c276c9569b3ca1e695682a5443f1b615c606bd.
remote: I: patch #207143 updated using rev 
cef12efc15ca1444d6d8cd839116b318a4668692.
remote: I: patch #207215 updated using rev 
8d0d89715984e321315631dd6667e05813d26e03.
remote: I: patch #207212 updated using rev 
ce8da936464cc78ec31de6e970e1353ffecf2547.
remote: I: 9 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   0ff407422..ce8da9364  master -> master

- ajax
___
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] Require libdrm 2.4.89 or newer

2018-03-05 Thread Emil Velikov
On 3 March 2018 at 01:05, Keith Packard  wrote:
> Both autotools and meson build systems had complicated logic around
> what version of libdrm to require for various options. Remove that and
> just check for a new enough version to support all of the options
> which need libdrm.
>
> Signed-off-by: Keith Packard 
> ---
>  configure.ac |  7 +--
>  meson.build  | 12 ++--
>  2 files changed, 3 insertions(+), 16 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 439d42390..0ba7550a1 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1281,12 +1281,7 @@ AM_CONDITIONAL(DRI3, test "x$DRI3" = xyes)
>  if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$DRI3" = xyes || 
> test "x$CONFIG_UDEV_KMS" = xyes; then
> if test "x$DRM" = xyes; then
> AC_DEFINE(WITH_LIBDRM, 1, [Building with libdrm support])
> -   if test "x$DRI2" = xyes; then
> -   dnl 2.4.65 is required for drmGetDevice
> -   PKG_CHECK_MODULES([LIBDRM], libdrm >= 2.4.65)
> -   else
> -   PKG_CHECK_MODULES([LIBDRM], $LIBDRM)
> -   fi
> +   PKG_CHECK_MODULES([LIBDRM], $LIBDRM)
Seems like you missed the version here. LIBDRM is some very ancient
version, just enough for kdriver/xwayland.

-Emil
___
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 util/modular] xorg.modules: Replace individual proto modules with xorgproto

2018-03-05 Thread Emil Velikov
On 1 March 2018 at 13:35, Jon Turney  wrote:
> On 28/02/2018 15:17, Emil Velikov wrote:
>>
>> On 28 February 2018 at 13:04, Jon Turney 
>> wrote:
>>>
>>> Signed-off-by: Jon Turney 
>>> ---
>>>   xorg.modules | 845
>>> ++-
>>>   1 file changed, 143 insertions(+), 702 deletions(-)
>>>
>>> diff --git a/xorg.modules b/xorg.modules
>>> index b34d14d..93bc8cf 100644
>>> --- a/xorg.modules
>>> +++ b/xorg.modules
>>> @@ -65,35 +65,7 @@
>>> 
>>> 
>>>   
>>
>>
>>> -  
>>
>> Should stay?
>
>
> Oops.
>
>>
>>> +  
>>>   
>>> 
>>>
>>> @@ -366,257 +338,13 @@
>>
>>
>>
>>> +  
>>
>> I'd say keep this as autotools and toggle as 2/2...
>>
>>> +>> +checkoutdir="xorg/proto/xorgproto"/>
>>>   
>>> -  
>>> -
>>> -
>>> 
>>> -
>>
>> .. hence this hunk will stay as-is and drop util-macros with 2/2?
>
>
> I don't really see using a meson as a change as this module didn't exists
> before, but I take your point that it reduces the diff.
>
>>
>> It's fairly fiddly to have the above subtleties within such a massive
>> patch.
>>
>> With the above, tweaks:
>> Reviewed-by: Emil Velikov 
>
>
> Updated patch attached.
>
The comments are addressed. I trust you haven't changed anything else ;-)
Fwiw my r-b still stands.

-Emil
___
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 09/10] meson: Make SELinux extension optional

2018-03-05 Thread Laurent Carlier
Le dimanche 18 février 2018, 10:58:40 CET Laurent Carlier a écrit :
> Signed-off-by: Laurent Carlier 
> ---
>  Xext/meson.build  |  6 +-
>  meson.build   | 11 ++-
>  meson_options.txt |  2 ++
>  3 files changed, 17 insertions(+), 2 deletions(-)
> 

ping ? (9 and 10)
-- 
Laurent Carlier
http://www.archlinux.org

signature.asc
Description: This is a digitally signed message part.
___
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] Require libdrm 2.4.89 or newer

2018-03-05 Thread Adam Jackson
On Fri, 2018-03-02 at 17:05 -0800, Keith Packard wrote:
> Both autotools and meson build systems had complicated logic around
> what version of libdrm to require for various options. Remove that and
> just check for a new enough version to support all of the options
> which need libdrm.
> 
> Signed-off-by: Keith Packard 

Merged, thanks:

remote: I: patch #207872 updated using rev 
0ff4074224ea370e021d79526c63cef91356730d.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   43ffd57259..0ff4074224  master -> master

- ajax
___
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:xf86-video-fbdev] Use #ifdef instead of #if to avoid build error

2018-03-05 Thread Adam Jackson
On Sun, 2018-03-04 at 17:34 -0800, Alan Coopersmith wrote:
> fbdev.c:491:21: error: #if with no expression
>  #if HAVE_SHADOW_3224
>  ^
> 
> Signed-off-by: Alan Coopersmith 

Merged, thanks:

remote: I: patch #207943 updated using rev 
9af7f81534aa03fe01d88786805b00729ac321e9.
remote: I: 1 patch(es) updated to state Accepted.
To git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-fbdev
   e0bce0d..9af7f81  master -> master

- ajax
___
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] Fixed CRTC disable in xrandr causing scale issue

2018-03-05 Thread Arsalan Awan
From: Arsalan-Awan 

Whenever scale value is increased when it is between 0.0 - 1.0
and is kept within 0.0 - 1.0 range, the display does not expand
to fullscreen. It rather becomes smaller and leaves blank spaces on
the right and bottom sides. And the following error message shows up:

X Error of failed request: BadMatch (invalid parameter attributes)
  Major opcode of failed request: 139 (RANDR)
  Minor opcode of failed request: 7 (RRSetScreenSize)
  Serial number of failed request: 36
  Current serial number in output stream: 38

Before xrandr attempts to apply the transformation matrix requested
by "scale", "transform" or "scale-from" options, it disables the
CRTCs for which the transformed image's dimensions are larger than the
target display's resolution/mode. But, when the image is smaller, it
does not disable the CRTCs, and proceeds with applying the
transformation (involves framebuffer dimension changes). This works well
for all the scale values and transitions except for the above mentioned
transitions.

This patch fixes such issues!

Signed-off-by: Arsalan-Awan 
---
 xrandr.c | 31 +--
 1 file changed, 5 insertions(+), 26 deletions(-)

diff --git a/xrandr.c b/xrandr.c
index dcfdde0..d2872ef 100644
--- a/xrandr.c
+++ b/xrandr.c
@@ -1723,8 +1723,7 @@ apply (void)
XGrabServer (dpy);
 
 /*
- * Turn off any crtcs which are to be disabled or which are
- * larger than the target size
+ * Turn off any crtcs which are to be disabled
  */
 for (c = 0; c < res->ncrtc; c++)
 {
@@ -1736,33 +1735,13 @@ apply (void)
continue;

/* 
-* If this crtc is to be left enabled, make
-* sure the old size fits then new screen
+* Once the scale value is changed in xrandr, omitting the
+* following if statement causes the display to fail to
+* turn back ON after it goes to sleep due to inactivity.
 */
if (crtc->mode_info) 
-   {
-   XRRModeInfo *old_mode = find_mode_by_xid (crtc_info->mode);
-   int x, y, w, h;
-   box_t bounds;
-
-   if (!old_mode) 
-   panic (RRSetConfigFailed, crtc);
-   
-   /* old position and size information */
-   mode_geometry (old_mode, crtc_info->rotation,
-  >current_transform.transform,
-  );
-
-   x = crtc_info->x + bounds.x1;
-   y = crtc_info->y + bounds.y1;
-   w = bounds.x2 - bounds.x1;
-   h = bounds.y2 - bounds.y1;
-
-   /* if it fits, skip it */
-   if (x + w <= fb_width && y + h <= fb_height) 
-   continue;
crtc->changing = True;
-   }
+
s = crtc_disable (crtc);
if (s != RRSetConfigSuccess)
panic (s, crtc);
-- 
2.7.4

### To reproduce the issue:
xrandr --output DisplayPort-1 --scale 1.5x1.5
xrandr --output DisplayPort-1 --scale 1.0x1.0
xrandr --output DisplayPort-1 --scale 0.6x0.6
xrandr --output DisplayPort-1 --scale 0.8x0.8
X Error of failed request: BadMatch (invalid parameter attributes)
  Major opcode of failed request: 140 (RANDR)
  Minor opcode of failed request: 7 (RRSetScreenSize)
  Serial number of failed request: 26
  Current serial number in output stream: 28

xrandr --output DisplayPort-1 --scale 1.0x1.0

### Using transform also produces the same issue
xrandr --output DisplayPort-1 --transform 1.5,0,0,0,1.5,0,0,0,1
xrandr --output DisplayPort-1 --transform 1.0,0,0,0,1.0,0,0,0,1
xrandr --output DisplayPort-1 --transform 0.6,0,0,0,0.6,0,0,0,1
xrandr --output DisplayPort-1 --transform 0.8,0,0,0,0.8,0,0,0,1
X Error of failed request: BadMatch (invalid parameter attributes)
  Major opcode of failed request: 140 (RANDR)
  Minor opcode of failed request: 7 (RRSetScreenSize)
  Serial number of failed request: 26
  Current serial number in output stream: 28

xrandr --output DisplayPort-1 --transform 1.0,0,0,0,1.0,0,0,0,1


### I was able to produce this issue on 3 different machines including:
 * Dell Precsion T5600 Desktop - OS: Ubuntu 16.04.3 LTS 64 bit, kernel: 
4.10.0-42-generic, that has an nVIDIA GPU
 * AMD board - OS: Mentor Embedded Linux, Kernel: 4.9.21-yocto-standard, xrandr 
1.5.0, x86_64, that has an AMD GPU
 * Another AMD board - OS: Mentor Embedded Linux, Kernel: 
4.9.21-yocto-standard, xrandr 1.5.0, x86_64, that has an AMD GPU

___
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] xkb: XkbSetMap on the lastSlave needs to change the master

2018-03-05 Thread Daniel Stone
Hi,

On 3 March 2018 at 01:41, Samir Benmendil  wrote:
> The layout needs to be set on the master too if the layout is changed on
> the device that was last used by the master.

I have a vague recollection that not doing this was a deliberate
choice, but in hindsight, it was also a bad choice.

Acked-by: Daniel Stone 

Cheers,
Daniel
___
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 xserver] xkb: XkbSetMap on the lastSlave needs to change the master

2018-03-05 Thread Samir Benmendil
The layout needs to be set on the master too if the layout is changed on
the device that was last used by the master.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=85256
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91571

Signed-off-by: Samir Benmendil 
---
 xkb/xkb.c | 26 +-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/xkb/xkb.c b/xkb/xkb.c
index 678f82368..12460034b 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -2626,6 +2626,8 @@ ProcXkbSetMap(ClientPtr client)
 if (rc != Success)
 return rc;
 
+DeviceIntPtr master = GetMaster(dev, MASTER_KEYBOARD);
+
 if (stuff->deviceSpec == XkbUseCoreKbd) {
 DeviceIntPtr other;
 
@@ -2641,9 +2643,21 @@ ProcXkbSetMap(ClientPtr client)
 }
 }
 }
+} else {
+DeviceIntPtr other;
+
+for (other = inputInfo.devices; other; other = other->next) {
+if (other != dev && GetMaster(other, MASTER_KEYBOARD) != dev &&
+(other != master || dev != master->lastSlave))
+continue;
+
+rc = _XkbSetMapChecks(client, other, stuff, tmp);
+if (rc != Success)
+return rc;
+}
 }
 
-/* We know now that we will succed with the SetMap. In theory anyway. */
+/* We know now that we will succeed with the SetMap. In theory anyway. */
 rc = _XkbSetMap(client, dev, stuff, tmp);
 if (rc != Success)
 return rc;
@@ -2664,6 +2678,16 @@ ProcXkbSetMap(ClientPtr client)
sync. */
 }
 }
+} else {
+DeviceIntPtr other;
+
+for (other = inputInfo.devices; other; other = other->next) {
+if (other != dev && GetMaster(other, MASTER_KEYBOARD) != dev &&
+(other != master || dev != master->lastSlave))
+continue;
+
+_XkbSetMap(client, other, stuff, tmp); //ignore rc
+}
 }
 
 return Success;
-- 
2.14.2

___
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