Behavior of double click in X Window - Motif

2014-08-06 Thread Girish Joglekar
I have two laptops, both with Ubuntu 12.04.4, on which I am running an
application which is based on X window, Xt and motif. It runs on both
machines except for one quirk regarding a widget on which I can double
click. On the older laptop the double click works as expected, it opens
another dialog box. On the new laptop the double click does not work. The
new laptop is a HP 15-d027cl TouchSmart Notebook. It also has a 'fancy'
touch pad. Is the PC hardware some how changing the double click behavior?
I have no clue what could be the problem. Also, I do not if I need to post
this on other forums if it is not an X Window issue.
Thank you.
Girish Joglekar
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Re: Am I using the ati or vesa driver?

2014-08-06 Thread Russ Whitaker



On Thu, 7 Aug 2014, YuGiOhJCJ Mailing-List wrote:



Here is the exact configure line I have used:
./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib

 --mandir=/usr/man --docdir=/usr/doc/mesa-10.0.2
 --with-dri-driverdir=/usr/lib/xorg/modules/dri
 --with-dri-drivers=i915,i965 --enable-shared-glapi
 --with-egl-platforms=drm --with-gallium-drivers=radeonsi

___


Isn't a i915 a Intel product and radeon a amd product?

  Russ
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s


Re: [PATCH v2] glamor: Add glamor_copy_fbo_cpu() for CopyArea to non-GPU destination

2014-08-06 Thread Eric Anholt
Michel Dänzer mic...@daenzer.net writes:

 From: Michel Dänzer michel.daen...@amd.com

 This provides a speedup e.g. when the destination is an SHM pixmap.

 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76285
 Signed-off-by: Michel Dänzer michel.daen...@amd.com
 ---

 v2: Drop unnecessary use of GLAMOR_ACCESS_WO, thanks Eric for pointing
 that out. Disregard the GLAMOR_ACCESS_WO patch for now.

Nice.  We may end up pulling the other patch some day, but it seemed
separate from what this one needed.

Reviewed-by: Eric Anholt e...@anholt.net

(My guess is keithp will pull the patch directly.)


pgp7P7ZeZCebZ.pgp
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH synaptics] conf: increase top software button area to 15%

2014-08-06 Thread Eric Anholt
Peter Hutterer peter.hutte...@who-t.net writes:

 We had reports that the top software button area is hard to hit for those
 using the trackpoint and clicking the buttons with their thumb.

 Analysis of event recordings (3 different people) for left, right and middle
 clicks shows that there is a significant amount of events up to about 10mm
 (with outliers up to 12mm) from the top of the touchpad. That maps to 15%.

 Interestingly, the middle button is not affected by this, presumably the
 haptic feedback of the little dots sticking out from the surface make hitting
 the button easier.

I'm confused by this bit of the commit message -- aren't you also
increasing the soft middle button rectangle size?

It makes me really happy to see changes being driven by tracing of user
behavior, though.  I wouldn't have even looked at a synaptics change if
not for the compelling commit message :)


pgp0QTpLjJLZP.pgp
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH synaptics] conf: increase top software button area to 15%

2014-08-06 Thread Peter Hutterer

On 6/08/2014 16:35 , Eric Anholt wrote:

Peter Hutterer peter.hutte...@who-t.net writes:


We had reports that the top software button area is hard to hit for those
using the trackpoint and clicking the buttons with their thumb.

Analysis of event recordings (3 different people) for left, right and middle
clicks shows that there is a significant amount of events up to about 10mm
(with outliers up to 12mm) from the top of the touchpad. That maps to 15%.

Interestingly, the middle button is not affected by this, presumably the
haptic feedback of the little dots sticking out from the surface make hitting
the button easier.


I'm confused by this bit of the commit message -- aren't you also
increasing the soft middle button rectangle size?


yeah, I am for simplicity and because the sample set is too small to be 
definitive about it anyway. I'll reword the commit message, this should 
read that for the middle button it doesn't seem *necessary* but it's 
increased anyway.



It makes me really happy to see changes being driven by tracing of user
behavior, though.  I wouldn't have even looked at a synaptics change if
not for the compelling commit message :)


Only took us several years to get the tools in place to actually 
evaluate and analyse stuff like that :)


Cheers,
  Peter


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


Re: [PATCH synaptics] conf: increase top software button area to 15%

2014-08-06 Thread Hans de Goede
Hi,

On 08/06/2014 04:13 AM, Peter Hutterer wrote:
 We had reports that the top software button area is hard to hit for those
 using the trackpoint and clicking the buttons with their thumb.
 
 Analysis of event recordings (3 different people) for left, right and middle
 clicks shows that there is a significant amount of events up to about 10mm
 (with outliers up to 12mm) from the top of the touchpad. That maps to 15%.
 
 Interestingly, the middle button is not affected by this, presumably the
 haptic feedback of the little dots sticking out from the surface make hitting
 the button easier.
 
 Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

Looks good, thanks.

Reviewed-by: Hans de Goede hdego...@redhat.com

Regards,

Hans

 ---
  conf/50-synaptics.conf | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/conf/50-synaptics.conf b/conf/50-synaptics.conf
 index a3145b8..aa50456 100644
 --- a/conf/50-synaptics.conf
 +++ b/conf/50-synaptics.conf
 @@ -33,7 +33,7 @@ Section InputClass
  Identifier Default clickpad buttons
  MatchDriver synaptics
  Option SoftButtonAreas 50% 0 82% 0 0 0 0 0
 -Option SecondarySoftButtonAreas 58% 0 0 8% 42% 58% 0 8%
 +Option SecondarySoftButtonAreas 58% 0 0 15% 42% 58% 0 15%
  EndSection
  
  # This option disables software buttons on Apple touchpads.
 
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: xcb_io: Fix Xlib 32-bit request number wrapping bug

2014-08-06 Thread Jan Smout
Hello,

can somebody have a look at my question below please?


thanks,
On 31 July 2014 18:05, Jan Smout smout@gmail.com wrote:

 Hello again,

 just thought I should ask again. Probably the message got lost in the
 noise  ;-)


 On 29 July 2014 18:56, Jan Smout smout@gmail.com wrote:

 Hi all,

 I recently stumbled into an application that crashed because of this:
 https://bugs.freedesktop.org/show_bug.cgi?id=71338

 and quickly found the following patch:
 http://patchwork.freedesktop.org/patch/16753/

 which seems to work fine (the application used to crash in less than 24
 hrs. Has been running for 5 days straight with the patch).


 Now my question: what is the status of this patch? Are there still
 details to be clarified before it can be put into the main tree?


 best regards,
 Jan
 --
 Life is complex, it has a real part and an imaginary part.






-- 
Life is complex, it has a real part and an imaginary part.
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH v4 1/3] kdrive: add support to +X+Y syntax in -screen option parsing

2014-08-06 Thread Laércio de Sousa
From: Laércio de Sousa lbsous...@gmail.com

This patch enhances current -screen option parsing for kdrive-based
applications. It can parse strings like
WIDTHxHEIGHT+XOFFSET+YOFFSET, storing X and Y offsets
in KdScreenInfo instances.

For negative values, this patch supports +-X+-Y (not -X-Y) syntax.

It will allow e.g. proper Xephyr window placement for multiseat
purposes.
---
 hw/kdrive/src/kdrive.c | 23 +++
 hw/kdrive/src/kdrive.h |  2 ++
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index b5b91c0..5dbff3f 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -300,6 +300,8 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
 screen-softCursor = kdSoftCursor;
 screen-origin = kdOrigin;
 screen-randr = RR_Rotate_0;
+screen-x = 0;
+screen-y = 0;
 screen-width = 0;
 screen-height = 0;
 screen-width_mm = 0;
@@ -313,7 +315,7 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
 return;
 
 for (i = 0; i  2; i++) {
-arg = KdParseFindNext(arg, x/@XY, save, delim);
+arg = KdParseFindNext(arg, x/+@XY, save, delim);
 if (!save[0])
 return;
 
@@ -321,7 +323,7 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
 mm = 0;
 
 if (delim == '/') {
-arg = KdParseFindNext(arg, x@XY, save, delim);
+arg = KdParseFindNext(arg, x+@XY, save, delim);
 if (!save[0])
 return;
 mm = atoi(save);
@@ -335,7 +337,8 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
 screen-height = pixels;
 screen-height_mm = mm;
 }
-if (delim != 'x'  delim != '@'  delim != 'X'  delim != 'Y' 
+if (delim != 'x'  delim != '+'  delim != '@' 
+delim != 'X'  delim != 'Y' 
 (delim != '\0' || i == 0))
 return;
 }
@@ -346,6 +349,18 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
 kdSoftCursor = FALSE;
 kdSubpixelOrder = SubPixelUnknown;
 
+if (delim == '+') {
+arg = KdParseFindNext(arg, +@xXY, save, delim);
+if (save[0])
+screen-x = atoi(save);
+}
+
+if (delim == '+') {
+arg = KdParseFindNext(arg, @xXY, save, delim);
+if (save[0])
+screen-y = atoi(save);
+}
+
 if (delim == '@') {
 arg = KdParseFindNext(arg, xXY, save, delim);
 if (save[0]) {
@@ -425,7 +440,7 @@ KdUseMsg(void)
 {
 ErrorF(\nTinyX Device Dependent Usage:\n);
 ErrorF
-(-screen 
WIDTH[/WIDTHMM]xHEIGHT[/HEIGHTMM][@ROTATION][X][Y][xDEPTH/BPP[xFREQ]]  Specify 
screen characteristics\n);
+(-screen 
WIDTH[/WIDTHMM]xHEIGHT[/HEIGHTMM][+[-]XOFFSET][+[-]YOFFSET][@ROTATION][X][Y][xDEPTH/BPP[xFREQ]]
  Specify screen characteristics\n);
 ErrorF
 (-rgba rgb/bgr/vrgb/vbgr/none   Specify subpixel ordering for LCD 
panels\n);
 ErrorF
diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h
index 08b1681..066a134 100644
--- a/hw/kdrive/src/kdrive.h
+++ b/hw/kdrive/src/kdrive.h
@@ -89,6 +89,8 @@ typedef struct _KdScreenInfo {
 ScreenPtr pScreen;
 void *driver;
 Rotation randr; /* rotation and reflection */
+int x;
+int y;
 int width;
 int height;
 int rate;
-- 
1.8.4.5

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

[PATCH v4 3/3] ephyr: set screen size origin from host X server output's CRTC geometry

2014-08-06 Thread Laércio de Sousa
From: Laércio de Sousa lbsous...@gmail.com

If a given output is passed via new -output option, Xephyr will query
host X server for its info. If the following conditions are met:

 a. RandR extension is enabled in host X server;
 b. supported RandR version in host X server is 1.2 or newer;
 c. the given output name is valid;
 d. the given output is connected;

then Xephyr will get output's CRTC geometry and use it to set its own
screen size and origin. It's just like starting Xephyr in fullscreen mode,
but restricted to the given output's CRTC geometry (fake Zaphod mode).

This is the main feature needed for Xephyr-based single-card multiseat
setups where we don't have separate screens to start Xephyr in fullscreen
mode safely.
---
 configure.ac|   2 +-
 hw/kdrive/ephyr/ephyr.c |   5 +-
 hw/kdrive/ephyr/ephyr.h |   2 +
 hw/kdrive/ephyr/ephyrinit.c |  28 -
 hw/kdrive/ephyr/hostx.c | 137 +++-
 hw/kdrive/ephyr/hostx.h |   9 ++-
 6 files changed, 175 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index f3d9654..cba7d24 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2364,7 +2364,7 @@ if test $KDRIVE = yes; then
AC_DEFINE(KDRIVE_MOUSE, 1, [Enable KDrive mouse driver])
 fi
 
-XEPHYR_REQUIRED_LIBS=xau xdmcp xcb xcb-shape xcb-aux xcb-image xcb-icccm 
xcb-shm xcb-keysyms
+XEPHYR_REQUIRED_LIBS=xau xdmcp xcb xcb-shape xcb-aux xcb-image xcb-icccm 
xcb-shm xcb-keysyms xcb-randr
 if test x$XV = xyes; then
 XEPHYR_REQUIRED_LIBS=$XEPHYR_REQUIRED_LIBS xcb-xv
 fi
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index b039c68..85d4193 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -111,13 +111,16 @@ Bool
 ephyrScreenInitialize(KdScreenInfo *screen)
 {
 EphyrScrPriv *scrpriv = screen-driver;
+int x = 0, y = 0;
 int width = 640, height = 480;
 CARD32 redMask, greenMask, blueMask;
 
-if (hostx_want_screen_size(screen, width, height)
+if (hostx_want_screen_geometry(screen, width, height, x, y)
 || !screen-width || !screen-height) {
 screen-width = width;
 screen-height = height;
+screen-x = x;
+screen-y = y;
 }
 
 if (EphyrWantGrayScale)
diff --git a/hw/kdrive/ephyr/ephyr.h b/hw/kdrive/ephyr/ephyr.h
index 5c4936b..4e753f1 100644
--- a/hw/kdrive/ephyr/ephyr.h
+++ b/hw/kdrive/ephyr/ephyr.h
@@ -74,8 +74,10 @@ typedef struct _ephyrScrPriv {
 xcb_window_t peer_win;/* Used for GL; should be at most one */
 xcb_image_t *ximg;
 Bool win_explicit_position;
+int win_x, win_y;
 int win_width, win_height;
 int server_depth;
+const char *output; /* Set via -output option */
 unsigned char *fb_data; /* only used when host bpp != server bpp */
 xcb_shm_segment_info_t shminfo;
 
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index e04c8dc..38acc52 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -47,6 +47,8 @@ extern KdPointerDriver LinuxEvdevMouseDriver;
 extern KdKeyboardDriver LinuxEvdevKeyboardDriver;
 #endif
 
+void processScreenOrOutputArg(const char *screen_size, const char *output, 
char *parent_id);
+void processOutputArg(const char *output, char *parent_id);
 void processScreenArg(const char *screen_size, char *parent_id);
 
 void
@@ -134,6 +136,7 @@ ddxUseMsg(void)
 ErrorF(-parent XIDUse existing window as Xephyr root win\n);
 ErrorF(-sw-cursor   Render cursors in software in Xephyr\n);
 ErrorF(-fullscreen  Attempt to run Xephyr fullscreen\n);
+ErrorF(-output NAME   Attempt to run Xephyr fullscreen (restricted 
to given output geometry)\n);
 ErrorF(-grayscale   Simulate 8bit grayscale\n);
 ErrorF(-resizeable  Make Xephyr windows resizeable\n);
 #ifdef GLAMOR
@@ -154,7 +157,7 @@ ddxUseMsg(void)
 }
 
 void
-processScreenArg(const char *screen_size, char *parent_id)
+processScreenOrOutputArg(const char *screen_size, const char *output, char 
*parent_id)
 {
 KdCardInfo *card;
 
@@ -178,13 +181,25 @@ processScreenArg(const char *screen_size, char *parent_id)
 
 use_geometry = (strchr(screen_size, '+') != NULL);
 EPHYR_DBG(screen number:%d\n, screen-mynum);
-hostx_add_screen(screen, p_id, screen-mynum, use_geometry);
+hostx_add_screen(screen, p_id, screen-mynum, use_geometry, output);
 }
 else {
 ErrorF(No matching card found!\n);
 }
 }
 
+void
+processScreenArg(const char *screen_size, char *parent_id)
+{
+processScreenOrOutputArg(screen_size, NULL, parent_id);
+}
+
+void
+processOutputArg(const char *output, char *parent_id)
+{
+processScreenOrOutputArg(100x100+0+0, output, parent_id);
+}
+
 int
 ddxProcessArgument(int argc, char **argv, int i)
 {
@@ -226,6 +241,15 @@ ddxProcessArgument(int argc, char **argv, int i)
 UseMsg();
 

[PATCH v4 2/3] ephyr: enable screen window placement following kdrive -screen option extended syntax

2014-08-06 Thread Laércio de Sousa
From: Laércio de Sousa lbsous...@gmail.com

With this patch, one can launch Xephyr with option -screen WxH+X+Y
to place its window origin at (X,Y). This patch relies on a previous
one that extends kdrive -screen option syntax to parse +X+Y substring
as expected.

If +X+Y is not passed in -screen argument string, let the WM place
the window for us, as before.
---
 hw/kdrive/ephyr/ephyr.c |  3 ++-
 hw/kdrive/ephyr/ephyr.h |  1 +
 hw/kdrive/ephyr/ephyrinit.c |  5 -
 hw/kdrive/ephyr/hostx.c | 21 ++---
 hw/kdrive/ephyr/hostx.h |  3 ++-
 5 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index d57e9f3..b039c68 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -242,7 +242,8 @@ ephyrMapFramebuffer(KdScreenInfo * screen)
 buffer_height = ephyrBufferHeight(screen);
 
 priv-base =
-hostx_screen_init(screen, screen-width, screen-height, buffer_height,
+hostx_screen_init(screen, screen-x, screen-y,
+  screen-width, screen-height, buffer_height,
   priv-bytes_per_line, screen-fb.bitsPerPixel);
 
 if ((scrpriv-randr  RR_Rotate_0)  !(scrpriv-randr  RR_Reflect_All)) {
diff --git a/hw/kdrive/ephyr/ephyr.h b/hw/kdrive/ephyr/ephyr.h
index dfd93c9..5c4936b 100644
--- a/hw/kdrive/ephyr/ephyr.h
+++ b/hw/kdrive/ephyr/ephyr.h
@@ -73,6 +73,7 @@ typedef struct _ephyrScrPriv {
 xcb_window_t win_pre_existing;/* Set via -parent option like xnest */
 xcb_window_t peer_win;/* Used for GL; should be at most one */
 xcb_image_t *ximg;
+Bool win_explicit_position;
 int win_width, win_height;
 int server_depth;
 unsigned char *fb_data; /* only used when host bpp != server bpp */
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index fc00010..e04c8dc 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -164,6 +164,7 @@ processScreenArg(const char *screen_size, char *parent_id)
 if (card) {
 KdScreenInfo *screen;
 unsigned long p_id = 0;
+Bool use_geometry;
 
 screen = KdScreenInfoAdd(card);
 KdParseScreen(screen, screen_size);
@@ -174,8 +175,10 @@ processScreenArg(const char *screen_size, char *parent_id)
 if (parent_id) {
 p_id = strtol(parent_id, NULL, 0);
 }
+
+use_geometry = (strchr(screen_size, '+') != NULL);
 EPHYR_DBG(screen number:%d\n, screen-mynum);
-hostx_add_screen(screen, p_id, screen-mynum);
+hostx_add_screen(screen, p_id, screen-mynum, use_geometry);
 }
 else {
 ErrorF(No matching card found!\n);
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index 1c75974..92a8ada 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -119,7 +119,7 @@ hostx_want_screen_size(KdScreenInfo *screen, int *width, 
int *height)
 }
 
 void
-hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num)
+hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num, 
Bool use_geometry)
 {
 EphyrScrPriv *scrpriv = screen-driver;
 int index = HostX.n_screens;
@@ -131,6 +131,7 @@ hostx_add_screen(KdScreenInfo *screen, unsigned long 
win_id, int screen_num)
 
 scrpriv-screen = screen;
 scrpriv-win_pre_existing = win_id;
+scrpriv-win_explicit_position = use_geometry;
 }
 
 void
@@ -637,6 +638,7 @@ hostx_set_cmap_entry(unsigned char idx,
  */
 void *
 hostx_screen_init(KdScreenInfo *screen,
+  int x, int y,
   int width, int height, int buffer_height,
   int *bytes_per_line, int *bits_per_pixel)
 {
@@ -648,8 +650,8 @@ hostx_screen_init(KdScreenInfo *screen,
 exit(1);
 }
 
-EPHYR_DBG(host_screen=%p wxh=%dx%d, buffer_height=%d,
-  host_screen, width, height, buffer_height);
+EPHYR_DBG(host_screen=%p x=%d, y=%d, wxh=%dx%d, buffer_height=%d,
+  host_screen, x, y, width, height, buffer_height);
 
 if (scrpriv-ximg != NULL) {
 /* Free up the image data if previously used
@@ -740,6 +742,19 @@ hostx_screen_init(KdScreenInfo *screen,
 
 xcb_map_window(HostX.conn, scrpriv-win);
 
+/* Set explicit window position if it was informed in
+ * -screen option (WxH+X or WxH+X+Y). Otherwise, accept the
+ * position set by WM.
+ * The trick here is putting this code after xcb_map_window() call,
+ * so these values won't be overriden by WM. */
+if (scrpriv-win_explicit_position)
+{
+uint32_t mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y;
+uint32_t values[2] = {x, y};
+xcb_configure_window(HostX.conn, scrpriv-win, mask, values);
+}
+
+
 xcb_aux_sync(HostX.conn);
 
 scrpriv-win_width = width;
diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h
index e83323a..c554ca3 100644
--- a/hw/kdrive/ephyr/hostx.h
+++ 

[PATCH v4 0/3] new approach for Xephyr window placement (for multiseat purposes) (v4)

2014-08-06 Thread Laércio de Sousa
This is the v4 of patch series for providing window placement support
for Xephyr.

Previous version of this series was already reviewed by Keith Packard,
but not yet merged into xserver git master branch.

Meanwhile, we've made some minor changes, as suggested by
Richard Hansen ubuntu-...@scientician.org from Ubuntu Multiseat Launchpad 
team,
in order to avoid some compiler warnings.

Laércio de Sousa (3):
  kdrive: add support to +X+Y syntax in -screen option parsing
  ephyr: enable screen window placement following kdrive -screen option
extended syntax
  ephyr: set screen size  origin from host X server output's CRTC
geometry

 configure.ac|   2 +-
 hw/kdrive/ephyr/ephyr.c |   8 ++-
 hw/kdrive/ephyr/ephyr.h |   3 +
 hw/kdrive/ephyr/ephyrinit.c |  31 -
 hw/kdrive/ephyr/hostx.c | 156 ++--
 hw/kdrive/ephyr/hostx.h |  10 ++-
 hw/kdrive/src/kdrive.c  |  23 +--
 hw/kdrive/src/kdrive.h  |   2 +
 8 files changed, 220 insertions(+), 15 deletions(-)

-- 
1.8.4.5

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

Re: xcb_io: Fix Xlib 32-bit request number wrapping bug

2014-08-06 Thread Michel Dänzer
On 06.08.2014 20:13, Jan Smout wrote:
 
 can somebody have a look at my question below please?

Have you tried asking on the xcb mailing list?


-- 
Earthling Michel Dänzer|  http://www.amd.com
Libre software enthusiast  |Mesa and X developer
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH v4 RESEND 0/3] new approach for Xephyr window placement (for multiseat purposes) (v4)

2014-08-06 Thread Laércio de Sousa
[UPDATE] Just resend this series with my e-mail address fixed
in commit messages. Sorry for the inconvenience.

This is the v4 of patch series for providing window placement support
for Xephyr.

Previous version of this series was already reviewed by Keith Packard,
but not yet merged into xserver git master branch.

Meanwhile, we've made some minor changes, as suggested by
Richard Hansen ubuntu-...@scientician.org from Ubuntu Multiseat Launchpad 
team,
in order to avoid some compiler warnings.

Laércio de Sousa (3):
  kdrive: add support to +X+Y syntax in -screen option parsing
  ephyr: enable screen window placement following kdrive -screen option
extended syntax
  ephyr: set screen size  origin from host X server output's CRTC
geometry

 configure.ac|   2 +-
 hw/kdrive/ephyr/ephyr.c |   8 ++-
 hw/kdrive/ephyr/ephyr.h |   3 +
 hw/kdrive/ephyr/ephyrinit.c |  31 -
 hw/kdrive/ephyr/hostx.c | 156 ++--
 hw/kdrive/ephyr/hostx.h |  10 ++-
 hw/kdrive/src/kdrive.c  |  23 +--
 hw/kdrive/src/kdrive.h  |   2 +
 8 files changed, 220 insertions(+), 15 deletions(-)

-- 
1.8.4.5

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

[PATCH v4 RESEND 3/3] ephyr: set screen size origin from host X server output's CRTC geometry

2014-08-06 Thread Laércio de Sousa
If a given output is passed via new -output option, Xephyr will query
host X server for its info. If the following conditions are met:

 a. RandR extension is enabled in host X server;
 b. supported RandR version in host X server is 1.2 or newer;
 c. the given output name is valid;
 d. the given output is connected;

then Xephyr will get output's CRTC geometry and use it to set its own
screen size and origin. It's just like starting Xephyr in fullscreen mode,
but restricted to the given output's CRTC geometry (fake Zaphod mode).

This is the main feature needed for Xephyr-based single-card multiseat
setups where we don't have separate screens to start Xephyr in fullscreen
mode safely.
---
 configure.ac|   2 +-
 hw/kdrive/ephyr/ephyr.c |   5 +-
 hw/kdrive/ephyr/ephyr.h |   2 +
 hw/kdrive/ephyr/ephyrinit.c |  28 -
 hw/kdrive/ephyr/hostx.c | 137 +++-
 hw/kdrive/ephyr/hostx.h |   9 ++-
 6 files changed, 175 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index f3d9654..cba7d24 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2364,7 +2364,7 @@ if test $KDRIVE = yes; then
AC_DEFINE(KDRIVE_MOUSE, 1, [Enable KDrive mouse driver])
 fi
 
-XEPHYR_REQUIRED_LIBS=xau xdmcp xcb xcb-shape xcb-aux xcb-image xcb-icccm 
xcb-shm xcb-keysyms
+XEPHYR_REQUIRED_LIBS=xau xdmcp xcb xcb-shape xcb-aux xcb-image xcb-icccm 
xcb-shm xcb-keysyms xcb-randr
 if test x$XV = xyes; then
 XEPHYR_REQUIRED_LIBS=$XEPHYR_REQUIRED_LIBS xcb-xv
 fi
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index b039c68..85d4193 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -111,13 +111,16 @@ Bool
 ephyrScreenInitialize(KdScreenInfo *screen)
 {
 EphyrScrPriv *scrpriv = screen-driver;
+int x = 0, y = 0;
 int width = 640, height = 480;
 CARD32 redMask, greenMask, blueMask;
 
-if (hostx_want_screen_size(screen, width, height)
+if (hostx_want_screen_geometry(screen, width, height, x, y)
 || !screen-width || !screen-height) {
 screen-width = width;
 screen-height = height;
+screen-x = x;
+screen-y = y;
 }
 
 if (EphyrWantGrayScale)
diff --git a/hw/kdrive/ephyr/ephyr.h b/hw/kdrive/ephyr/ephyr.h
index 5c4936b..4e753f1 100644
--- a/hw/kdrive/ephyr/ephyr.h
+++ b/hw/kdrive/ephyr/ephyr.h
@@ -74,8 +74,10 @@ typedef struct _ephyrScrPriv {
 xcb_window_t peer_win;/* Used for GL; should be at most one */
 xcb_image_t *ximg;
 Bool win_explicit_position;
+int win_x, win_y;
 int win_width, win_height;
 int server_depth;
+const char *output; /* Set via -output option */
 unsigned char *fb_data; /* only used when host bpp != server bpp */
 xcb_shm_segment_info_t shminfo;
 
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index e04c8dc..38acc52 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -47,6 +47,8 @@ extern KdPointerDriver LinuxEvdevMouseDriver;
 extern KdKeyboardDriver LinuxEvdevKeyboardDriver;
 #endif
 
+void processScreenOrOutputArg(const char *screen_size, const char *output, 
char *parent_id);
+void processOutputArg(const char *output, char *parent_id);
 void processScreenArg(const char *screen_size, char *parent_id);
 
 void
@@ -134,6 +136,7 @@ ddxUseMsg(void)
 ErrorF(-parent XIDUse existing window as Xephyr root win\n);
 ErrorF(-sw-cursor   Render cursors in software in Xephyr\n);
 ErrorF(-fullscreen  Attempt to run Xephyr fullscreen\n);
+ErrorF(-output NAME   Attempt to run Xephyr fullscreen (restricted 
to given output geometry)\n);
 ErrorF(-grayscale   Simulate 8bit grayscale\n);
 ErrorF(-resizeable  Make Xephyr windows resizeable\n);
 #ifdef GLAMOR
@@ -154,7 +157,7 @@ ddxUseMsg(void)
 }
 
 void
-processScreenArg(const char *screen_size, char *parent_id)
+processScreenOrOutputArg(const char *screen_size, const char *output, char 
*parent_id)
 {
 KdCardInfo *card;
 
@@ -178,13 +181,25 @@ processScreenArg(const char *screen_size, char *parent_id)
 
 use_geometry = (strchr(screen_size, '+') != NULL);
 EPHYR_DBG(screen number:%d\n, screen-mynum);
-hostx_add_screen(screen, p_id, screen-mynum, use_geometry);
+hostx_add_screen(screen, p_id, screen-mynum, use_geometry, output);
 }
 else {
 ErrorF(No matching card found!\n);
 }
 }
 
+void
+processScreenArg(const char *screen_size, char *parent_id)
+{
+processScreenOrOutputArg(screen_size, NULL, parent_id);
+}
+
+void
+processOutputArg(const char *output, char *parent_id)
+{
+processScreenOrOutputArg(100x100+0+0, output, parent_id);
+}
+
 int
 ddxProcessArgument(int argc, char **argv, int i)
 {
@@ -226,6 +241,15 @@ ddxProcessArgument(int argc, char **argv, int i)
 UseMsg();
 exit(1);
 }
+else if (!strcmp(argv[i], 

[PATCH v4 RESEND 1/3] kdrive: add support to +X+Y syntax in -screen option parsing

2014-08-06 Thread Laércio de Sousa
This patch enhances current -screen option parsing for kdrive-based
applications. It can parse strings like
WIDTHxHEIGHT+XOFFSET+YOFFSET, storing X and Y offsets
in KdScreenInfo instances.

For negative values, this patch supports +-X+-Y (not -X-Y) syntax.

It will allow e.g. proper Xephyr window placement for multiseat
purposes.
---
 hw/kdrive/src/kdrive.c | 23 +++
 hw/kdrive/src/kdrive.h |  2 ++
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index b5b91c0..5dbff3f 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -300,6 +300,8 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
 screen-softCursor = kdSoftCursor;
 screen-origin = kdOrigin;
 screen-randr = RR_Rotate_0;
+screen-x = 0;
+screen-y = 0;
 screen-width = 0;
 screen-height = 0;
 screen-width_mm = 0;
@@ -313,7 +315,7 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
 return;
 
 for (i = 0; i  2; i++) {
-arg = KdParseFindNext(arg, x/@XY, save, delim);
+arg = KdParseFindNext(arg, x/+@XY, save, delim);
 if (!save[0])
 return;
 
@@ -321,7 +323,7 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
 mm = 0;
 
 if (delim == '/') {
-arg = KdParseFindNext(arg, x@XY, save, delim);
+arg = KdParseFindNext(arg, x+@XY, save, delim);
 if (!save[0])
 return;
 mm = atoi(save);
@@ -335,7 +337,8 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
 screen-height = pixels;
 screen-height_mm = mm;
 }
-if (delim != 'x'  delim != '@'  delim != 'X'  delim != 'Y' 
+if (delim != 'x'  delim != '+'  delim != '@' 
+delim != 'X'  delim != 'Y' 
 (delim != '\0' || i == 0))
 return;
 }
@@ -346,6 +349,18 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
 kdSoftCursor = FALSE;
 kdSubpixelOrder = SubPixelUnknown;
 
+if (delim == '+') {
+arg = KdParseFindNext(arg, +@xXY, save, delim);
+if (save[0])
+screen-x = atoi(save);
+}
+
+if (delim == '+') {
+arg = KdParseFindNext(arg, @xXY, save, delim);
+if (save[0])
+screen-y = atoi(save);
+}
+
 if (delim == '@') {
 arg = KdParseFindNext(arg, xXY, save, delim);
 if (save[0]) {
@@ -425,7 +440,7 @@ KdUseMsg(void)
 {
 ErrorF(\nTinyX Device Dependent Usage:\n);
 ErrorF
-(-screen 
WIDTH[/WIDTHMM]xHEIGHT[/HEIGHTMM][@ROTATION][X][Y][xDEPTH/BPP[xFREQ]]  Specify 
screen characteristics\n);
+(-screen 
WIDTH[/WIDTHMM]xHEIGHT[/HEIGHTMM][+[-]XOFFSET][+[-]YOFFSET][@ROTATION][X][Y][xDEPTH/BPP[xFREQ]]
  Specify screen characteristics\n);
 ErrorF
 (-rgba rgb/bgr/vrgb/vbgr/none   Specify subpixel ordering for LCD 
panels\n);
 ErrorF
diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h
index 08b1681..066a134 100644
--- a/hw/kdrive/src/kdrive.h
+++ b/hw/kdrive/src/kdrive.h
@@ -89,6 +89,8 @@ typedef struct _KdScreenInfo {
 ScreenPtr pScreen;
 void *driver;
 Rotation randr; /* rotation and reflection */
+int x;
+int y;
 int width;
 int height;
 int rate;
-- 
1.8.4.5

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


[PATCH v4 RESEND 2/3] ephyr: enable screen window placement following kdrive -screen option extended syntax

2014-08-06 Thread Laércio de Sousa
With this patch, one can launch Xephyr with option -screen WxH+X+Y
to place its window origin at (X,Y). This patch relies on a previous
one that extends kdrive -screen option syntax to parse +X+Y substring
as expected.

If +X+Y is not passed in -screen argument string, let the WM place
the window for us, as before.
---
 hw/kdrive/ephyr/ephyr.c |  3 ++-
 hw/kdrive/ephyr/ephyr.h |  1 +
 hw/kdrive/ephyr/ephyrinit.c |  5 -
 hw/kdrive/ephyr/hostx.c | 21 ++---
 hw/kdrive/ephyr/hostx.h |  3 ++-
 5 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index d57e9f3..b039c68 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -242,7 +242,8 @@ ephyrMapFramebuffer(KdScreenInfo * screen)
 buffer_height = ephyrBufferHeight(screen);
 
 priv-base =
-hostx_screen_init(screen, screen-width, screen-height, buffer_height,
+hostx_screen_init(screen, screen-x, screen-y,
+  screen-width, screen-height, buffer_height,
   priv-bytes_per_line, screen-fb.bitsPerPixel);
 
 if ((scrpriv-randr  RR_Rotate_0)  !(scrpriv-randr  RR_Reflect_All)) {
diff --git a/hw/kdrive/ephyr/ephyr.h b/hw/kdrive/ephyr/ephyr.h
index dfd93c9..5c4936b 100644
--- a/hw/kdrive/ephyr/ephyr.h
+++ b/hw/kdrive/ephyr/ephyr.h
@@ -73,6 +73,7 @@ typedef struct _ephyrScrPriv {
 xcb_window_t win_pre_existing;/* Set via -parent option like xnest */
 xcb_window_t peer_win;/* Used for GL; should be at most one */
 xcb_image_t *ximg;
+Bool win_explicit_position;
 int win_width, win_height;
 int server_depth;
 unsigned char *fb_data; /* only used when host bpp != server bpp */
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index fc00010..e04c8dc 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -164,6 +164,7 @@ processScreenArg(const char *screen_size, char *parent_id)
 if (card) {
 KdScreenInfo *screen;
 unsigned long p_id = 0;
+Bool use_geometry;
 
 screen = KdScreenInfoAdd(card);
 KdParseScreen(screen, screen_size);
@@ -174,8 +175,10 @@ processScreenArg(const char *screen_size, char *parent_id)
 if (parent_id) {
 p_id = strtol(parent_id, NULL, 0);
 }
+
+use_geometry = (strchr(screen_size, '+') != NULL);
 EPHYR_DBG(screen number:%d\n, screen-mynum);
-hostx_add_screen(screen, p_id, screen-mynum);
+hostx_add_screen(screen, p_id, screen-mynum, use_geometry);
 }
 else {
 ErrorF(No matching card found!\n);
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index 1c75974..92a8ada 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -119,7 +119,7 @@ hostx_want_screen_size(KdScreenInfo *screen, int *width, 
int *height)
 }
 
 void
-hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num)
+hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num, 
Bool use_geometry)
 {
 EphyrScrPriv *scrpriv = screen-driver;
 int index = HostX.n_screens;
@@ -131,6 +131,7 @@ hostx_add_screen(KdScreenInfo *screen, unsigned long 
win_id, int screen_num)
 
 scrpriv-screen = screen;
 scrpriv-win_pre_existing = win_id;
+scrpriv-win_explicit_position = use_geometry;
 }
 
 void
@@ -637,6 +638,7 @@ hostx_set_cmap_entry(unsigned char idx,
  */
 void *
 hostx_screen_init(KdScreenInfo *screen,
+  int x, int y,
   int width, int height, int buffer_height,
   int *bytes_per_line, int *bits_per_pixel)
 {
@@ -648,8 +650,8 @@ hostx_screen_init(KdScreenInfo *screen,
 exit(1);
 }
 
-EPHYR_DBG(host_screen=%p wxh=%dx%d, buffer_height=%d,
-  host_screen, width, height, buffer_height);
+EPHYR_DBG(host_screen=%p x=%d, y=%d, wxh=%dx%d, buffer_height=%d,
+  host_screen, x, y, width, height, buffer_height);
 
 if (scrpriv-ximg != NULL) {
 /* Free up the image data if previously used
@@ -740,6 +742,19 @@ hostx_screen_init(KdScreenInfo *screen,
 
 xcb_map_window(HostX.conn, scrpriv-win);
 
+/* Set explicit window position if it was informed in
+ * -screen option (WxH+X or WxH+X+Y). Otherwise, accept the
+ * position set by WM.
+ * The trick here is putting this code after xcb_map_window() call,
+ * so these values won't be overriden by WM. */
+if (scrpriv-win_explicit_position)
+{
+uint32_t mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y;
+uint32_t values[2] = {x, y};
+xcb_configure_window(HostX.conn, scrpriv-win, mask, values);
+}
+
+
 xcb_aux_sync(HostX.conn);
 
 scrpriv-win_width = width;
diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h
index e83323a..c554ca3 100644
--- a/hw/kdrive/ephyr/hostx.h
+++ b/hw/kdrive/ephyr/hostx.h
@@ -107,7 +107,7 @@ int
  

Re: [Xcb] [PATCH libX11] xcb_io: Fix Xlib 32-bit request number wrapping bug

2014-08-06 Thread Jan Smout
Hello Keith,

my previous mails probably got lost in the noise. Please see my question
below:


On 29 July 2014 18:56, Jan Smout smout@gmail.com wrote:

 Hi all,

 I recently stumbled into an application that crashed because of this:
 https://bugs.freedesktop.org/show_bug.cgi?id=71338

 and quickly found the following patch:
 http://patchwork.freedesktop.org/patch/16753/

 which seems to work fine (the application used to crash in less than 24
 hrs. Has been running for 5 days straight with the patch).


 Now my question: what is the status of this patch? Are there still details
 to be clarified before it can be put into the main tree?


 best regards,
 Jan
 --
 Life is complex, it has a real part and an imaginary part.




-- 
Life is complex, it has a real part and an imaginary part.
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH 0/3] glamor: Disable shader-based trapezoids. Bug 76213.

2014-08-06 Thread Keith Packard
The shader-based trapezoid drawing code in glamor draws incorrectly
and doesn't appear to offer any performance benefits. This series
fixes a couple of compiler warning problems and then disables the
shader based trapezoid code.

This fixes the bottom and right shadows in the XFCE panel when drawn
with system style as seen in this bug report:

https://bugs.freedesktop.org/show_bug.cgi?id=76213

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


[PATCH 2/3] glamor: Fix warnings building without GL trapzoid code

2014-08-06 Thread Keith Packard
This gets rid of a couple of compiler warnings when building without
GLAMOR_TRAPEZOID_SHADER defined.

Signed-off-by: Keith Packard kei...@keithp.com
---
 glamor/glamor_trapezoid.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/glamor/glamor_trapezoid.c b/glamor/glamor_trapezoid.c
index d61d11f..5b0e26d 100644
--- a/glamor/glamor_trapezoid.c
+++ b/glamor/glamor_trapezoid.c
@@ -48,6 +48,8 @@ _glamor_linefixedX(xLineFixed *l, xFixed y, Bool ceil)
 return l-p1.x + (xFixed) (ex / dy);
 }
 
+#ifdef GLAMOR_TRAPEZOID_SHADER
+
 static xFixed
 _glamor_linefixedY(xLineFixed *l, xFixed x, Bool ceil)
 {
@@ -60,8 +62,6 @@ _glamor_linefixedY(xLineFixed *l, xFixed x, Bool ceil)
 return l-p1.y + (xFixed) (ey / dx);
 }
 
-#ifdef GLAMOR_TRAPEZOID_SHADER
-
 #define GLAMOR_VERTEX_TOP_BOTTOM  (GLAMOR_VERTEX_SOURCE + 1)
 #define GLAMOR_VERTEX_LEFT_PARAM  (GLAMOR_VERTEX_SOURCE + 2)
 #define GLAMOR_VERTEX_RIGHT_PARAM (GLAMOR_VERTEX_SOURCE + 3)
@@ -1674,6 +1674,7 @@ _glamor_trapezoids(CARD8 op,
 }
 
 has_large_trapezoid = _glamor_trapezoid_bounds(ntrap, traps, bounds);
+(void) has_large_trapezoid;
 DEBUGF(The bounds for all traps is: bounds.x1 = %d, bounds.x2 = %d, 
bounds.y1 = %d, bounds.y2 = %d,  ntrap = %d\n, bounds.x1,
bounds.x2, bounds.y1, bounds.y2, ntrap);
-- 
2.0.1

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


[PATCH 3/3] glamor: Disable GL trapezoid code

2014-08-06 Thread Keith Packard
I can't find any performance benefit to using the GL path and the code
renders this trapezoid incorrectly:

 top: FIXED   29.50
  bottom: FIXED   30.00
left top: POINT0.00,   29.50
 left bottom: POINT0.00,   30.50
   right top: POINT -127.50,   29.50
right bottom: POINT   52.50,   30.00

This should render a solid line from 0,30 to 52,30 but draws nothing.

Signed-off-by: Keith Packard kei...@keithp.com
---
 glamor/glamor_priv.h | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index 385c027..f270d16 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -1063,7 +1063,14 @@ void glamor_xv_render(glamor_port_private *port_priv);
 
 #define GLAMOR_PIXMAP_DYNAMIC_UPLOAD
 #define GLAMOR_GRADIENT_SHADER
+
+/*
+ * The GL trapezoid code has several bugs and
+ * offers no performance benefit. Disable it for now
+ */
+#if 0
 #define GLAMOR_TRAPEZOID_SHADER
+#endif
 #define GLAMOR_TEXTURED_LARGE_PIXMAP 1
 #define WALKAROUND_LARGE_TEXTURE_MAP
 #if 0
-- 
2.0.1

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


[PATCH 1/3] glamor: Fix glamor_fbo compiling with DEBUGF enabled

2014-08-06 Thread Keith Packard
Missing parameter to DEBUGF in glamor_pixmap_fbo_cache_get

Signed-off-by: Keith Packard kei...@keithp.com
---
 glamor/glamor_fbo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/glamor/glamor_fbo.c b/glamor/glamor_fbo.c
index 090dfd8..09459d1 100644
--- a/glamor/glamor_fbo.c
+++ b/glamor/glamor_fbo.c
@@ -94,7 +94,7 @@ glamor_pixmap_fbo_cache_get(glamor_screen_private 
*glamor_priv,
 DEBUGF(Request w %d h %d format %x \n, w, h, format);
 DEBUGF(got cache entry %p w %d h %d fbo %d tex %d format 
%x\n,
fbo_entry, fbo_entry-width, fbo_entry-height,
-   fbo_entry-fb, fbo_entry-tex);
+   fbo_entry-fb, fbo_entry-tex, fbo_entry-format);
 xorg_list_del(fbo_entry-list);
 ret_fbo = fbo_entry;
 break;
-- 
2.0.1

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


Re: [Xcb] [PATCH libX11] xcb_io: Fix Xlib 32-bit request number wrapping bug

2014-08-06 Thread Jonas Petersen

Hi Jan,

thanks for pushing this.

I spent really a lot of time (weeks) tracking this down and finding a 
solution. Digging down the depths of the operating system, while 
actually writting application software. The result is the mentioned 
patch. I then posted it here. I think there is approval that the fix 
actually does work. Then there was starting some discussion about 
implementation details, optimization and possible further problems at 
other locations.


At some point I had to take a break, since this had cost me already so 
much time. Sorry about that. It's to bad this is still pending.


If nothing happens I might be willing to spend another small amount of 
time to help completing this. But my time is limited. I can not promise 
anything.


I think this bug is quite serious. It suddenly kills programs without 
asking out of nowhere. And it's patient.


By the way, my software now runs on 64-bit, so luckily I'm not affected 
anymore (hopefully). But there's probably still plenty of 32-bit systems 
endangered by this.


Have you seen? Keith posted a program to reproduce the bug (or confirm 
that the patch works) as fast as possible:


/* cc -o nop nop.c `pkg-config --cflags --libs x11` */
#includestdio.h
#includestdint.h
#includeX11/Xlib.h

int
main (int argc, char **argv)
{
uint64_ti = 0;
Display *dpy = XOpenDisplay(NULL);

for (;;) {
++i;
if ((i  0xfff) == 0) {
XFlush(dpy);
printf (0x%llx\n, i);
}
XNoOp(dpy);
}
}


Regards
Jonas




Am 29.07.2014 um 18:56 schrieb Jan Smout:

Hi all,

I recently stumbled into an application that crashed because of this:
https://bugs.freedesktop.org/show_bug.cgi?id=71338

and quickly found the following patch:
http://patchwork.freedesktop.org/patch/16753/

which seems to work fine (the application used to crash in less than 
24 hrs. Has been running for 5 days straight with the patch).



Now my question: what is the status of this patch? Are there still 
details to be clarified before it can be put into the main tree?



best regards,
Jan
--
Life is complex, it has a real part and an imaginary part.


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

Re: [PATCH 0/3] glamor: Disable shader-based trapezoids. Bug 76213.

2014-08-06 Thread Eric Anholt
Keith Packard kei...@keithp.com writes:

 The shader-based trapezoid drawing code in glamor draws incorrectly
 and doesn't appear to offer any performance benefits. This series
 fixes a couple of compiler warning problems and then disables the
 shader based trapezoid code.

 This fixes the bottom and right shadows in the XFCE panel when drawn
 with system style as seen in this bug report:

Can we just delete the existing traps code, instead?  It looks like it's
trying to compute coverage using area, which we know isn't right.


pgpbGp1TRMK1i.pgp
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH 0/3] glamor: Disable shader-based trapezoids. Bug 76213.

2014-08-06 Thread Keith Packard
Eric Anholt e...@anholt.net writes:

 Keith Packard kei...@keithp.com writes:

 The shader-based trapezoid drawing code in glamor draws incorrectly
 and doesn't appear to offer any performance benefits. This series
 fixes a couple of compiler warning problems and then disables the
 shader based trapezoid code.

 This fixes the bottom and right shadows in the XFCE panel when drawn
 with system style as seen in this bug report:

 Can we just delete the existing traps code, instead?  It looks like it's
 trying to compute coverage using area, which we know isn't right.

Yeah, I think that's probably the best plan.

-- 
keith.pack...@intel.com


pgp6DDmqNzGqs.pgp
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH] glamor: Remove shader-based trapezoid implementation. Fixes Bug 76213.

2014-08-06 Thread Keith Packard
I can't find any performance benefit to using the GL path and the code
renders this trapezoid incorrectly:

 top: FIXED   29.50
  bottom: FIXED   30.00
left top: POINT0.00,   29.50
 left bottom: POINT0.00,   30.50
   right top: POINT -127.50,   29.50
right bottom: POINT   52.50,   30.00

This should render a solid line from 0,30 to 52,30 but draws nothing.

The code also uses an area computation for trapezoid coverage which
does not conform to the Render specification which requires a specific
point sampling technique.

Signed-off-by: Keith Packard kei...@keithp.com
---
 glamor/glamor.c   |6 -
 glamor/glamor_priv.h  |6 -
 glamor/glamor_trapezoid.c | 1708 +
 3 files changed, 36 insertions(+), 1684 deletions(-)

diff --git a/glamor/glamor.c b/glamor/glamor.c
index 521bc25..4b3c2fa 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -510,9 +510,6 @@ glamor_init(ScreenPtr screen, unsigned int flags)
 
 glamor_init_vbo(screen);
 glamor_init_pixmap_fbo(screen);
-#ifdef GLAMOR_TRAPEZOID_SHADER
-glamor_init_trapezoid_shader(screen);
-#endif
 glamor_init_finish_access_shaders(screen);
 #ifdef GLAMOR_GRADIENT_SHADER
 glamor_init_gradient_shader(screen);
@@ -542,9 +539,6 @@ glamor_release_screen_priv(ScreenPtr screen)
 #endif
 glamor_fini_vbo(screen);
 glamor_fini_pixmap_fbo(screen);
-#ifdef GLAMOR_TRAPEZOID_SHADER
-glamor_fini_trapezoid_shader(screen);
-#endif
 glamor_fini_finish_access_shaders(screen);
 #ifdef GLAMOR_GRADIENT_SHADER
 glamor_fini_gradient_shader(screen);
diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index 385c027..042bad0 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -281,9 +281,6 @@ typedef struct glamor_screen_private {
 int linear_max_nstops;
 int radial_max_nstops;
 
-/* glamor trapezoid shader. */
-GLint trapezoid_prog;
-
 PixmapPtr *back_pixmap;
 int screen_fbo;
 struct glamor_saved_procs saved_procs;
@@ -719,8 +716,6 @@ void glamor_composite_glyph_rects(CARD8 op,
 void glamor_composite_rects(CARD8 op,
 PicturePtr pDst,
 xRenderColor *color, int nRect, xRectangle *rects);
-void glamor_init_trapezoid_shader(ScreenPtr screen);
-void glamor_fini_trapezoid_shader(ScreenPtr screen);
 PicturePtr glamor_convert_gradient_picture(ScreenPtr screen,
PicturePtr source,
int x_source,
@@ -1063,7 +1058,6 @@ void glamor_xv_render(glamor_port_private *port_priv);
 
 #define GLAMOR_PIXMAP_DYNAMIC_UPLOAD
 #define GLAMOR_GRADIENT_SHADER
-#define GLAMOR_TRAPEZOID_SHADER
 #define GLAMOR_TEXTURED_LARGE_PIXMAP 1
 #define WALKAROUND_LARGE_TEXTURE_MAP
 #if 0
diff --git a/glamor/glamor_trapezoid.c b/glamor/glamor_trapezoid.c
index d61d11f..f8bf6c9 100644
--- a/glamor/glamor_trapezoid.c
+++ b/glamor/glamor_trapezoid.c
@@ -36,1522 +36,6 @@
 #include mipict.h
 #include fbpict.h
 
-static xFixed
-_glamor_linefixedX(xLineFixed *l, xFixed y, Bool ceil)
-{
-xFixed dx = l-p2.x - l-p1.x;
-xFixed_32_32 ex = (xFixed_32_32) (y - l-p1.y) * dx;
-xFixed dy = l-p2.y - l-p1.y;
-
-if (ceil)
-ex += (dy - 1);
-return l-p1.x + (xFixed) (ex / dy);
-}
-
-static xFixed
-_glamor_linefixedY(xLineFixed *l, xFixed x, Bool ceil)
-{
-xFixed dy = l-p2.y - l-p1.y;
-xFixed_32_32 ey = (xFixed_32_32) (x - l-p1.x) * dy;
-xFixed dx = l-p2.x - l-p1.x;
-
-if (ceil)
-ey += (dx - 1);
-return l-p1.y + (xFixed) (ey / dx);
-}
-
-#ifdef GLAMOR_TRAPEZOID_SHADER
-
-#define GLAMOR_VERTEX_TOP_BOTTOM  (GLAMOR_VERTEX_SOURCE + 1)
-#define GLAMOR_VERTEX_LEFT_PARAM  (GLAMOR_VERTEX_SOURCE + 2)
-#define GLAMOR_VERTEX_RIGHT_PARAM (GLAMOR_VERTEX_SOURCE + 3)
-
-#define DEBUG_CLIP_VTX 0
-
-#define POINT_INSIDE_CLIP_RECT(point, rect)\
-(point[0] = IntToxFixed(rect-x1) \
-  point[0] = IntToxFixed(rect-x2)  \
-  point[1] = IntToxFixed(rect-y1)  \
-  point[1] = IntToxFixed(rect-y2))
-
-static xFixed
-_glamor_lines_crossfixedY(xLineFixed *l, xLineFixed *r)
-{
-xFixed dx1 = l-p2.x - l-p1.x;
-xFixed dx2 = r-p2.x - r-p1.x;
-xFixed dy1 = l-p2.y - l-p1.y;
-xFixed dy2 = r-p2.y - r-p1.y;
-xFixed_32_32 tmp = (xFixed_32_32) dy2 * dy1;
-xFixed_32_32 dividend1 = (tmp  32) * (l-p1.x - r-p1.x);
-xFixed_32_32 dividend2;
-xFixed_32_32 dividend3;
-xFixed_32_32 divisor;
-
-tmp = (xFixed_32_32) dx1 *dy2;
-
-dividend2 = (tmp  32) * l-p1.y;
-tmp = (xFixed_32_32) dy1 *dx2;
-
-dividend3 = (tmp  32) * r-p1.y;
-divisor = ((xFixed_32_32) dx1 * (xFixed_32_32) dy2
-   - (xFixed_32_32) dy1 * (xFixed_32_32) dx2)  32;
-
-if (divisor)
-return (xFixed) ((dividend2 - dividend1 - 

[PATCH v2 1/3] kdrive: add support to +X+Y syntax in -screen option parsing

2014-08-06 Thread Laércio de Sousa
This patch enhances current -screen option parsing for kdrive-based
applications. It can parse strings like
WIDTHxHEIGHT+XOFFSET+YOFFSET, storing X and Y offsets
in KdScreenInfo instances.

For negative values, this patch supports +-X+-Y (not -X-Y) syntax.

It will allow e.g. proper Xephyr window placement for multiseat
purposes.
---
 hw/kdrive/src/kdrive.c | 23 +++
 hw/kdrive/src/kdrive.h |  2 ++
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index b5b91c0..5dbff3f 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -300,6 +300,8 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
 screen-softCursor = kdSoftCursor;
 screen-origin = kdOrigin;
 screen-randr = RR_Rotate_0;
+screen-x = 0;
+screen-y = 0;
 screen-width = 0;
 screen-height = 0;
 screen-width_mm = 0;
@@ -313,7 +315,7 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
 return;
 
 for (i = 0; i  2; i++) {
-arg = KdParseFindNext(arg, x/@XY, save, delim);
+arg = KdParseFindNext(arg, x/+@XY, save, delim);
 if (!save[0])
 return;
 
@@ -321,7 +323,7 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
 mm = 0;
 
 if (delim == '/') {
-arg = KdParseFindNext(arg, x@XY, save, delim);
+arg = KdParseFindNext(arg, x+@XY, save, delim);
 if (!save[0])
 return;
 mm = atoi(save);
@@ -335,7 +337,8 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
 screen-height = pixels;
 screen-height_mm = mm;
 }
-if (delim != 'x'  delim != '@'  delim != 'X'  delim != 'Y' 
+if (delim != 'x'  delim != '+'  delim != '@' 
+delim != 'X'  delim != 'Y' 
 (delim != '\0' || i == 0))
 return;
 }
@@ -346,6 +349,18 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
 kdSoftCursor = FALSE;
 kdSubpixelOrder = SubPixelUnknown;
 
+if (delim == '+') {
+arg = KdParseFindNext(arg, +@xXY, save, delim);
+if (save[0])
+screen-x = atoi(save);
+}
+
+if (delim == '+') {
+arg = KdParseFindNext(arg, @xXY, save, delim);
+if (save[0])
+screen-y = atoi(save);
+}
+
 if (delim == '@') {
 arg = KdParseFindNext(arg, xXY, save, delim);
 if (save[0]) {
@@ -425,7 +440,7 @@ KdUseMsg(void)
 {
 ErrorF(\nTinyX Device Dependent Usage:\n);
 ErrorF
-(-screen 
WIDTH[/WIDTHMM]xHEIGHT[/HEIGHTMM][@ROTATION][X][Y][xDEPTH/BPP[xFREQ]]  Specify 
screen characteristics\n);
+(-screen 
WIDTH[/WIDTHMM]xHEIGHT[/HEIGHTMM][+[-]XOFFSET][+[-]YOFFSET][@ROTATION][X][Y][xDEPTH/BPP[xFREQ]]
  Specify screen characteristics\n);
 ErrorF
 (-rgba rgb/bgr/vrgb/vbgr/none   Specify subpixel ordering for LCD 
panels\n);
 ErrorF
diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h
index 08b1681..066a134 100644
--- a/hw/kdrive/src/kdrive.h
+++ b/hw/kdrive/src/kdrive.h
@@ -89,6 +89,8 @@ typedef struct _KdScreenInfo {
 ScreenPtr pScreen;
 void *driver;
 Rotation randr; /* rotation and reflection */
+int x;
+int y;
 int width;
 int height;
 int rate;
-- 
1.8.4.5

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


[PATCH v4 0/3] new approach for Xephyr window placement (for multiseat purposes) (v4)

2014-08-06 Thread Laércio de Sousa
This is the v4 of patch series for providing window placement support
for Xephyr.

Previous version of this series was already reviewed by Keith Packard,
but not yet merged into xserver git master branch.

Meanwhile, we've made some minor changes, as suggested by
Richard Hansen ubuntu-...@scientician.org from Ubuntu Multiseat Launchpad 
team,
in order to avoid some compiler warnings.

Laércio de Sousa (3):
  kdrive: add support to +X+Y syntax in -screen option parsing
  ephyr: enable screen window placement following kdrive -screen option
extended syntax
  ephyr: set screen size  origin from host X server output's CRTC
geometry

 configure.ac|   2 +-
 hw/kdrive/ephyr/ephyr.c |   8 ++-
 hw/kdrive/ephyr/ephyr.h |   3 +
 hw/kdrive/ephyr/ephyrinit.c |  31 -
 hw/kdrive/ephyr/hostx.c | 156 ++--
 hw/kdrive/ephyr/hostx.h |  10 ++-
 hw/kdrive/src/kdrive.c  |  23 +--
 hw/kdrive/src/kdrive.h  |   2 +
 8 files changed, 220 insertions(+), 15 deletions(-)

-- 
1.8.4.5

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

[PATCH v2 2/3] ephyr: enable screen window placement following kdrive -screen option extended syntax

2014-08-06 Thread Laércio de Sousa
With this patch, one can launch Xephyr with option -screen WxH+X+Y
to place its window origin at (X,Y). This patch relies on a previous
one that extends kdrive -screen option syntax to parse +X+Y substring
as expected.

If +X+Y is not passed in -screen argument string, let the WM place
the window for us, as before.
---
 hw/kdrive/ephyr/ephyr.c |  3 ++-
 hw/kdrive/ephyr/ephyr.h |  1 +
 hw/kdrive/ephyr/ephyrinit.c |  5 -
 hw/kdrive/ephyr/hostx.c | 21 ++---
 hw/kdrive/ephyr/hostx.h |  3 ++-
 5 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index d57e9f3..b039c68 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -242,7 +242,8 @@ ephyrMapFramebuffer(KdScreenInfo * screen)
 buffer_height = ephyrBufferHeight(screen);
 
 priv-base =
-hostx_screen_init(screen, screen-width, screen-height, buffer_height,
+hostx_screen_init(screen, screen-x, screen-y,
+  screen-width, screen-height, buffer_height,
   priv-bytes_per_line, screen-fb.bitsPerPixel);
 
 if ((scrpriv-randr  RR_Rotate_0)  !(scrpriv-randr  RR_Reflect_All)) {
diff --git a/hw/kdrive/ephyr/ephyr.h b/hw/kdrive/ephyr/ephyr.h
index dfd93c9..5c4936b 100644
--- a/hw/kdrive/ephyr/ephyr.h
+++ b/hw/kdrive/ephyr/ephyr.h
@@ -73,6 +73,7 @@ typedef struct _ephyrScrPriv {
 xcb_window_t win_pre_existing;/* Set via -parent option like xnest */
 xcb_window_t peer_win;/* Used for GL; should be at most one */
 xcb_image_t *ximg;
+Bool win_explicit_position;
 int win_width, win_height;
 int server_depth;
 unsigned char *fb_data; /* only used when host bpp != server bpp */
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index fc00010..e04c8dc 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -164,6 +164,7 @@ processScreenArg(const char *screen_size, char *parent_id)
 if (card) {
 KdScreenInfo *screen;
 unsigned long p_id = 0;
+Bool use_geometry;
 
 screen = KdScreenInfoAdd(card);
 KdParseScreen(screen, screen_size);
@@ -174,8 +175,10 @@ processScreenArg(const char *screen_size, char *parent_id)
 if (parent_id) {
 p_id = strtol(parent_id, NULL, 0);
 }
+
+use_geometry = (strchr(screen_size, '+') != NULL);
 EPHYR_DBG(screen number:%d\n, screen-mynum);
-hostx_add_screen(screen, p_id, screen-mynum);
+hostx_add_screen(screen, p_id, screen-mynum, use_geometry);
 }
 else {
 ErrorF(No matching card found!\n);
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index 1c75974..92a8ada 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -119,7 +119,7 @@ hostx_want_screen_size(KdScreenInfo *screen, int *width, 
int *height)
 }
 
 void
-hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num)
+hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num, 
Bool use_geometry)
 {
 EphyrScrPriv *scrpriv = screen-driver;
 int index = HostX.n_screens;
@@ -131,6 +131,7 @@ hostx_add_screen(KdScreenInfo *screen, unsigned long 
win_id, int screen_num)
 
 scrpriv-screen = screen;
 scrpriv-win_pre_existing = win_id;
+scrpriv-win_explicit_position = use_geometry;
 }
 
 void
@@ -637,6 +638,7 @@ hostx_set_cmap_entry(unsigned char idx,
  */
 void *
 hostx_screen_init(KdScreenInfo *screen,
+  int x, int y,
   int width, int height, int buffer_height,
   int *bytes_per_line, int *bits_per_pixel)
 {
@@ -648,8 +650,8 @@ hostx_screen_init(KdScreenInfo *screen,
 exit(1);
 }
 
-EPHYR_DBG(host_screen=%p wxh=%dx%d, buffer_height=%d,
-  host_screen, width, height, buffer_height);
+EPHYR_DBG(host_screen=%p x=%d, y=%d, wxh=%dx%d, buffer_height=%d,
+  host_screen, x, y, width, height, buffer_height);
 
 if (scrpriv-ximg != NULL) {
 /* Free up the image data if previously used
@@ -740,6 +742,19 @@ hostx_screen_init(KdScreenInfo *screen,
 
 xcb_map_window(HostX.conn, scrpriv-win);
 
+/* Set explicit window position if it was informed in
+ * -screen option (WxH+X or WxH+X+Y). Otherwise, accept the
+ * position set by WM.
+ * The trick here is putting this code after xcb_map_window() call,
+ * so these values won't be overriden by WM. */
+if (scrpriv-win_explicit_position)
+{
+uint32_t mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y;
+uint32_t values[2] = {x, y};
+xcb_configure_window(HostX.conn, scrpriv-win, mask, values);
+}
+
+
 xcb_aux_sync(HostX.conn);
 
 scrpriv-win_width = width;
diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h
index e83323a..c554ca3 100644
--- a/hw/kdrive/ephyr/hostx.h
+++ b/hw/kdrive/ephyr/hostx.h
@@ -107,7 +107,7 @@ int
  

[PATCH v2 3/3] ephyr: set screen size origin from host X server output's CRTC geometry

2014-08-06 Thread Laércio de Sousa
If a given output is passed via new -output option, Xephyr will query
host X server for its info. If the following conditions are met:

 a. RandR extension is enabled in host X server;
 b. supported RandR version in host X server is 1.2 or newer;
 c. the given output name is valid;
 d. the given output is connected;

then Xephyr will get output's CRTC geometry and use it to set its own
screen size and origin. It's just like starting Xephyr in fullscreen mode,
but restricted to the given output's CRTC geometry (fake Zaphod mode).

This is the main feature needed for Xephyr-based single-card multiseat
setups where we don't have separate screens to start Xephyr in fullscreen
mode safely.
---
 configure.ac|   2 +-
 hw/kdrive/ephyr/ephyr.c |   5 +-
 hw/kdrive/ephyr/ephyr.h |   2 +
 hw/kdrive/ephyr/ephyrinit.c |  28 -
 hw/kdrive/ephyr/hostx.c | 137 +++-
 hw/kdrive/ephyr/hostx.h |   9 ++-
 6 files changed, 175 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index f3d9654..cba7d24 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2364,7 +2364,7 @@ if test $KDRIVE = yes; then
AC_DEFINE(KDRIVE_MOUSE, 1, [Enable KDrive mouse driver])
 fi
 
-XEPHYR_REQUIRED_LIBS=xau xdmcp xcb xcb-shape xcb-aux xcb-image xcb-icccm 
xcb-shm xcb-keysyms
+XEPHYR_REQUIRED_LIBS=xau xdmcp xcb xcb-shape xcb-aux xcb-image xcb-icccm 
xcb-shm xcb-keysyms xcb-randr
 if test x$XV = xyes; then
 XEPHYR_REQUIRED_LIBS=$XEPHYR_REQUIRED_LIBS xcb-xv
 fi
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index b039c68..85d4193 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -111,13 +111,16 @@ Bool
 ephyrScreenInitialize(KdScreenInfo *screen)
 {
 EphyrScrPriv *scrpriv = screen-driver;
+int x = 0, y = 0;
 int width = 640, height = 480;
 CARD32 redMask, greenMask, blueMask;
 
-if (hostx_want_screen_size(screen, width, height)
+if (hostx_want_screen_geometry(screen, width, height, x, y)
 || !screen-width || !screen-height) {
 screen-width = width;
 screen-height = height;
+screen-x = x;
+screen-y = y;
 }
 
 if (EphyrWantGrayScale)
diff --git a/hw/kdrive/ephyr/ephyr.h b/hw/kdrive/ephyr/ephyr.h
index 5c4936b..4e753f1 100644
--- a/hw/kdrive/ephyr/ephyr.h
+++ b/hw/kdrive/ephyr/ephyr.h
@@ -74,8 +74,10 @@ typedef struct _ephyrScrPriv {
 xcb_window_t peer_win;/* Used for GL; should be at most one */
 xcb_image_t *ximg;
 Bool win_explicit_position;
+int win_x, win_y;
 int win_width, win_height;
 int server_depth;
+const char *output; /* Set via -output option */
 unsigned char *fb_data; /* only used when host bpp != server bpp */
 xcb_shm_segment_info_t shminfo;
 
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index e04c8dc..38acc52 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -47,6 +47,8 @@ extern KdPointerDriver LinuxEvdevMouseDriver;
 extern KdKeyboardDriver LinuxEvdevKeyboardDriver;
 #endif
 
+void processScreenOrOutputArg(const char *screen_size, const char *output, 
char *parent_id);
+void processOutputArg(const char *output, char *parent_id);
 void processScreenArg(const char *screen_size, char *parent_id);
 
 void
@@ -134,6 +136,7 @@ ddxUseMsg(void)
 ErrorF(-parent XIDUse existing window as Xephyr root win\n);
 ErrorF(-sw-cursor   Render cursors in software in Xephyr\n);
 ErrorF(-fullscreen  Attempt to run Xephyr fullscreen\n);
+ErrorF(-output NAME   Attempt to run Xephyr fullscreen (restricted 
to given output geometry)\n);
 ErrorF(-grayscale   Simulate 8bit grayscale\n);
 ErrorF(-resizeable  Make Xephyr windows resizeable\n);
 #ifdef GLAMOR
@@ -154,7 +157,7 @@ ddxUseMsg(void)
 }
 
 void
-processScreenArg(const char *screen_size, char *parent_id)
+processScreenOrOutputArg(const char *screen_size, const char *output, char 
*parent_id)
 {
 KdCardInfo *card;
 
@@ -178,13 +181,25 @@ processScreenArg(const char *screen_size, char *parent_id)
 
 use_geometry = (strchr(screen_size, '+') != NULL);
 EPHYR_DBG(screen number:%d\n, screen-mynum);
-hostx_add_screen(screen, p_id, screen-mynum, use_geometry);
+hostx_add_screen(screen, p_id, screen-mynum, use_geometry, output);
 }
 else {
 ErrorF(No matching card found!\n);
 }
 }
 
+void
+processScreenArg(const char *screen_size, char *parent_id)
+{
+processScreenOrOutputArg(screen_size, NULL, parent_id);
+}
+
+void
+processOutputArg(const char *output, char *parent_id)
+{
+processScreenOrOutputArg(100x100+0+0, output, parent_id);
+}
+
 int
 ddxProcessArgument(int argc, char **argv, int i)
 {
@@ -226,6 +241,15 @@ ddxProcessArgument(int argc, char **argv, int i)
 UseMsg();
 exit(1);
 }
+else if (!strcmp(argv[i], 

Re: [PATCH] glamor: Remove shader-based trapezoid implementation. Fixes Bug 76213.

2014-08-06 Thread Keith Packard
Keith Packard kei...@keithp.com writes:

 I can't find any performance benefit to using the GL path

Eric pointed out that reaching the shader path was much harder than I
thought, and in fact I wasn't measuring the shader path, I was just
measuring the sw path both times.. I went and hacked the code so that it
would use the shader path when drawing up to 1000 trapezoids, and even
in Precise mode just so that I could use x11perf -addaatrapezoid to
measure it:

1: trapezoid.shader
2: trapezoid.sw

   1 2 Operation
   -   -
 59700.0  377.0 (63.149)   Fill 1x1 aa pre-added trapezoid 
 59700.0   605000.0 (10.134)   Fill 10x10 aa pre-added trapezoid 
  5970.045800.0 ( 7.672)   Fill 100x100 aa pre-added trapezoid 
  4660.0 5150.0 ( 1.105)   Fill 300x300 aa pre-added trapezoid 

I think we can remove this code without any remorse.

However, XFCE is clearly broken in expecting what it drew to work.

 1. The trapezoid is self-intersecting (bow tie), for which the spec
says:

Rendering of concave trapezoids is unspecified except that the
 result must obey the clipping rules.

 2. It requests Imprecise mode, which relaxes the rasterization rules.
Expecting this bizarre set of trapezoids to draw something
reasonable seems optimistic at best.

-- 
keith.pack...@intel.com


pgpXqXTfygQFz.pgp
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH 3/4] xfree86: Provide Xv driver callback to free data at server reset

2014-08-06 Thread Keith Packard
For drivers which allocates per-port resources, this provides a simple
place to free them at reset time.

Signed-off-by: Keith Packard kei...@keithp.com
---
 hw/xfree86/common/xf86xv.c | 6 ++
 hw/xfree86/common/xf86xv.h | 3 +++
 hw/xfree86/common/xf86xvpriv.h | 1 +
 3 files changed, 10 insertions(+)

diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index e212a73..26129ef 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -521,6 +521,7 @@ xf86XVInitAdaptors(ScreenPtr pScreen, XF86VideoAdaptorPtr * 
infoPtr, int number)
 adaptorPriv-QueryImageAttributes = adaptorPtr-QueryImageAttributes;
 adaptorPriv-PutImage = adaptorPtr-PutImage;
 adaptorPriv-ReputImage = adaptorPtr-ReputImage;   /* image/still 
*/
+adaptorPriv-FreePort = adaptorPtr-FreePort;
 
 pa-devPriv.ptr = (void *) adaptorPriv;
 
@@ -1370,6 +1371,11 @@ xf86XVAllocatePort(unsigned long port, XvPortPtr pPort, 
XvPortPtr * ppPort)
 static int
 xf86XVFreePort(XvPortPtr pPort)
 {
+XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort-devPriv.ptr);
+
+if (portPriv-AdaptorRec-FreePort)
+(*portPriv-AdaptorRec-FreePort)(portPriv-pScrn,
+  portPriv-DevPriv.ptr);
 return Success;
 }
 
diff --git a/hw/xfree86/common/xf86xv.h b/hw/xfree86/common/xf86xv.h
index de17eb1..8e7fe36 100644
--- a/hw/xfree86/common/xf86xv.h
+++ b/hw/xfree86/common/xf86xv.h
@@ -100,6 +100,8 @@ typedef int (*QueryImageAttributesFuncPtr) (ScrnInfoPtr 
pScrn, int image,
 typedef void (*ClipNotifyFuncPtr) (ScrnInfoPtr pScrn, void *data,
WindowPtr window, int dx, int dy);
 
+typedef void (*FreePortFuncPtr)(ScrnInfoPtr scrn, void *data);
+
 typedef enum {
 XV_OFF,
 XV_PENDING,
@@ -148,6 +150,7 @@ typedef struct {
 ReputImageFuncPtr ReputImage;   /* image/still */
 QueryImageAttributesFuncPtr QueryImageAttributes;
 ClipNotifyFuncPtr ClipNotify;
+FreePortFuncPtr FreePort;
 } XF86VideoAdaptorRec, *XF86VideoAdaptorPtr;
 
 typedef struct {
diff --git a/hw/xfree86/common/xf86xvpriv.h b/hw/xfree86/common/xf86xvpriv.h
index e95f959..8997268 100644
--- a/hw/xfree86/common/xf86xvpriv.h
+++ b/hw/xfree86/common/xf86xvpriv.h
@@ -61,6 +61,7 @@ typedef struct {
 ReputImageFuncPtr ReputImage;
 QueryImageAttributesFuncPtr QueryImageAttributes;
 ClipNotifyFuncPtr ClipNotify;
+FreePortFuncPtr FreePort;
 } XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr;
 
 typedef struct {
-- 
2.0.1

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


[PATCH 2/4] ephyr: Free glamor xv data at server reset time

2014-08-06 Thread Keith Packard
Add a FreePort callback hook to kdrive and implement that in ephyr to
call glamor_xv_fini_port.

Signed-off-by: Keith Packard kei...@keithp.com
---
 hw/kdrive/ephyr/ephyr_glamor_xv.c | 8 
 hw/kdrive/src/kxv.c   | 5 +
 hw/kdrive/src/kxv.h   | 4 
 3 files changed, 17 insertions(+)

diff --git a/hw/kdrive/ephyr/ephyr_glamor_xv.c 
b/hw/kdrive/ephyr/ephyr_glamor_xv.c
index b9c3464..6d8144d 100644
--- a/hw/kdrive/ephyr/ephyr_glamor_xv.c
+++ b/hw/kdrive/ephyr/ephyr_glamor_xv.c
@@ -105,6 +105,13 @@ ephyr_glamor_xv_put_image(KdScreenInfo *screen,
id, buf, width, height, sync, clipBoxes);
 }
 
+static void
+ephyr_glamor_xv_free_port(KdScreenInfo *screen,
+  void *data)
+{
+glamor_xv_fini_port(data);
+}
+
 void
 ephyr_glamor_xv_init(ScreenPtr screen)
 {
@@ -156,6 +163,7 @@ ephyr_glamor_xv_init(ScreenPtr screen)
 adaptor-QueryBestSize = ephyr_glamor_xv_query_best_size;
 adaptor-PutImage = ephyr_glamor_xv_put_image;
 adaptor-QueryImageAttributes = ephyr_glamor_xv_query_image_attributes;
+adaptor-FreePort = ephyr_glamor_xv_free_port;
 
 KdXVScreenInit(screen, adaptor, 1);
 }
diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c
index 60a8345..8f1889e 100644
--- a/hw/kdrive/src/kxv.c
+++ b/hw/kdrive/src/kxv.c
@@ -414,6 +414,7 @@ KdXVInitAdaptors(ScreenPtr pScreen, KdVideoAdaptorPtr 
infoPtr, int number)
 adaptorPriv-QueryImageAttributes = adaptorPtr-QueryImageAttributes;
 adaptorPriv-PutImage = adaptorPtr-PutImage;
 adaptorPriv-ReputImage = adaptorPtr-ReputImage;
+adaptorPriv-FreePort = adaptorPtr-FreePort;
 
 pa-devPriv.ptr = (void *) adaptorPriv;
 
@@ -1148,6 +1149,10 @@ KdXVAllocatePort(unsigned long port, XvPortPtr pPort, 
XvPortPtr * ppPort)
 static int
 KdXVFreePort(XvPortPtr pPort)
 {
+XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort-devPriv.ptr);
+
+if (portPriv-AdaptorRec-FreePort != NULL)
+(*portPriv-AdaptorRec-FreePort)(portPriv-screen, 
portPriv-DevPriv.ptr);
 return Success;
 }
 
diff --git a/hw/kdrive/src/kxv.h b/hw/kdrive/src/kxv.h
index 3a49a65..70dc51b 100644
--- a/hw/kdrive/src/kxv.h
+++ b/hw/kdrive/src/kxv.h
@@ -109,6 +109,8 @@ typedef int (*QueryImageAttributesFuncPtr) (KdScreenInfo * 
screen, int image,
 unsigned short *height,
 int *pitches, int *offsets);
 
+typedef void (*FreePortFuncPtr)(KdScreenInfo *screen, void *data);
+
 typedef enum {
 XV_OFF,
 XV_PENDING,
@@ -154,6 +156,7 @@ typedef struct {
 PutImageFuncPtr PutImage;
 ReputImageFuncPtr ReputImage;
 QueryImageAttributesFuncPtr QueryImageAttributes;
+FreePortFuncPtr FreePort;
 } KdVideoAdaptorRec, *KdVideoAdaptorPtr;
 
 Bool
@@ -205,6 +208,7 @@ typedef struct {
 PutImageFuncPtr PutImage;
 ReputImageFuncPtr ReputImage;
 QueryImageAttributesFuncPtr QueryImageAttributes;
+FreePortFuncPtr FreePort;
 } XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr;
 
 typedef struct {
-- 
2.0.1

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


[PATCH 0/4] Clean up glamor XV data at server reset time

2014-08-06 Thread Keith Packard
I don't think the per-port Xv data which glamor allocates is getting
freed at server reset time, so I put together a short patch sequence
which does it. Seems to work for me at least.

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


[PATCH 4/4] xfree86/glamor: use glamor hooks to init/cleanup ports

2014-08-06 Thread Keith Packard
Uses glamor_xv_init_port instead of open-coding that function at
server init time.

Uses the new ddFreePort hook to ensure that glamor resources are
freed at server reset time.

Signed-off-by: Keith Packard kei...@keithp.com
---
 hw/xfree86/glamor_egl/glamor_xf86_xv.c | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/hw/xfree86/glamor_egl/glamor_xf86_xv.c 
b/hw/xfree86/glamor_egl/glamor_xf86_xv.c
index 8535fa0..d3a3aab 100644
--- a/hw/xfree86/glamor_egl/glamor_xf86_xv.c
+++ b/hw/xfree86/glamor_egl/glamor_xf86_xv.c
@@ -114,6 +114,13 @@ glamor_xf86_xv_put_image(ScrnInfoPtr pScrn,
id, buf, width, height, sync, clipBoxes);
 }
 
+static void
+glamor_xf86_xv_free_port(ScrnInfoPtr scrn,
+ void *data)
+{
+glamor_xv_fini_port(data);
+}
+
 static XF86VideoEncodingRec DummyEncodingGLAMOR[1] = {
 {
  0,
@@ -166,20 +173,14 @@ glamor_xv_init(ScreenPtr screen, int num_texture_ports)
 adapt-PutImage = glamor_xf86_xv_put_image;
 adapt-ReputImage = NULL;
 adapt-QueryImageAttributes = glamor_xf86_xv_query_image_attributes;
+adapt-FreePort = glamor_xf86_xv_free_port;
 
 for (i = 0; i  num_texture_ports; i++) {
 glamor_port_private *pPriv = port_priv[i];
 
-pPriv-brightness = 0;
-pPriv-contrast = 0;
-pPriv-saturation = 0;
-pPriv-hue = 0;
-pPriv-gamma = 1000;
-pPriv-transform_index = 0;
-
-REGION_NULL(pScreen, pPriv-clip);
+glamor_xv_init_port(pPriv);
 
-adapt-pPortPrivates[i].ptr = (void *) (pPriv);
+adapt-pPortPrivates[i].ptr = pPriv;
 }
 return adapt;
 }
-- 
2.0.1

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


[PATCH 1/4] glamor: provide glamor_xv_fini_port to free data at reset

2014-08-06 Thread Keith Packard
Make sure the saved resources for xv rendering are freed at server
reset time by calling the existing stop_video function.

Signed-off-by: Keith Packard kei...@keithp.com
---
 glamor/glamor_priv.h | 1 +
 glamor/glamor_xv.c   | 6 ++
 2 files changed, 7 insertions(+)

diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index 042bad0..05d3eac 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -1024,6 +1024,7 @@ extern XvImageRec glamor_xv_images[];
 extern int glamor_xv_num_images;
 
 void glamor_xv_init_port(glamor_port_private *port_priv);
+void glamor_xv_fini_port(glamor_port_private *port_priv);
 void glamor_xv_stop_video(glamor_port_private *port_priv);
 int glamor_xv_set_port_attribute(glamor_port_private *port_priv,
  Atom attribute, INT32 value);
diff --git a/glamor/glamor_xv.c b/glamor/glamor_xv.c
index 3f3e064..367b89f 100644
--- a/glamor/glamor_xv.c
+++ b/glamor/glamor_xv.c
@@ -146,6 +146,12 @@ glamor_xv_stop_video(glamor_port_private *port_priv)
 }
 }
 
+void
+glamor_xv_fini_port(glamor_port_private *port_priv)
+{
+glamor_xv_stop_video(port_priv);
+}
+
 int
 glamor_xv_set_port_attribute(glamor_port_private *port_priv,
  Atom attribute, INT32 value)
-- 
2.0.1

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


[PATCH 5/6] xfree86: Expose present API to drivers via sdksyms

2014-08-06 Thread Keith Packard
This exposes the public portions of the present API to drivers.

Signed-off-by: Keith Packard kei...@keithp.com
---
 hw/xfree86/sdksyms.sh | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
index d9a4478..1a02dbf 100755
--- a/hw/xfree86/sdksyms.sh
+++ b/hw/xfree86/sdksyms.sh
@@ -48,6 +48,12 @@ cat  sdksyms.c  EOF
 #include misyncshm.h
 #endif
 
+/* present */
+#ifdef PRESENT
+#include present.h
+#include present_vblank.h
+#endif
+
 /* Xext/Makefile.am -- half is module, half is builtin */
 #ifdef XV
 #include xvdix.h
-- 
2.0.1

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


[PATCH 4/6] present: Create an internal server API to perform operations at vblank time

2014-08-06 Thread Keith Packard
present_vblank_window_queue asks for a callback function to be invoked
when a specific (absolute or relative) frame starts. This allows for
vblank-synchronized rendering operations without needing
driver-specific hooks.

Signed-off-by: Keith Packard kei...@keithp.com
---
 present/Makefile.am  |   5 +-
 present/present.c|  14 ++--
 present/present_priv.h   |  27 +++
 present/present_screen.c |   2 +
 present/present_vblank.c | 192 +++
 present/present_vblank.h |  68 +
 6 files changed, 300 insertions(+), 8 deletions(-)
 create mode 100644 present/present_vblank.c
 create mode 100644 present/present_vblank.h

diff --git a/present/Makefile.am b/present/Makefile.am
index 7fea669..64c8be4 100644
--- a/present/Makefile.am
+++ b/present/Makefile.am
@@ -12,6 +12,7 @@ libpresent_la_SOURCES = \
present_notify.c \
present_priv.h \
present_request.c \
-   present_screen.c
+   present_screen.c \
+   present_vblank.c
 
-sdk_HEADERS = present.h presentext.h
+sdk_HEADERS = present.h presentext.h present_vblank.h
diff --git a/present/present.c b/present/present.c
index af98ef7..744cb99 100644
--- a/present/present.c
+++ b/present/present.c
@@ -32,7 +32,7 @@
 #include time.h
 #endif
 
-static uint64_t present_event_id;
+uint64_tpresent_event_id;
 static struct xorg_list present_exec_queue;
 static struct xorg_list present_flip_queue;
 
@@ -85,7 +85,7 @@ present_flip_pending_pixmap(ScreenPtr screen)
 
 if (!screen_priv-flip_pending)
 return NULL;
-
+
 return screen_priv-flip_pending-pixmap;
 }
 
@@ -235,7 +235,7 @@ present_query_capabilities(RRCrtcPtr crtc)
 return screen_priv-info-capabilities;
 }
 
-static int
+int
 present_get_ust_msc(ScreenPtr screen, RRCrtcPtr crtc, uint64_t *ust, uint64_t 
*msc)
 {
 present_screen_priv_ptr screen_priv = present_screen_priv(screen);
@@ -261,7 +261,7 @@ present_flush(WindowPtr window)
 (*screen_priv-info-flush) (window);
 }
 
-static int
+int
 present_queue_vblank(ScreenPtr screen,
  RRCrtcPtr crtc,
  uint64_t event_id,
@@ -279,7 +279,7 @@ present_queue_vblank(ScreenPtr screen,
 return ret;
 }
 
-static uint64_t
+uint64_t
 present_window_to_crtc_msc(WindowPtr window, RRCrtcPtr crtc, uint64_t 
window_msc, uint64_t new_msc)
 {
 present_window_priv_ptr window_priv = present_get_window_priv(window, 
TRUE);
@@ -368,7 +368,7 @@ present_set_tree_pixmap_visit(WindowPtr window, void *data)
 (*screen-SetWindowPixmap)(window, visit-new);
 return WT_WALKCHILDREN;
 }
-
+
 static void
 present_set_tree_pixmap(WindowPtr window, PixmapPtr pixmap)
 {
@@ -499,6 +499,8 @@ present_event_notify(uint64_t event_id, uint64_t ust, 
uint64_t msc)
 return;
 }
 }
+
+present_vblank_event_notify(event_id, ust, msc);
 }
 
 void
diff --git a/present/present_priv.h b/present/present_priv.h
index 1542726..a409e97 100644
--- a/present/present_priv.h
+++ b/present/present_priv.h
@@ -37,6 +37,8 @@
 
 extern int present_request;
 
+extern uint64_t present_event_id;
+
 extern DevPrivateKeyRec present_screen_private_key;
 
 typedef struct present_fence *present_fence_ptr;
@@ -158,6 +160,18 @@ extern RESTYPE present_event_type;
 /*
  * present.c
  */
+uint64_t
+present_window_to_crtc_msc(WindowPtr window, RRCrtcPtr crtc, uint64_t 
window_msc, uint64_t new_msc);
+
+int
+present_get_ust_msc(ScreenPtr screen, RRCrtcPtr crtc, uint64_t *ust, uint64_t 
*msc);
+
+int
+present_queue_vblank(ScreenPtr screen,
+ RRCrtcPtr crtc,
+ uint64_t event_id,
+ uint64_t msc);
+
 int
 present_pixmap(WindowPtr window,
PixmapPtr pixmap,
@@ -308,4 +322,17 @@ sproc_present_dispatch(ClientPtr client);
  * present_screen.c
  */
 
+/*
+ * present_vblank.c
+ */
+
+void
+present_vblank_event_notify(uint64_t event_id, uint64_t msc, uint64_t utc);
+
+void
+present_vblank_screen_init(ScreenPtr screen);
+
+void
+present_vblank_screen_close(ScreenPtr screen);
+
 #endif /*  _PRESENT_PRIV_H_ */
diff --git a/present/present_screen.c b/present/present_screen.c
index 2f91ac7..bfffae9 100644
--- a/present/present_screen.c
+++ b/present/present_screen.c
@@ -195,6 +195,8 @@ present_screen_init(ScreenPtr screen, 
present_screen_info_ptr info)
 present_fake_screen_init(screen);
 }
 
+present_vblank_screen_init(screen);
+
 return TRUE;
 }
 
diff --git a/present/present_vblank.c b/present/present_vblank.c
new file mode 100644
index 000..deebade
--- /dev/null
+++ b/present/present_vblank.c
@@ -0,0 +1,192 @@
+/*
+ * Copyright © 2014 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this 

[PATCH 2/6] present: Fix int types for DebugPresent arguments

2014-08-06 Thread Keith Packard
Cast values to standard int types and fix format strings to match.

Signed-off-by: Keith Packard kei...@keithp.com
---
 present/present.c | 47 +++
 1 file changed, 27 insertions(+), 20 deletions(-)

diff --git a/present/present.c b/present/present.c
index e8e..c67af62 100644
--- a/present/present.c
+++ b/present/present.c
@@ -151,7 +151,9 @@ present_check_flip(RRCrtcPtrcrtc,
 /* Ask the driver for permission */
 if (screen_priv-info-check_flip) {
 if (!(*screen_priv-info-check_flip) (crtc, window, pixmap, 
sync_flip)) {
-DebugPresent((\td %08lx - %08lx\n, window-drawable.id, pixmap 
? pixmap-drawable.id : 0));
+DebugPresent((\td %08lx - %08lx\n,
+  (long) window-drawable.id,
+  pixmap ? (long) pixmap-drawable.id : 0l));
 return FALSE;
 }
 }
@@ -194,7 +196,7 @@ present_pixmap_idle(PixmapPtr pixmap, WindowPtr window, 
CARD32 serial, struct pr
 if (present_fence)
 present_fence_set_triggered(present_fence);
 if (window) {
-DebugPresent((\ti %08lx\n, pixmap ? pixmap-drawable.id : 0));
+DebugPresent((\ti %08lx\n, pixmap ? (long) pixmap-drawable.id : 
0l));
 present_send_idle_notify(window, serial, pixmap, present_fence);
 }
 }
@@ -421,7 +423,7 @@ present_unflip(ScreenPtr screen)
 NULL, 0, 0);
 }
 screen_priv-unflip_event_id = ++present_event_id;
-DebugPresent((u %lld\n, screen_priv-unflip_event_id));
+DebugPresent((u %lld\n, (long long) screen_priv-unflip_event_id));
 (*screen_priv-info-unflip) (screen, screen_priv-unflip_event_id);
 }
 
@@ -432,9 +434,9 @@ present_flip_notify(present_vblank_ptr vblank, uint64_t 
ust, uint64_t crtc_msc)
 present_screen_priv_ptr screen_priv = present_screen_priv(screen);
 
 DebugPresent((\tn %lld %p %8lld: %08lx - %08lx\n,
-  vblank-event_id, vblank, vblank-target_msc,
-  vblank-pixmap ? vblank-pixmap-drawable.id : 0,
-  vblank-window-drawable.id));
+  (long long) vblank-event_id, vblank, (long long) 
vblank-target_msc,
+  vblank-pixmap ? (long) vblank-pixmap-drawable.id : 0l,
+  (long) vblank-window-drawable.id));
 
 assert (vblank == screen_priv-flip_pending);
 
@@ -471,7 +473,7 @@ present_event_notify(uint64_t event_id, uint64_t ust, 
uint64_t msc)
 
 if (!event_id)
 return;
-DebugPresent((\te %lld ust %lld msc %lld\n, event_id, ust, msc));
+DebugPresent((\te %lld ust %lld msc %lld\n, (long long) event_id, (long 
long) ust, (long long) msc));
 xorg_list_for_each_entry_safe(vblank, tmp, present_exec_queue, 
event_queue) {
 if (vblank-event_id == event_id) {
 present_execute(vblank, ust, msc);
@@ -490,7 +492,7 @@ present_event_notify(uint64_t event_id, uint64_t ust, 
uint64_t msc)
 present_screen_priv_ptr screen_priv = present_screen_priv(screen);
 
 if (event_id == screen_priv-unflip_event_id) {
-DebugPresent((\tun %lld\n, event_id));
+DebugPresent((\tun %lld\n, (long long) event_id));
 screen_priv-unflip_event_id = 0;
 present_flip_idle(screen);
 present_flip_try_ready(screen);
@@ -587,8 +589,8 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, 
uint64_t crtc_msc)
 if (vblank-flip  vblank-pixmap  vblank-window) {
 if (screen_priv-flip_pending || screen_priv-unflip_event_id) {
 DebugPresent((\tr %lld %p (pending %p unflip %lld)\n,
-  vblank-event_id, vblank,
-  screen_priv-flip_pending, 
screen_priv-unflip_event_id));
+  (long long) vblank-event_id, vblank,
+  screen_priv-flip_pending, (long long) 
screen_priv-unflip_event_id));
 vblank-flip_ready = TRUE;
 return;
 }
@@ -603,8 +605,9 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, 
uint64_t crtc_msc)
 if (vblank-flip) {
 
 DebugPresent((\tf %lld %p %8lld: %08lx - %08lx\n,
-  vblank-event_id, vblank, crtc_msc,
-  vblank-pixmap-drawable.id, 
vblank-window-drawable.id));
+  (long long) vblank-event_id, vblank, (long long) 
crtc_msc,
+  (long) vblank-pixmap-drawable.id,
+  (long) vblank-window-drawable.id));
 
 /* Prepare to flip by placing it in the flip queue and
  * and sticking it into the flip_pending field
@@ -645,7 +648,11 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, 
uint64_t crtc_msc)
 screen_priv-flip_pending = NULL;
 vblank-flip = FALSE;
 }
-DebugPresent((\tc %p %8lld: %08lx - %08lx\n, vblank, crtc_msc, 
vblank-pixmap-drawable.id, 

[PATCH 1/6] present: Move DebugPresent macro to present_priv.h

2014-08-06 Thread Keith Packard
This lets us use the macro in other files

Signed-off-by: Keith Packard kei...@keithp.com
---
 present/present.c  | 6 --
 present/present_priv.h | 6 ++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/present/present.c b/present/present.c
index f488e21..e8e 100644
--- a/present/present.c
+++ b/present/present.c
@@ -36,12 +36,6 @@ static uint64_t present_event_id;
 static struct xorg_list present_exec_queue;
 static struct xorg_list present_flip_queue;
 
-#if 0
-#define DebugPresent(x) ErrorF x
-#else
-#define DebugPresent(x)
-#endif
-
 static void
 present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc);
 
diff --git a/present/present_priv.h b/present/present_priv.h
index f5c1652..1542726 100644
--- a/present/present_priv.h
+++ b/present/present_priv.h
@@ -97,6 +97,12 @@ typedef struct present_screen_priv {
 present_screen_info_ptr info;
 } present_screen_priv_rec, *present_screen_priv_ptr;
 
+#if 0
+#define DebugPresent(x) ErrorF x
+#else
+#define DebugPresent(x)
+#endif
+
 #define wrap(priv,real,mem,func) {\
 priv-mem = real-mem; \
 real-mem = func; \
-- 
2.0.1

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


[PATCH 3/6] present: Provide stub for present_event_abandon

2014-08-06 Thread Keith Packard
This resolves a missing symbol so we can expose the present API to
drivers in sdksyms.c. Implementing this function correctly is left for
a future patch though.

Signed-off-by: Keith Packard kei...@keithp.com
---
 present/present.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/present/present.c b/present/present.c
index c67af62..af98ef7 100644
--- a/present/present.c
+++ b/present/present.c
@@ -501,6 +501,12 @@ present_event_notify(uint64_t event_id, uint64_t ust, 
uint64_t msc)
 }
 }
 
+void
+present_event_abandon(RRCrtcPtr crtc)
+{
+/* XXX what to do here? */
+}
+
 /*
  * 'window' is being reconfigured. Check to see if it is involved
  * in flipping and clean up as necessary
-- 
2.0.1

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


[PATCH 0/6] glamor: synchronize Xv display to vblank

2014-08-06 Thread Keith Packard
This series creates a new API within the Present code that provides
vblank-synchronized callbacks using the Present driver
interfaces and then uses that new interface to delay Xv put image
until vblank occurrs.

This synchronization is only done when painting directly to the
screen, so a composited environment won't see additional delay, but
when the window goes full-screen and the compositing manager
un-redirects it, you'll continue to get synchronized video output.

There are a couple of DebugPresent cleanups:

 [PATCH 1/6] present: Move DebugPresent macro to present_priv.h
 [PATCH 2/6] present: Fix int types for DebugPresent arguments

And two patches to expose the Present API to drivers:

 [PATCH 3/6] present: Provide stub for present_event_abandon
 [PATCH 4/6] present: Create an internal server API to perform

One patch that implements the new Present vblank API:

 [PATCH 5/6] xfree86: Expose present API to drivers via sdksyms

And one little patch that uses the new API in glamor's Xv code:

 [PATCH 6/6] glamor: Use Present to delay Xv painting to vblank

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


[PATCH 6/6] glamor: Use Present to delay Xv painting to vblank interval

2014-08-06 Thread Keith Packard
For un-redirected windows, this uses present_vblank_window_queue to
start painting the screen during vblank and reduce tearing on the
screen

Signed-off-by: Keith Packard kei...@keithp.com
---
 glamor/glamor_priv.h |  2 ++
 glamor/glamor_xv.c   | 63 
 2 files changed, 61 insertions(+), 4 deletions(-)

diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index 05d3eac..a0b790c 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -1016,6 +1016,8 @@ typedef struct {
 RegionRec clip;
 PixmapPtr src_pix[3];   /* y, u, v for planar */
 int src_pix_w, src_pix_h;
+uint64_t present_id;
+unsigned long serialNumber;
 } glamor_port_private;
 
 extern XvAttributeRec glamor_xv_attributes[];
diff --git a/glamor/glamor_xv.c b/glamor/glamor_xv.c
index 367b89f..a71ac10 100644
--- a/glamor/glamor_xv.c
+++ b/glamor/glamor_xv.c
@@ -37,6 +37,7 @@
 #endif
 
 #include glamor_priv.h
+#include present_vblank.h
 
 #include X11/extensions/Xv.h
 #include ../hw/xfree86/common/fourcc.h
@@ -138,6 +139,11 @@ glamor_xv_stop_video(glamor_port_private *port_priv)
 {
 int i;
 
+if (port_priv-present_id) {
+present_vblank_cancel(port_priv-pDraw-pScreen, 
port_priv-present_id);
+port_priv-present_id = 0;
+}
+
 for (i = 0; i  3; i++) {
 if (port_priv-src_pix[i]) {
 glamor_destroy_pixmap(port_priv-src_pix[i]);
@@ -260,9 +266,6 @@ glamor_xv_render(glamor_port_private *port_priv)
 int ref = port_priv-transform_index;
 GLint uloc, sampler_loc;
 
-if (!glamor_priv-xv_prog)
-glamor_init_xv_shader(screen);
-
 cont = RTFContrast(port_priv-contrast);
 bright = RTFBrightness(port_priv-brightness);
 gamma = (float) port_priv-gamma / 1000.0;
@@ -389,6 +392,29 @@ glamor_xv_render(glamor_port_private *port_priv)
 DamageDamageRegion(port_priv-pDraw, port_priv-clip);
 }
 
+static void
+glamor_xv_present(WindowPtr window,
+  void  *closure,
+  uint64_t  ust,
+  uint64_t  msc)
+{
+glamor_port_private *port_priv = closure;
+
+port_priv-present_id = 0;
+if (port_priv-serialNumber == window-drawable.serialNumber) {
+glamor_xv_render(port_priv);
+glFlush();
+}
+}
+
+static Bool
+glamor_window_is_redirected(WindowPtr window)
+{
+ScreenPtr   screen = window-drawable.pScreen;
+
+return screen-GetWindowPixmap (window) != screen-GetScreenPixmap(screen);
+}
+
 int
 glamor_xv_put_image(glamor_port_private *port_priv,
 DrawablePtr pDrawable,
@@ -404,6 +430,7 @@ glamor_xv_put_image(glamor_port_private *port_priv,
 RegionPtr clipBoxes)
 {
 ScreenPtr pScreen = pDrawable-pScreen;
+glamor_screen_private *glamor_priv = glamor_get_screen_private(pScreen);
 int srcPitch, srcPitch2;
 int top, nlines;
 int s2offset, s3offset, tmp;
@@ -413,6 +440,11 @@ glamor_xv_put_image(glamor_port_private *port_priv,
 srcPitch = width;
 srcPitch2 = width  1;
 
+glamor_make_current(glamor_priv);
+
+if (!glamor_priv-xv_prog)
+glamor_init_xv_shader(pScreen);
+
 if (!port_priv-src_pix[0] ||
 (width != port_priv-src_pix_w || height != port_priv-src_pix_h)) {
 int i;
@@ -489,7 +521,30 @@ glamor_xv_put_image(glamor_port_private *port_priv,
 port_priv-w = width;
 port_priv-h = height;
 port_priv-pDraw = pDrawable;
-glamor_xv_render(port_priv);
+
+if (port_priv-present_id) {
+present_vblank_cancel(pScreen, port_priv-present_id);
+port_priv-present_id = 0;
+}
+
+if (pDrawable-type == DRAWABLE_WINDOW 
+!glamor_window_is_redirected((WindowPtr) pDrawable))
+{
+port_priv-serialNumber = pDrawable-serialNumber;
+port_priv-present_id = present_vblank_window_queue((WindowPtr) 
pDrawable,
+
present_whence_relative,
+1,
+0,
+glamor_xv_present,
+port_priv);
+}
+
+if (!port_priv-present_id)
+glamor_xv_render(port_priv);
+
+if (port_priv-present_id == PRESENT_VBLANK_QUEUE_EXECUTED)
+port_priv-present_id = 0;
+
 return Success;
 }
 
-- 
2.0.1

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


Re: [PATCH] xkbcomp: Improved -w option parsing

2014-08-06 Thread Peter Hutterer
On Mon, Aug 04, 2014 at 03:27:49PM +0200, Vincent Lefevre wrote:
 This patch improves -w option parsing even further, for cases like
 xkbcomp -w6 4.xkb out.xkb (which were not handled by the fix of
 #66344). Moreover, though this form can be regarded as ambiguous,
 the warning level is still optional (set to 0 if not present), and
 errors like xkbcomp -wfoo in out are detected and reported.
 
 Signed-off-by: Vincent Lefevre vinc...@vinc17.net
 ---
  xkbcomp.c | 29 +++--
  1 file changed, 23 insertions(+), 6 deletions(-)
 
 diff --git a/xkbcomp.c b/xkbcomp.c
 index 956e79c..1bb8ab2 100644
 --- a/xkbcomp.c
 +++ b/xkbcomp.c
 @@ -576,17 +576,33 @@ parseArgs(int argc, char *argv[])
  }
  else if (strncmp(argv[i], -w, 2) == 0)
  {
 -if ((i = (argc - 1)) || (!isdigit(argv[i + 1][0])))
 +unsigned long utmp;
 +char *tmp2;
 +/* If text is just after -w in the same word, then it must
 + * be a number and it is the warning level. Otherwise, if the
 + * next argument is a number, then it is the warning level,
 + * else the warning level is assumed to be 0.
 + */
 +if (argv[i][2] == '\0')
  {
  warningLevel = 0;
 -if (isdigit(argv[i][2]))
 -if (sscanf(argv[i][2], %i, itmp) == 1)
 -warningLevel = itmp;
 +if (i  argc - 1)
 +{
 +utmp = strtoul(argv[i+1], tmp2, 10);
 +if (argv[i+1][0] != '\0'  *tmp2 == '\0')
 +{
 +warningLevel = utmp  10 ? 10 : utmp;
 +i++;
 +}
 +}
  }
  else
  {
 -if (sscanf(argv[++i], %i, itmp) == 1)
 -warningLevel = itmp;
 +utmp = strtoul(argv[i][2], tmp2, 10);
 +if (*tmp2 == '\0')
 +warningLevel = utmp  10 ? 10 : utmp;
 +else
 +goto unknown_flag;

whoah, this is pretty much a perfect example of how not to use goto...
adding three lines for error and exist isn't that hard, jumping from one
random spot into another random spot is not ok.

rest looks good though, thanks.

Cheers,
   Peter

  }
  }
  else if ((strcmp(argv[i], -xkb) == 0)  (!xkblist))
 @@ -619,6 +635,7 @@ parseArgs(int argc, char *argv[])
  }
  else
  {
 +  unknown_flag:
  ERROR1(Unknown flag \%s\ on command line\n, argv[i]);
  Usage(argc, argv);
  return False;
 -- 
 2.0.1
 ___
 xorg-devel@lists.x.org: X.Org development
 Archives: http://lists.x.org/archives/xorg-devel
 Info: http://lists.x.org/mailman/listinfo/xorg-devel
 
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Bug#756848: xserver-xorg-video-radeon: Random segfaults with glamor enabled on Southern Islands card

2014-08-06 Thread Michel Dänzer
On 06.08.2014 11:55, Jeff Bradberry wrote:
 On Tue, Aug 5, 2014 at 10:26 PM, Michel Dänzer mic...@daenzer.net wrote:

 Does setting the environment variable EGL_DRIVER=egl_dri2 work around
 this problem?
 
 It has no effect on the behavior.  The Xorg.0.log is the same, and the
 debug output looks like (with non-EGL lines redacted):
 
 libEGL debug: Native platform type: drm (autodetected)
 libEGL debug: ignore EGL_DRIVERS_PATH for setuid/setgid binaries
 libEGL debug: EGL search path is /usr/lib/x86_64-linux-gnu/egl
 libEGL debug: added egl_dri2 to module array
 libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in eglInitialize

Hmm, my best guess is that dri2_initialize_drm() fails, but I'm not sure
why...

Did installing the *-dbg packages cause any other packages to be removed
/ upgraded / installed?


-- 
Earthling Michel Dänzer|  http://www.amd.com
Libre software enthusiast  |Mesa and X developer

___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[Bug 76213] xfce4 panel is not rendered properly on radeon southern islands

2014-08-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=76213

--- Comment #11 from Michel Dänzer mic...@daenzer.net ---
(In reply to comment #10)
 What's the point of knowing that since it's still not rendered
 properly in 1.16 ?

I thought it might be fixed by
http://cgit.freedesktop.org/xorg/xserver/commit/?h=server-1.16-branchid=4e9aabb6fc15d8052934f20c6a07801c197ec36a
, which entered xserver 1.15.99.903 but was reverted for the 1.16.0 release
because it caused a regression.

However, looking at your screenshots more closely again, I suppose your problem
is the wrong bevel lines at the bottom of the panel, which I'm still seeing
with glamor from current xserver Git.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[Bug 76213] xfce4 panel is not rendered properly on radeon southern islands

2014-08-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=76213

--- Comment #13 from sda s...@hertz.st ---
Created attachment 104135
  -- https://bugs.freedesktop.org/attachment.cgi?id=104135action=edit
attachment-25971-1.dat

--- Comment #14 from sda s...@hertz.st ---
Created attachment 104136
  -- https://bugs.freedesktop.org/attachment.cgi?id=104136action=edit
Textpart.txt

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[Bug 76213] xfce4 panel is not rendered properly on radeon southern islands

2014-08-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=76213

--- Comment #12 from sda s...@hertz.st ---
Sehr geehrte Damen und Herren,

ich befinde mich vom 06.08. bis einschließlich 01.09.2014 im Urlaub. 
In dieser Zeit lese ich keine Mails. 

Melde mich nach meinem Urlaub bei Ihnen.

Die Mails werden nicht weitergeleitet.





Mit freundlichen Grüßen

Sancho Dauskardt 










HERTZ Systemtechnik GmbH

Herr Sancho Dauskardt
Reinersweg 68
27751 Delmenhorst
Germany

Telefon: +49 4221 97230-50
Fax Zentrale: +49 4221 97230-19
Fax Einkauf: +49 4221 97230-39

E-Mail: sancho.dauska...@hertz.st

Geschäftsführer: Dipl. Ing. Gerhard Richter
Firmensitz: Delmenhorst
Registergericht: AG Oldenburg, HRB 140351
Umsatzsteuer-Identifikationsnummer gem. § 27a UStG: DE 152357780

www.hertz.st 
https://bugs.freedesktop.org/show_bug.cgi?id=76213

--- Comment #11 from Michel Dänzer mic...@daenzer.net ---
(In reply to comment #10)
 What's the point of knowing that since it's still not rendered
 properly in 1.16 ?

I thought it might be fixed by
http://cgit.freedesktop.org/xorg/xserver/commit/?h=server-1.16-branchid=4e9aabb6fc15d8052934f20c6a07801c197ec36a
, which entered xserver 1.15.99.903 but was reverted for the 1.16.0 release
because it caused a regression.

However, looking at your screenshots more closely again, I suppose your problem
is the wrong bevel lines at the bottom of the panel, which I'm still seeing
with glamor from current xserver Git.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[Bug 76837] sound glitches with radeon.dpm

2014-08-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=76837

--- Comment #9 from francesco markuruja...@gmail.com ---
the problem still present on kernel 3.16, I need to disable radeon dpm
(radeon.dpm=0).

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


Re: [PATCH r128] Improve handling of monitor and output types

2014-08-06 Thread Alex Deucher
On Mon, Aug 4, 2014 at 6:32 PM, Connor Behan connor.be...@gmail.com wrote:
 Checking for OUTPUT_DVI is not the same as checking for MT_DFP. There
 might be r128 cards with a DVI-I connector. These have the capability of
 driving an MT_CRT so we now check the monitor type before programming
 DAC or TMDS registers.

 This patch also removes R128ConnectorType and R128BIOSConnector because
 they were not doing much. These data structures are more useful for the
 radeon driver where there is a much wider range of cards.

 Signed-off-by: Connor Behan connor.be...@gmail.com

Reviewed-by: Alex Deucher alexander.deuc...@amd.com

 ---
  src/r128.h|   1 -
  src/r128_driver.c |   2 +-
  src/r128_output.c | 160 
 --
  src/r128_probe.h  |  16 --
  4 files changed, 60 insertions(+), 119 deletions(-)

 diff --git a/src/r128.h b/src/r128.h
 index 6df1b51..d8748b7 100644
 --- a/src/r128.h
 +++ b/src/r128.h
 @@ -504,7 +504,6 @@ typedef struct {
  Bool  DDC;

  Bool  VGAAccess;
 -R128BIOSConnector BiosConnector[R128_MAX_BIOS_CONNECTOR];

  /** Added for dualhead support ***/
  BOOL  IsSecondary;  /* second Screen */
 diff --git a/src/r128_driver.c b/src/r128_driver.c
 index c541bfa..ce38b4e 100644
 --- a/src/r128_driver.c
 +++ b/src/r128_driver.c
 @@ -3225,7 +3225,7 @@ void R128InitRMXRegisters(R128SavePtr orig, R128SavePtr 
 save,
  save-fp_h_sync_strt_wid   = save-crtc_h_sync_strt_wid;
  save-fp_v_sync_strt_wid   = save-crtc_v_sync_strt_wid;

 -if (r128_output-type != OUTPUT_DVI  r128_output-type != OUTPUT_LVDS)
 +if (r128_output-MonType != MT_DFP  r128_output-MonType != MT_LCD)
  return;

  if (r128_output-PanelXRes == 0 || r128_output-PanelYRes == 0) {
 diff --git a/src/r128_output.c b/src/r128_output.c
 index 7bb2e2a..757ef9b 100644
 --- a/src/r128_output.c
 +++ b/src/r128_output.c
 @@ -90,21 +90,21 @@ static void r128_mode_set(xf86OutputPtr output, 
 DisplayModePtr mode, DisplayMode
  if (r128_crtc-crtc_id == 0)
  R128InitRMXRegisters(info-SavedReg, info-ModeReg, output, 
 adjusted_mode);

 -if (r128_output-type == OUTPUT_DVI)
 +if (r128_output-MonType == MT_DFP)
  R128InitFPRegisters(info-SavedReg, info-ModeReg, output);
 -else if (r128_output-type == OUTPUT_LVDS)
 +else if (r128_output-MonType == MT_LCD)
  R128InitLVDSRegisters(info-SavedReg, info-ModeReg, output);
 -else if (r128_output-type == OUTPUT_VGA)
 +else if (r128_output-MonType == MT_CRT)
  R128InitDACRegisters(info-SavedReg, info-ModeReg, output);

  if (r128_crtc-crtc_id == 0)
  R128RestoreRMXRegisters(pScrn, info-ModeReg);

 -if (r128_output-type == OUTPUT_DVI)
 +if (r128_output-MonType == MT_DFP)
  R128RestoreFPRegisters(pScrn, info-ModeReg);
 -else if (r128_output-type == OUTPUT_LVDS)
 +else if (r128_output-MonType == MT_LCD)
  R128RestoreLVDSRegisters(pScrn, info-ModeReg);
 -else if (r128_output-type == OUTPUT_VGA)
 +else if (r128_output-MonType == MT_CRT)
  R128RestoreDACRegisters(pScrn, info-ModeReg);
  }

 @@ -375,133 +375,91 @@ static Bool R128I2CInit(xf86OutputPtr output, 
 I2CBusPtr *bus_ptr, char *name)
  return TRUE;
  }

 -void R128SetOutputType(ScrnInfoPtr pScrn, R128OutputPrivatePtr r128_output)
 -{
 -R128OutputType output = OUTPUT_NONE;
 -
 -switch (r128_output-ConnectorType) {
 -case CONNECTOR_VGA:
 -output = OUTPUT_VGA;
 -break;
 -case CONNECTOR_LVDS:
 -output = OUTPUT_LVDS;
 -break;
 -case CONNECTOR_DVI_D:
 -case CONNECTOR_DVI_I:
 -case CONNECTOR_DVI_A:
 -output = OUTPUT_DVI;
 -break;
 -default:
 -output = OUTPUT_NONE;
 -}
 -
 -r128_output-type = output;
 -}
 -
 -void R128SetupGenericConnectors(ScrnInfoPtr pScrn)
 +void R128SetupGenericConnectors(ScrnInfoPtr pScrn, R128OutputType *otypes)
  {
  R128InfoPtr info= R128PTR(pScrn);
  R128EntPtr pR128Ent = R128EntPriv(pScrn);

  if (!pR128Ent-HasCRTC2  !info-isDFP) {
 -info-BiosConnector[0].ConnectorType = CONNECTOR_VGA;
 -info-BiosConnector[0].valid = TRUE;
 +otypes[0] = OUTPUT_VGA;
  return;
  } else if (!pR128Ent-HasCRTC2) {
 -info-BiosConnector[0].ConnectorType = CONNECTOR_DVI_D;
 -   info-BiosConnector[0].valid = TRUE;
 +otypes[0] = OUTPUT_DVI;
 return;
  }

 -info-BiosConnector[0].ConnectorType = CONNECTOR_LVDS;
 -info-BiosConnector[0].valid = TRUE;
 -
 -info-BiosConnector[1].ConnectorType = CONNECTOR_VGA;
 -info-BiosConnector[1].valid = TRUE;
 +otypes[0] = OUTPUT_LVDS;
 +otypes[1] = OUTPUT_VGA;
  }

  Bool R128SetupConnectors(ScrnInfoPtr pScrn)
  {
  R128InfoPtr info= R128PTR(pScrn);
  R128EntPtr pR128Ent = R128EntPriv(pScrn);
 -xf86OutputPtr output;
 +
 +R128OutputType 

[Bug 76921] Rotation crashes ATI + nVidia dual card setup

2014-08-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=76921

Dries Kimpe dr...@kimpe.be changed:

   What|Removed |Added

 CC||dr...@kimpe.be

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[Bug 76921] Rotation crashes ATI + nVidia dual card setup

2014-08-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=76921

--- Comment #1 from Dries Kimpe dr...@kimpe.be ---
I can confirm this, still exists with the current (8/3/14) git versions of the
radeon driver and xorg-server.

This only happens on the slave card.

My configuration is 2x Radeon 5450; Rotation works fine on the master (the card
that renders the image) and crashes the X-server with the same backtrace the
moment I enable rotation on the slave (radeon) outputs.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[Bug 76921] Rotation crashes ATI + nVidia dual card setup

2014-08-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=76921

--- Comment #2 from Dries Kimpe dr...@kimpe.be ---
Can you try making the radeon master and the nvidia card slave, to see if this
also happens? This might indicate if the problem is in xorg or in the radeon
driver.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[Bug 76213] xfce4 panel is not rendered properly on radeon southern islands

2014-08-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=76213

--- Comment #15 from Keith Packard kei...@keithp.com ---
A patch to disable shader-based trapezoids in glamor has been posted to the
xorg-devel list which fixes this for me.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


Re: [PATCH r128] Improve handling of monitor and output types

2014-08-06 Thread Connor Behan
On 06/08/14 09:21 AM, Alex Deucher wrote:
 On Mon, Aug 4, 2014 at 6:32 PM, Connor Behan connor.be...@gmail.com
 wrote:
 Checking for OUTPUT_DVI is not the same as checking for MT_DFP. There
 might be r128 cards with a DVI-I connector. These have the capability of
 driving an MT_CRT so we now check the monitor type before programming
 DAC or TMDS registers.

 This patch also removes R128ConnectorType and R128BIOSConnector because
 they were not doing much. These data structures are more useful for the
 radeon driver where there is a much wider range of cards.

 Signed-off-by: Connor Behan connor.be...@gmail.com
 Reviewed-by: Alex Deucher alexander.deuc...@amd.com
I just pushed this along with:

0004-Remove-custom-dualhead-code.patch
0005-Remove-custom-DGA-code.patch

FYI, there are slight differences to 0004 compared with what you
reviewed. Since the patch removes an option, I removed mention of it
from the man page as well. Besides that, I fixed a whitespace error and
added one sentence to the commit summary.

Thanks!



signature.asc
Description: OpenPGP digital signature
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati