Patchwork [1/6] libdrm: bump and add experimental ARM framebuffer support

login
register
mail settings
Submitter Spenser Gilliland
Date Aug. 24, 2013, 7:41 p.m.
Message ID <1377373321-29732-2-git-send-email-spenser@gillilanding.com>
Download mbox | patch
Permalink /patch/269660/
State Superseded
Headers show

Comments

Spenser Gilliland - Aug. 24, 2013, 7:41 p.m.
The newer versions of libdrm have substantially fewer dependencies as drm is
moving to be a subsystem for both wayland and Xorg.

Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
---
 package/libdrm/Config.in | 14 +++-----------
 package/libdrm/libdrm.mk | 24 +++++++++---------------
 2 files changed, 12 insertions(+), 26 deletions(-)
Arnout Vandecappelle - Aug. 26, 2013, 5:33 p.m.
On 08/24/13 21:41, Spenser Gilliland wrote:
> The newer versions of libdrm have substantially fewer dependencies as drm is
> moving to be a subsystem for both wayland and Xorg.

  I guess the remaining XLIB dependencies should then also move out of 
the Xorg condition, so that libdrm can move out of it as well...

  Regards,
  Arnout
Thomas Petazzoni - Aug. 27, 2013, 7:38 a.m.
Dear Spenser Gilliland,

On Sat, 24 Aug 2013 14:41:56 -0500, Spenser Gilliland wrote:
> The newer versions of libdrm have substantially fewer dependencies as drm is
> moving to be a subsystem for both wayland and Xorg.
> 
> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
> ---
>  package/libdrm/Config.in | 14 +++-----------
>  package/libdrm/libdrm.mk | 24 +++++++++---------------
>  2 files changed, 12 insertions(+), 26 deletions(-)
> 
> diff --git a/package/libdrm/Config.in b/package/libdrm/Config.in
> index 8bf676b..f976ef1 100644
> --- a/package/libdrm/Config.in
> +++ b/package/libdrm/Config.in
> @@ -1,18 +1,10 @@
>  config BR2_PACKAGE_LIBDRM
>  	bool "libdrm"
> +	select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS
> +	select BR2_PACKAGE_LIBATOMIC_OPS

libatomic_ops is not available on all architectures. In the prevous
libdrm code, it was only selected on i386 and x86-64, so it was ok, but
if libatomic_ops is now needed in all cases for libdrm, then you need
to propagate the libatomic_ops dependencies into libdrm, i.e:

	depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_sparc || BR2_powerpc || BR2_x86_64

> +	select BR2_PACKAGE_XLIB_LIBPCIACCESS if BR2_i386 || BR2_x86_64
>  	depends on BR2_PACKAGE_XORG7

If libdrm is needed by Wayland, then it sounds strange to require
enabling BR2_PACKAGE_XORG7. When I did the Wayland packaging, there are
a few X.org packages that I moved out of the BR2_PACKAGE_XORG7
condition, maybe we should do the same for libpciaccess and
libpthread-stubs. But ok, this is probably something we can tackle at a
later point, I don't want to require you to solve all problems right
now :)

>  	depends on BR2_LARGEFILE
> -	select BR2_PACKAGE_XPROTO_GLPROTO
> -	select BR2_PACKAGE_XPROTO_XF86VIDMODEPROTO
> -	select BR2_PACKAGE_XLIB_LIBXXF86VM
> -	select BR2_PACKAGE_XLIB_LIBXMU
> -	select BR2_PACKAGE_XLIB_LIBPCIACCESS
> -	select BR2_PACKAGE_XPROTO_DRI2PROTO
> -	select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS
> -	# libatomic_ops is only available on a subset of the supported
> -	# architectures, and we make the assumption that the intel
> -	# driver can only be used on x86 and x86_64 machines.
> -	select BR2_PACKAGE_LIBATOMIC_OPS if (BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL && (BR2_i386 || BR2_x86_64))
>  	help
>  	  Direct Rendering Manager
>  
> diff --git a/package/libdrm/libdrm.mk b/package/libdrm/libdrm.mk
> index d3d2b2d..8388e68 100644
> --- a/package/libdrm/libdrm.mk
> +++ b/package/libdrm/libdrm.mk
> @@ -4,7 +4,7 @@
>  #
>  ################################################################################
>  
> -LIBDRM_VERSION = 2.4.38
> +LIBDRM_VERSION = 2.4.46
>  LIBDRM_SOURCE = libdrm-$(LIBDRM_VERSION).tar.bz2
>  LIBDRM_SITE = http://dri.freedesktop.org/libdrm/
>  LIBDRM_LICENSE = MIT
> @@ -12,24 +12,18 @@ LIBDRM_LICENSE = MIT
>  LIBDRM_INSTALL_STAGING = YES
>  
>  LIBDRM_DEPENDENCIES = \
> -	xproto_glproto \
> -	xproto_xf86vidmodeproto \
> -	xlib_libXxf86vm \
> -	xlib_libXmu \
> -	xlib_libpciaccess \
> -	xproto_dri2proto \
>  	xlib_libpthread-stubs \
>  	host-pkgconf
>  
> -ifeq ($(BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL),y)
> -LIBDRM_CONF_OPT += --enable-intel
> -LIBDRM_DEPENDENCIES += libatomic_ops
> -else
> -LIBDRM_CONF_OPT += --disable-intel
> -endif
> +LIBDRM_CONF_OPT = \
> +	--disable-cairo-tests \
> +	--disable-manpages
>  
> -ifneq ($(BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI),y)
> -LIBDRM_CONF_OPT += --disable-radeon

So those --enable-intel / --disable-radeon things are no longer needed?

> +ifeq ($(BR2_arm),y)
> +LIBDRM_CONF_OPT += \
> +	--enable-omap-experimental-api \
> +	--enable-exynos-experimental-api \
> +	--enable-freedreno-experimental-api
>  endif

It seems strange to me to enable those options as soon as we're on ARM.
I think we probably need Config.in sub-options for these.

Thomas
Spenser Gilliland - Aug. 27, 2013, 7:24 p.m.
Thomas,

On Tue, Aug 27, 2013 at 2:38 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Spenser Gilliland,
>
> On Sat, 24 Aug 2013 14:41:56 -0500, Spenser Gilliland wrote:
>> The newer versions of libdrm have substantially fewer dependencies as drm is
>> moving to be a subsystem for both wayland and Xorg.
>>
>> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
>> ---
>>  package/libdrm/Config.in | 14 +++-----------
>>  package/libdrm/libdrm.mk | 24 +++++++++---------------
>>  2 files changed, 12 insertions(+), 26 deletions(-)
>>
>> diff --git a/package/libdrm/Config.in b/package/libdrm/Config.in
>> index 8bf676b..f976ef1 100644
>> --- a/package/libdrm/Config.in
>> +++ b/package/libdrm/Config.in
>> @@ -1,18 +1,10 @@
>>  config BR2_PACKAGE_LIBDRM
>>       bool "libdrm"
>> +     select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS
>> +     select BR2_PACKAGE_LIBATOMIC_OPS
>
> libatomic_ops is not available on all architectures. In the prevous
> libdrm code, it was only selected on i386 and x86-64, so it was ok, but
> if libatomic_ops is now needed in all cases for libdrm, then you need
> to propagate the libatomic_ops dependencies into libdrm, i.e:
>
>         depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_sparc || BR2_powerpc || BR2_x86_64

It is only needed for x86/x86_64, so we can select the option only
when BR2_i386 or BR2_x86_64.

>> +     select BR2_PACKAGE_XLIB_LIBPCIACCESS if BR2_i386 || BR2_x86_64
>>       depends on BR2_PACKAGE_XORG7
>
> If libdrm is needed by Wayland, then it sounds strange to require
> enabling BR2_PACKAGE_XORG7. When I did the Wayland packaging, there are
> a few X.org packages that I moved out of the BR2_PACKAGE_XORG7
> condition, maybe we should do the same for libpciaccess and
> libpthread-stubs. But ok, this is probably something we can tackle at a
> later point, I don't want to require you to solve all problems right
> now :)

I agree these packages should probably be moved out of xorg, but the
BR2_PACKAGE_XORG7 doesn't really do much other than allow access to
the libraries.

>
>>       depends on BR2_LARGEFILE
>> -     select BR2_PACKAGE_XPROTO_GLPROTO
>> -     select BR2_PACKAGE_XPROTO_XF86VIDMODEPROTO
>> -     select BR2_PACKAGE_XLIB_LIBXXF86VM
>> -     select BR2_PACKAGE_XLIB_LIBXMU
>> -     select BR2_PACKAGE_XLIB_LIBPCIACCESS
>> -     select BR2_PACKAGE_XPROTO_DRI2PROTO
>> -     select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS
>> -     # libatomic_ops is only available on a subset of the supported
>> -     # architectures, and we make the assumption that the intel
>> -     # driver can only be used on x86 and x86_64 machines.
>> -     select BR2_PACKAGE_LIBATOMIC_OPS if (BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL && (BR2_i386 || BR2_x86_64))
>>       help
>>         Direct Rendering Manager
>>
>> diff --git a/package/libdrm/libdrm.mk b/package/libdrm/libdrm.mk
>> index d3d2b2d..8388e68 100644
>> --- a/package/libdrm/libdrm.mk
>> +++ b/package/libdrm/libdrm.mk
>> @@ -4,7 +4,7 @@
>>  #
>>  ################################################################################
>>
>> -LIBDRM_VERSION = 2.4.38
>> +LIBDRM_VERSION = 2.4.46
>>  LIBDRM_SOURCE = libdrm-$(LIBDRM_VERSION).tar.bz2
>>  LIBDRM_SITE = http://dri.freedesktop.org/libdrm/
>>  LIBDRM_LICENSE = MIT
>> @@ -12,24 +12,18 @@ LIBDRM_LICENSE = MIT
>>  LIBDRM_INSTALL_STAGING = YES
>>
>>  LIBDRM_DEPENDENCIES = \
>> -     xproto_glproto \
>> -     xproto_xf86vidmodeproto \
>> -     xlib_libXxf86vm \
>> -     xlib_libXmu \
>> -     xlib_libpciaccess \
>> -     xproto_dri2proto \
>>       xlib_libpthread-stubs \
>>       host-pkgconf
>>
>> -ifeq ($(BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL),y)
>> -LIBDRM_CONF_OPT += --enable-intel
>> -LIBDRM_DEPENDENCIES += libatomic_ops
>> -else
>> -LIBDRM_CONF_OPT += --disable-intel
>> -endif
>> +LIBDRM_CONF_OPT = \
>> +     --disable-cairo-tests \
>> +     --disable-manpages
>>
>> -ifneq ($(BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI),y)
>> -LIBDRM_CONF_OPT += --disable-radeon
>
> So those --enable-intel / --disable-radeon things are no longer needed?

I'll do some more testing to make sure but I don't believe so.

>> +ifeq ($(BR2_arm),y)
>> +LIBDRM_CONF_OPT += \
>> +     --enable-omap-experimental-api \
>> +     --enable-exynos-experimental-api \
>> +     --enable-freedreno-experimental-api
>>  endif
>
> It seems strange to me to enable those options as soon as we're on ARM.
> I think we probably need Config.in sub-options for these.

I'll add config options for each driver.  I initially tried to avoid
this, but more and more I think it's a better solution.

> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

Thanks,
Spenser
Thomas Petazzoni - Aug. 27, 2013, 8:42 p.m.
Dear Spenser Gilliland,

On Tue, 27 Aug 2013 14:24:08 -0500, Spenser Gilliland wrote:

> > libatomic_ops is not available on all architectures. In the prevous
> > libdrm code, it was only selected on i386 and x86-64, so it was ok, but
> > if libatomic_ops is now needed in all cases for libdrm, then you need
> > to propagate the libatomic_ops dependencies into libdrm, i.e:
> >
> >         depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_sparc || BR2_powerpc || BR2_x86_64
> 
> It is only needed for x86/x86_64, so we can select the option only
> when BR2_i386 or BR2_x86_64.

Fine.

> >> +     select BR2_PACKAGE_XLIB_LIBPCIACCESS if BR2_i386 || BR2_x86_64
> >>       depends on BR2_PACKAGE_XORG7
> >
> > If libdrm is needed by Wayland, then it sounds strange to require
> > enabling BR2_PACKAGE_XORG7. When I did the Wayland packaging, there are
> > a few X.org packages that I moved out of the BR2_PACKAGE_XORG7
> > condition, maybe we should do the same for libpciaccess and
> > libpthread-stubs. But ok, this is probably something we can tackle at a
> > later point, I don't want to require you to solve all problems right
> > now :)
> 
> I agree these packages should probably be moved out of xorg, but the
> BR2_PACKAGE_XORG7 doesn't really do much other than allow access to
> the libraries.

That's true, but it means that the user needs to know that the global
BR2_PACKAGE_XORG7 option has to be enabled if he wants to build
something completely unrelated (say Wayland).

But ok, as I said, let's do this later on.

> >> -ifneq ($(BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI),y)
> >> -LIBDRM_CONF_OPT += --disable-radeon
> >
> > So those --enable-intel / --disable-radeon things are no longer needed?
> 
> I'll do some more testing to make sure but I don't believe so.

Ok.

> >> +ifeq ($(BR2_arm),y)
> >> +LIBDRM_CONF_OPT += \
> >> +     --enable-omap-experimental-api \
> >> +     --enable-exynos-experimental-api \
> >> +     --enable-freedreno-experimental-api
> >>  endif
> >
> > It seems strange to me to enable those options as soon as we're on ARM.
> > I think we probably need Config.in sub-options for these.
> 
> I'll add config options for each driver.  I initially tried to avoid
> this, but more and more I think it's a better solution.

Excellent, thanks.

Thomas

Patch

diff --git a/package/libdrm/Config.in b/package/libdrm/Config.in
index 8bf676b..f976ef1 100644
--- a/package/libdrm/Config.in
+++ b/package/libdrm/Config.in
@@ -1,18 +1,10 @@ 
 config BR2_PACKAGE_LIBDRM
 	bool "libdrm"
+	select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS
+	select BR2_PACKAGE_LIBATOMIC_OPS
+	select BR2_PACKAGE_XLIB_LIBPCIACCESS if BR2_i386 || BR2_x86_64
 	depends on BR2_PACKAGE_XORG7
 	depends on BR2_LARGEFILE
-	select BR2_PACKAGE_XPROTO_GLPROTO
-	select BR2_PACKAGE_XPROTO_XF86VIDMODEPROTO
-	select BR2_PACKAGE_XLIB_LIBXXF86VM
-	select BR2_PACKAGE_XLIB_LIBXMU
-	select BR2_PACKAGE_XLIB_LIBPCIACCESS
-	select BR2_PACKAGE_XPROTO_DRI2PROTO
-	select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS
-	# libatomic_ops is only available on a subset of the supported
-	# architectures, and we make the assumption that the intel
-	# driver can only be used on x86 and x86_64 machines.
-	select BR2_PACKAGE_LIBATOMIC_OPS if (BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL && (BR2_i386 || BR2_x86_64))
 	help
 	  Direct Rendering Manager
 
diff --git a/package/libdrm/libdrm.mk b/package/libdrm/libdrm.mk
index d3d2b2d..8388e68 100644
--- a/package/libdrm/libdrm.mk
+++ b/package/libdrm/libdrm.mk
@@ -4,7 +4,7 @@ 
 #
 ################################################################################
 
-LIBDRM_VERSION = 2.4.38
+LIBDRM_VERSION = 2.4.46
 LIBDRM_SOURCE = libdrm-$(LIBDRM_VERSION).tar.bz2
 LIBDRM_SITE = http://dri.freedesktop.org/libdrm/
 LIBDRM_LICENSE = MIT
@@ -12,24 +12,18 @@  LIBDRM_LICENSE = MIT
 LIBDRM_INSTALL_STAGING = YES
 
 LIBDRM_DEPENDENCIES = \
-	xproto_glproto \
-	xproto_xf86vidmodeproto \
-	xlib_libXxf86vm \
-	xlib_libXmu \
-	xlib_libpciaccess \
-	xproto_dri2proto \
 	xlib_libpthread-stubs \
 	host-pkgconf
 
-ifeq ($(BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL),y)
-LIBDRM_CONF_OPT += --enable-intel
-LIBDRM_DEPENDENCIES += libatomic_ops
-else
-LIBDRM_CONF_OPT += --disable-intel
-endif
+LIBDRM_CONF_OPT = \
+	--disable-cairo-tests \
+	--disable-manpages
 
-ifneq ($(BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI),y)
-LIBDRM_CONF_OPT += --disable-radeon
+ifeq ($(BR2_arm),y)
+LIBDRM_CONF_OPT += \
+	--enable-omap-experimental-api \
+	--enable-exynos-experimental-api \
+	--enable-freedreno-experimental-api
 endif
 
 ifeq ($(BR2_PACKAGE_UDEV),y)