Skip to contentSkip to conversation

xorg: misc fixes and changes (branch yem/xorg)

PATCH New Yann E. MORIN 2 participants 8 messages Jul 26, 2015 – Jul 30, 2015

lore
Share & tools
lore
#0 lore raw

cover xorg: misc fixes and changes (branch yem/xorg)

Hello All!

This series introduces three changes in our Xorg stack:
- the default server is changed from KDrive to modular
- the dependency on libdrm is cleaned up
- a missing dependency on libdrm has been added for DRI2

Regards,
Yann E. MORIN.

The following changes since commit 5ccde01652bc41da325bf4c9a5abbf0031080784:

  php: remove redundant --static flag to pkg-config (2015-07-26 23:45:02 +0200)

are available in the git repository at:

git://git.busybox.net/~ymorin/git/buildroot yem/xorg

for you to fetch changes up to ed8d79ec52aec5a5724e4a93b65d6f54240a750c:

package/xserver_xorg-server: dri2 needs libdrm (2015-07-27 00:31:49 +0200)

----------------------------------------------------------------
Yann E. MORIN (3):
package/xserver: switch to the modular server as default package/xserver: commonalise dependency on libdrm package/xserver_xorg-server: dri2 needs libdrm

 package/x11r7/xserver_xorg-server/Config.in           |  2 +-
 .../x11r7/xserver_xorg-server/xserver_xorg-server.mk  | 19 ++++++++++++++-----
 2 files changed, 15 insertions(+), 6 deletions(-)
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH 1/3 package/xserver: switch to the modular server as default

---
 package/x11r7/xserver_xorg-server/Config.in | 1 -
 1 file changed, 1 deletion(-)
package/x11r7/xserver_xorg-server/Config.in +0 -1
index dc0b70c..f0ec598 100644
@@ -87,7 +87,6 @@ config BR2_PACKAGE_XSERVER_XORG_SERVER_VERSION
 
 choice
 	prompt "X Window System server type"
-	default BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE
 	help
 	  Select the X Window System server to use
 
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/3 package/xserver: switch to the modular server as default

Dear Yann E. MORIN,

Quoted 4 lines · Yann E. MORIN
---
 package/x11r7/xserver_xorg-server/Config.in | 1 -
 1 file changed, 1 deletion(-)

Applied, thanks. Let's the fun begin in the autobuilders!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 2/3 package/xserver: commonalise dependency on libdrm

In reply to Yann E. MORIN

Currently, we have two locations that may want to enable and.or disable libdrm, and it's not clear how those two location correlate one to the other, i.e. they may well want o do one the opposite of the other.

Introduce an intermediate variable that records whether libdrm is needed, and use that to depend on, and enable, libdrm.

Cc Thomas Petazzoni <[email protected]>
Cc Bernd Kuhls <[email protected]>

---
Note: there might be other libs in the same situation, but that can come in later patches as the need arises... I just change this one lbdrm, because it will be needed by a followup patch to fix building with dri2proto enabled.

---
 .../x11r7/xserver_xorg-server/xserver_xorg-server.mk   | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
package/x11r7/xserver_xorg-server/xserver_xorg-server.mk +13 -5
index 79d663c..374a9c3 100644
@@ -122,10 +122,11 @@ XSERVER_XORG_SERVER_CONF_OPTS += --disable-kdrive --disable-xfbdev
 endif
 
 ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y)
-XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri --enable-libdrm --enable-glx
-XSERVER_XORG_SERVER_DEPENDENCIES += libdrm mesa3d xproto_xf86driproto
+XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri --enable-glx
+XSERVER_XORG_SERVER_DEPENDENCIES += mesa3d xproto_xf86driproto
+XSERVER_XORG_SERVER_NEEDS_LIBDRM = y
 else
-XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri --disable-libdrm --disable-glx
+XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri --disable-glx
 endif
 
 ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_AIGLX),y)
@@ -145,8 +146,8 @@ XSERVER_XORG_SERVER_DEPENDENCIES += udev
 XSERVER_XORG_SERVER_CONF_OPTS += --enable-config-udev
 # udev kms support depends on libdrm
 ifeq ($(BR2_PACKAGE_LIBDRM),y)
-XSERVER_XORG_SERVER_DEPENDENCIES += libdrm
-XSERVER_XORG_SERVER_CONF_OPTS += --enable-config-udev-kms --enable-libdrm
+XSERVER_XORG_SERVER_CONF_OPTS += --enable-config-udev-kms
+XSERVER_XORG_SERVER_NEEDS_LIBDRM = y
 else
 XSERVER_XORG_SERVER_CONF_OPTS += --disable-config-udev-kms
 endif
@@ -228,4 +229,11 @@ XSERVER_XORG_SERVER_CONF_OPTS += --with-sha1=libsha1
 XSERVER_XORG_SERVER_DEPENDENCIES += libsha1
 endif
 
+ifeq ($(XSERVER_XORG_SERVER_NEEDS_LIBDRM),y)
+XSERVER_XORG_SERVER_DEPENDENCIES += libdrm
+XSERVER_XORG_SERVER_CONF_OPTS += --enable-libdrm
+else
+XSERVER_XORG_SERVER_CONF_OPTS += --disable-libdrm
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
1.9.1
#4 lore raw

PATCH 2/3 package/xserver: commonalise dependency on libdrm

Dear Yann E. MORIN,

Quoted 1 line · Yann E. MORIN

+XSERVER_XORG_SERVER_NEEDS_LIBDRM = y

Shouldn't we use an hidden Config.in boolean instead for this?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH 2/3 package/xserver: commonalise dependency on libdrm

Thoms, All,

On 2015-07-29 22:52 +0200, Thomas Petazzoni spake thusly:

Quoted 4 lines · Yann E. MORIN
Quoted 1 line

+XSERVER_XORG_SERVER_NEEDS_LIBDRM = y

Shouldn't we use an hidden Config.in boolean instead for this?

That's an option, yes. I'll do that later.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH 2/3 package/xserver: commonalise dependency on libdrm

In reply to Thomas Petazzoni

Thomas, All,

On 2015-07-29 22:52 +0200, Thomas Petazzoni spake thusly:

Quoted 3 lines · Yann E. MORIN
Quoted 1 line

+XSERVER_XORG_SERVER_NEEDS_LIBDRM = y

Shouldn't we use an hidden Config.in boolean instead for this?

OK, I looked at it, and althogh I saif I would do it, I would like to avoid doing it.

The reason is that the conditions under which libdrm is needed ar ealready known in the .mk, but not in the Config.in. So, I would find it a bit inconvenient to have to duplicate that knowledge it two locations.

In the end, I believe the current patch is the best we can get.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#7 lore raw

PATCH 3/3 package/xserver_xorg-server: dri2 needs libdrm

In reply to Yann E. MORIN

Fixes build issues like:

CC dri2.lo
CC dri2ext.lo
dri2.c: In function 'dri2_probe_driver_name':
dri2.c:1434:9: error: unknown type name 'drmVersionPtr'
dri2.c:1434:9: warning: implicit declaration of function 'drmGetVersion' [-Wimplicit-function-declaration] dri2.c:1434:9: warning: nested extern declaration of 'drmGetVersion' [-Wnested-externs] dri2.c:1444:40: error: invalid type argument of '->' (have 'int')
dri2.c:1444:55: error: invalid type argument of '->' (have 'int')
dri2.c:1445:9: warning: implicit declaration of function 'drmFreeVersion' [-Wimplicit-function-declaration] dri2.c:1445:9: warning: nested extern declaration of 'drmFreeVersion' [-Wnested-externs] make[7]: *** [dri2.lo] Error 1

with this defconfig:

    BR2_TOOLCHAIN_EXTERNAL=y
    BR2_PACKAGE_XORG7=y
    BR2_PACKAGE_XSERVER_XORG_SERVER=y
    BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR=y
    BR2_PACKAGE_XPROTO_DRI2PROTO=y
---
 package/x11r7/xserver_xorg-server/Config.in              | 1 +
 package/x11r7/xserver_xorg-server/xserver_xorg-server.mk | 1 +
 2 files changed, 2 insertions(+)
package/x11r7/xserver_xorg-server/Config.in +1 -0
index f0ec598..5a6814b 100644
@@ -93,6 +93,7 @@ choice
 config BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR
 	bool "Modular X.org"
 	depends on BR2_INSTALL_LIBSTDCPP
+	select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_XPROTO_DRI2PROTO
 	help
 	  This variant of the X.org server is the full-blown variant,
 	  as used by desktop GNU/Linux distributions. The drivers (for
package/x11r7/xserver_xorg-server/xserver_xorg-server.mk +1 -0
index 374a9c3..7115e3f 100644
@@ -190,6 +190,7 @@ ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR),y)
 ifeq ($(BR2_PACKAGE_XPROTO_DRI2PROTO),y)
 XSERVER_XORG_SERVER_DEPENDENCIES += xproto_dri2proto
 XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri2
+XSERVER_XORG_SERVER_NEEDS_LIBDRM = y
 else
 XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri2
 endif
Signature · 1 line
1.9.1