Re: [PATCH RESEND] xfree86: fix No devices detected error for non-seat0 seats (#66851)

2014-02-26 Thread Laércio de Sousa
It's also importante to note that this patch is indispensable (there's no
workaround) to make X server work with non-seat0 seats when you have a
graphics card with non-KMS driver (while it tries to keep current behaviour
when you have a KMS-compliant one), thus I really appreciate any review for
it.

CANTATE DOMINO CANTICUM NOVUM
QUIA MIRABILIA FECIT

Laércio


2014-02-01 0:19 GMT-02:00 Laércio de Sousa lbsous...@gmail.com:

 Yes, they do, provided you tag another suitable device (e.g. a USB hub) as
 master-of-seat in udev.

 You'll also need to configure the card via custom xorg.conf. In case your
 display manager doesn't allow X server command line customization, you can
 use Oleg Samarin's patch to introduce new key MatchSeay in xorg.conf.
 Em 31/01/2014 20:11, Dave Airlie airl...@gmail.com escreveu:

 On Fri, Jan 31, 2014 at 9:19 PM, Laércio de Sousa lbsous...@gmail.com
 wrote:
  This fixes a bug that prevents X.Org from starting properly on,
  e.g., NVIDIA cards with proprietary drivers, when -seat option
  is passed with an argument different from seat0.

 Do nvidia cards with the binary driver work in other seats? I can't
 imagine they would since the drivers don't integrate with udev etc.

 Dave.

 
  Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=66851
 
  Signed-off-by: Laércio de Sousa lbsous...@gmail.com
  ---
   hw/xfree86/common/xf86Bus.c | 4 ++--
   1 file changed, 2 insertions(+), 2 deletions(-)
 
  diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
  index 329d0b3..23dfa37 100644
  --- a/hw/xfree86/common/xf86Bus.c
  +++ b/hw/xfree86/common/xf86Bus.c
  @@ -81,7 +81,7 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only)
   if (drv-platformProbe != NULL) {
   foundScreen = xf86platformProbeDev(drv);
   }
  -if (ServerIsNotSeat0())
  +if (ServerIsNotSeat0()  foundScreen)
   return foundScreen;
   #endif
 
  @@ -201,7 +201,7 @@ xf86BusProbe(void)
   {
   #ifdef XSERVER_PLATFORM_BUS
   xf86platformProbe();
  -if (ServerIsNotSeat0())
  +if (ServerIsNotSeat0()  xf86_num_platform_devices  0)
   return;
   #endif
   #ifdef XSERVER_LIBPCIACCESS
  --
  1.8.1.4
 
  ___
  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

Compiling xf86-video-xgi driver for ARM

2014-02-26 Thread Artemy Makarov
Hello, everyone!

I have a ARM PC, similar to hp t5325, based on Marvell CPU and XGI Volari
z11 video chip. I've compiled xf86-video-xgi driver for it, but it doesn't
work.
 Here's parts of Xorg.0.log:

X.Org X Server 1.12.4
Release Date: 2012-08-27
[10.805] X Protocol Version 11, Revision 0
[10.805] Build Operating System: Linux 3.2.0-4-mv78xx0 armv5tel Debian
[10.805] Current Operating System: Linux ak1100 3.3.8 #1 PREEMPT Thu
Feb 13 17:29:00 MSK 2014 armv5tel
...
[10.836] (II) Module ABI versions:
[10.836]X.Org ANSI C Emulation: 0.4
[10.836]X.Org Video Driver: 12.1
[10.836]X.Org XInput driver : 16.0
[10.836]X.Org Server Extension : 6.0
[10.850] (--) PCI:*(0:0:1:0) 18ca:0027:18ca:0027 rev 0, Mem @
0xe000/67108864, 0xe400/262144, I/O @ 0x1000/128
...
[10.931] (II) LoadModule: xgi
[10.932] (II) Loading /usr/lib/xorg/modules/drivers/xgi_drv.so
[10.935] (II) Module xgi: vendor=X.Org Foundation
[10.935]compiled for 1.12.4, module version = 6.1.6803
[10.936]Module class: X.Org Video Driver
[10.936]ABI class: X.Org Video Driver, version 12.1
[10.937] (II) XGI: driver for XGI chipsets: Volari V8_V5_V3XT, Volari
Z7_Z9_Z9s,
Volari Z9_Z9s, Volari Z11
[10.937] (++) using VT number 7
[10.997] (EE) No devices detected.

Looks like, driver can't see video chip.
I've successfully used this driver with previous debian version, and also
it detected video chip correctly, identifying it as XGI Technology Inc.
(eXtreme Graphics Innovation) Z11/Z11M, instead of writing just ID, as you
can see in line [10.850] in log above.

How can I fix this problem? I tried using older kernel version with this
xorg version, but it also didn't help.
___
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 v2] glamor: Rename the DRI-related pixmap functions.

2014-02-26 Thread Eric Anholt
There was confusion over whether they should have egl in the name, and
they had DRI3 in the name even though they're useful to have without
DRI3.

v2: Just rename glamor_name_from_pixmap for now -- I'd accidentally
conflict-resolved in adding new parameters from a later commit.

Signed-off-by: Eric Anholt e...@anholt.net
---
 glamor/glamor.c | 10 +-
 glamor/glamor.h | 53 +
 glamor/glamor_egl.c | 12 ++--
 3 files changed, 40 insertions(+), 35 deletions(-)

diff --git a/glamor/glamor.c b/glamor/glamor.c
index 85fd560..fa753bb 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -567,16 +567,16 @@ glamor_enable_dri3(ScreenPtr screen)
 }
 
 Bool
-glamor_is_dri3_support_enabled(ScreenPtr screen)
+glamor_supports_pixmap_import_export(ScreenPtr screen)
 {
 glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
 
 return glamor_priv-dri3_enabled;
 }
 
-int
-glamor_dri3_fd_from_pixmap(ScreenPtr screen,
-   PixmapPtr pixmap, CARD16 *stride, CARD32 *size)
+_X_EXPORT int
+glamor_fd_from_pixmap(ScreenPtr screen,
+  PixmapPtr pixmap, CARD16 *stride, CARD32 *size)
 {
 glamor_pixmap_private *pixmap_priv;
 glamor_screen_private *glamor_priv =
@@ -600,7 +600,7 @@ glamor_dri3_fd_from_pixmap(ScreenPtr screen,
 }
 
 int
-glamor_dri3_name_from_pixmap(PixmapPtr pixmap)
+glamor_name_from_pixmap(PixmapPtr pixmap)
 {
 glamor_pixmap_private *pixmap_priv;
 glamor_screen_private *glamor_priv =
diff --git a/glamor/glamor.h b/glamor/glamor.h
index 89e7d80..041004e 100644
--- a/glamor/glamor.h
+++ b/glamor/glamor.h
@@ -173,21 +173,23 @@ extern _X_EXPORT int 
glamor_egl_dri3_fd_name_from_tex(ScreenPtr, PixmapPtr,
   unsigned int, Bool,
   CARD16 *, CARD32 *);
 
-/* @glamor_is_dri3_support_enabled: Returns if DRI3 support is enabled.
+/* @glamor_supports_pixmap_import_export: Returns whether
+ * glamor_fd_from_pixmap(), glamor_name_from_pixmap(), and
+ * glamor_pixmap_from_fd() are supported.
  *
  * @screen: Current screen pointer.
  *
- * To have DRI3 support enabled, glamor and glamor_egl need to be initialized,
- * and glamor_egl_init_textured_pixmap need to be called. glamor also
- * has to be compiled with gbm support.
- * The EGL layer need to have the following extensions working:
+ * To have DRI3 support enabled, glamor and glamor_egl need to be
+ * initialized. glamor also has to be compiled with gbm support.
+ *
+ * The EGL layer needs to have the following extensions working:
+ *
  * .EGL_KHR_gl_texture_2D_image
  * .EGL_EXT_image_dma_buf_import
- * If DRI3 support is not enabled, the following helpers will return an error.
  * */
-extern _X_EXPORT Bool glamor_is_dri3_support_enabled(ScreenPtr screen);
+extern _X_EXPORT Bool glamor_supports_pixmap_import_export(ScreenPtr screen);
 
-/* @glamor_dri3_fd_from_pixmap: DRI3 helper to get a dma-buf fd from a pixmap.
+/* @glamor_fd_from_pixmap: Get a dma-buf fd from a pixmap.
  *
  * @screen: Current screen pointer.
  * @pixmap: The pixmap from which we want the fd.
@@ -198,22 +200,25 @@ extern _X_EXPORT Bool 
glamor_is_dri3_support_enabled(ScreenPtr screen);
  * content.
  * Returns the fd on success, -1 on error.
  * */
-extern _X_EXPORT int glamor_dri3_fd_from_pixmap(ScreenPtr screen,
-PixmapPtr pixmap,
-CARD16 *stride, CARD32 *size);
+extern _X_EXPORT int glamor_fd_from_pixmap(ScreenPtr screen,
+   PixmapPtr pixmap,
+   CARD16 *stride, CARD32 *size);
 
-/* @glamor_dri3_name_from_pixmap: helper to get an gem name from a pixmap.
+/**
+ * @glamor_name_from_pixmap: Gets a gem name from a pixmap.
  *
  * @pixmap: The pixmap from which we want the gem name.
  *
- * the pixmap and the buffer associated by the gem name will share the same
- * content. This function can be used by the DDX to support DRI2, but needs
- * glamor DRI3 support to be activated.
+ * the pixmap and the buffer associated by the gem name will share the
+ * same content. This function can be used by the DDX to support DRI2,
+ * and needs the same set of buffer export GL extensions as DRI3
+ * support.
+ *
  * Returns the name on success, -1 on error.
  * */
-extern _X_EXPORT int glamor_dri3_name_from_pixmap(PixmapPtr pixmap);
+extern _X_EXPORT int glamor_name_from_pixmap(PixmapPtr pixmap);
 
-/* @glamor_egl_dri3_pixmap_from_fd: DRI3 helper to get a pixmap from a dma-buf 
fd.
+/* @glamor_pixmap_from_fd: Creates a pixmap to wrap a dma-buf fd.
  *
  * @screen: Current screen pointer.
  * @fd: The dma-buf fd to import.
@@ -225,13 +230,13 @@ extern _X_EXPORT int 
glamor_dri3_name_from_pixmap(PixmapPtr pixmap);
  *
  * Returns a valid pixmap if the import succeeded, else NULL.
  * */

Re: Compiling xf86-video-xgi driver for ARM

2014-02-26 Thread Gaetan Nadon
On 14-02-26 07:48 AM, Artemy Makarov wrote:
 I have a ARM PC, similar to hp t5325, based on Marvell CPU and XGI
 Volari z11 video chip. I've compiled xf86-video-xgi driver for it, but
 it doesn't work. 

FYI, this driver was removed from the regular build in Dec 2011.

xorg.modules: Remove xf86-video-xgi

This hasn't been usable for multiple years and obviously nobody
cares about fixing it, so remove it from the default set, so the
tinderbox stops reporting it as a failure.

___
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

[PULL] OutputClass and autoloading of drivers for non-PCI devices

2014-02-26 Thread Aaron Plattner
Dear Keith,

The following changes since commit f34dc7fa96457ea6a0703493d74e63cca357712e:

  XQuartz: pointer - void * (2014-02-14 00:33:38 -0800)

are available in the git repository at:

  git://people.freedesktop.org/~aplattner/xserver tags/outputclass

for you to fetch changes up to 319d9c857e7a4c9d3653389e847e5c16fbfb3256:

  xfree86: Make error message more readable (2014-02-25 14:02:29 -0800)


Adds the OutputClass section to xorg.conf.  From the review thread,
Subject: [PATCH v2 0/5] Support autoloading of non-PCI drivers


Thierry Reding (5):
  xfree86: Make driver matching consistent
  xfree86: Store kernel driver name in platform device attribute
  xfree86: Introduce OutputClass configuration
  xfree86: Support driver loading via OutputClass
  xfree86: Make error message more readable

 hw/xfree86/common/xf86AutoConfig.c |   2 +-
 hw/xfree86/common/xf86pciBus.c |  24 --
 hw/xfree86/common/xf86pciBus.h |   5 +-
 hw/xfree86/common/xf86platformBus.c|  85 
--
 hw/xfree86/man/xorg.conf.man   |  77 
+++
 hw/xfree86/os-support/linux/lnx_platform.c |  17 ++-
 hw/xfree86/parser/Makefile.am  |   1 +
 hw/xfree86/parser/OutputClass.c| 167 
+++
 hw/xfree86/parser/configProcs.h|   5 ++
 hw/xfree86/parser/read.c   |   6 +++
 hw/xfree86/parser/write.c  |   2 +
 hw/xfree86/parser/xf86Parser.h |   9 
 include/hotplug.h  |   2 +
 13 files changed, 378 insertions(+), 24 deletions(-)
 create mode 100644 hw/xfree86/parser/OutputClass.c
___
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 RESEND] xfree86: fix No devices detected error for non-seat0 seats (#66851)

2014-02-26 Thread Dave Airlie
On Fri, Jan 31, 2014 at 9:19 PM, Laércio de Sousa lbsous...@gmail.com wrote:
 This fixes a bug that prevents X.Org from starting properly on,
 e.g., NVIDIA cards with proprietary drivers, when -seat option
 is passed with an argument different from seat0.

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

Reviewed-by: Dave Airlie airl...@redhat.com

though I'll be on the lookout for any fallout from this.

Dave.


 Signed-off-by: Laércio de Sousa lbsous...@gmail.com
 ---
  hw/xfree86/common/xf86Bus.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

 diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
 index 329d0b3..23dfa37 100644
 --- a/hw/xfree86/common/xf86Bus.c
 +++ b/hw/xfree86/common/xf86Bus.c
 @@ -81,7 +81,7 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only)
  if (drv-platformProbe != NULL) {
  foundScreen = xf86platformProbeDev(drv);
  }
 -if (ServerIsNotSeat0())
 +if (ServerIsNotSeat0()  foundScreen)
  return foundScreen;
  #endif

 @@ -201,7 +201,7 @@ xf86BusProbe(void)
  {
  #ifdef XSERVER_PLATFORM_BUS
  xf86platformProbe();
 -if (ServerIsNotSeat0())
 +if (ServerIsNotSeat0()  xf86_num_platform_devices  0)
  return;
  #endif
  #ifdef XSERVER_LIBPCIACCESS
 --
 1.8.1.4

 ___
 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


Re: [PATCH libXau] Constify XauGetBestAuthByAddr type_names argument

2014-02-26 Thread Alan Coopersmith

Sorry, but char ** and const char ** are not compatible in C, and
trying to make changes like this is pure, unmitigated pain requiring
changing all callers in lockstep.

-alan-

On 02/24/14 03:27 PM, Ran Benita wrote:

The type names are merely accessed, not changed. So make it const to
avoid warnings in other projects (like libxcb) which pass in a static
table of string literals.

Signed-off-by: Ran Benita ran...@gmail.com
---
  AuGetBest.c | 2 +-
  include/X11/Xauth.h | 2 +-
  man/Xau.man | 2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/AuGetBest.c b/AuGetBest.c
index 5556559..0d59f85 100644
--- a/AuGetBest.c
+++ b/AuGetBest.c
@@ -57,7 +57,7 @@ XauGetBestAuthByAddr (
  #endif
  _Xconst char* number,
  int   types_length,
-char** types,
+_Xconst char** types,
  _Xconst int*  type_lengths)
  {
  FILE*auth_file;
diff --git a/include/X11/Xauth.h b/include/X11/Xauth.h
index a707bed..e0c4f28 100644
--- a/include/X11/Xauth.h
+++ b/include/X11/Xauth.h
@@ -128,7 +128,7 @@ unsigned short  /* number_length */,
  #endif
  _Xconst char* /* number */,
  int   /* types_length */,
-char** /* type_names */,
+_Xconst char** /* type_names */,
  _Xconst int*  /* type_lengths */
  );

diff --git a/man/Xau.man b/man/Xau.man
index d1b6603..aa69b0d 100644
--- a/man/Xau.man
+++ b/man/Xau.man
@@ -59,7 +59,7 @@ Xauth *XauGetAuthByAddr (unsigned short \fIfamily\fP\^, 
unsigned short
  Xauth *XauGetBestAuthByAddr (unsigned short \fIfamily\fP\^, unsigned short
  \fIaddress_length\fP\^, const char *\fIaddress\fP\^, unsigned short
  \fInumber_length\fP\^, const char *\fInumber\fP\^, int \fItypes_length\fP\^,
-char **\fItypes\fR\^, const int *\fItype_lengths\fR\^);
+const char **\fItypes\fR\^, const int *\fItype_lengths\fR\^);
  .HP
  int XauLockAuth (const char *\fIfile_name\fP\^, int \fIretries\fP\^, int
  \fItimeout\fP\^, long \fIdead\fP\^);




--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
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: [PULL] OutputClass and autoloading of drivers for non-PCI devices

2014-02-26 Thread Keith Packard
Aaron Plattner aplatt...@nvidia.com writes:

 Dear Keith,

 The following changes since commit f34dc7fa96457ea6a0703493d74e63cca357712e:

   XQuartz: pointer - void * (2014-02-14 00:33:38 -0800)

 are available in the git repository at:

   git://people.freedesktop.org/~aplattner/xserver tags/outputclass

I'm not seeing this tag in your repository; perhaps you forgot to push
it explicitly?

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


pgpgYch_Yyahw.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] Add devd config backend for FreeBSD (and GNU/kFreeBSD)

2014-02-26 Thread Guillem Jover
On Mon, 2014-02-24 at 22:27:54 +, Robert Millan wrote:
 On 22/02/2014 16:12, Guillem Jover wrote:
  +++ b/config/devd.c
  @@ -0,0 +1,365 @@
  +/*
  + * Copyright ?? 2012 Baptiste Daroussin
  
  Encoding issue? Should be ©, I guess.
 
 It's © in the actual file - just checked.

It seems the attachment does not contain a charset attribute in its
Content-Type: field header. ISTR «git send-email» adds one for me.

  realloc() can do the initial alloc if buf is NULL.
 
 What would be the point in that?

It makes sure the code path leading to the realloc() is always exercised
and tested, because otherwise going over 1 KiB might not happen too
often. And reduces logic duplication.

 This change pessimizes on the common case by adding
 two extra in-loop branches, without actually saving any cost since
 the allocation needs to happen anyway.

You mean on a loop that is performing a syscall per byte, ok.

Anyway, I'm not the one who's going to merge such changes, so…

Thanks,
Guillem
___
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