libdrm/intel: Add support for Android
cover libdrm/intel: Add support for Android
From: Chad Versace <[email protected]>
This series enables libdrm.so and libdrm_intel.so to build on Android IceCreamSandwich.
Chad Versace (3):
intel: Disable drm_intel_probe_agp_aperture_size() on Android libdrm,intel: Factor source file lists into sources.mk libdrm,intel: Add Android makefiles
Android.mk | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 9 +++---- intel/Android.mk | 49 +++++++++++++++++++++++++++++++++++++++++++++++ intel/Makefile.am | 8 +++--- intel/intel_bufmgr.c | 10 ++++++++- intel/sources.mk | 29 +++++++++++++++++++++++++++ sources.mk | 30 ++++++++++++++++++++++++++++ 7 files changed, 177 insertions(+), 10 deletions(-) create mode 100644 Android.mk create mode 100644 intel/Android.mk create mode 100644 intel/sources.mk create mode 100644 sources.mk
Signature · 1 line
1.7.7.4
PATCH 1/3 intel: Disable drm_intel_probe_agp_aperture_size() on Android
The function uses libpciaccess, which is not present on Android. So, make it a no-op that returns 0.
--- intel/intel_bufmgr.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-)
intel/intel_bufmgr.c +9 -1
@@ -36,11 +36,14 @@#include <errno.h> #include <drm.h> #include <i915_drm.h> -#include <pciaccess.h> #include "intel_bufmgr.h" #include "intel_bufmgr_priv.h" #include "xf86drm.h" +#ifndef ANDROID +#include <pciaccess.h> +#endif +/** @file intel_bufmgr.c * * Convenience functions for buffer management methods.
@@ -275,6 +278,10 @@ int drm_intel_get_pipe_from_crtc_id(drm_intel_bufmgr *bufmgr, int crtc_id)static size_t drm_intel_probe_agp_aperture_size (int fd) { +#ifdef ANDROID +/* Android does not have libpciaccess. */ +return 0 ; +#else struct pci_device *pci_dev;size_t size =0 ;int ret;
@@ -296,6 +303,7 @@ drm_intel_probe_agp_aperture_size(int fd) err:pci_system_cleanup ();return size; +#endif } int drm_intel_get_aperture_sizes(int fd,
Signature · 1 line
1.7.7.4
Re: [PATCH 1/3] intel: Disable drm_intel_probe_agp_aperture_size() on Android
Quoted 2 lines · Chad Versace
The function uses libpciaccess, which is not present on Android. So, make it a no-op that returns 0.
It's a bug that we're not using this function in mesa. How hard would it be to get libpciaccess available?
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 1/3] intel: Disable drm_intel_probe_agp_aperture_size() on Android
Quoted 2 lines · Eric Anholt
On Fri, 23 Dec 2011 12:11:10 -0800, Chad Versace <
Quoted 1 line · [email protected]> wrote:
Quoted 1 line
The function uses libpciaccess, which is not present on Android. So,
make
Quoted 5 lines
Quoted 1 line
it a no-op that returns 0.
It's a bug that we're not using this function in mesa. How hard would it be to get libpciaccess available?
Not hard, but do we need it for anything else besides this part?
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 1/3] intel: Disable drm_intel_probe_agp_aperture_size() on Android
You need libpciaccess in Android if you want to use intel-gpu-tools in Android. We have already ported these tools to work in Android.
Thanks,
Vijay
From: Eugeni Dodonov [mailto:[email protected]]
Sent: Wednesday, December 28, 2011 10:56 PM
To: Eric Anholt <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: [Intel-gfx] [PATCH 1/3] intel: Disable drm_intel_probe_agp_aperture_size() on Android
Quoted 8 lines · On Dec 27, 2011 6:41 PM, "Eric Anholt" <[email protected]<mailto:[email protected]>…
Quoted 2 lines · On Fri, 23 Dec 2011 12:11:10 -0800, Chad Versace…
The function uses libpciaccess, which is not present on Android. So, make it a no-op that returns 0.
It's a bug that we're not using this function in mesa. How hard would it be to get libpciaccess available?
Not hard, but do we need it for anything else besides this part?
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 1/3] intel: Disable drm_intel_probe_agp_aperture_size() on Android
Quoted 4 lines · Vijay A
You need libpciaccess in Android if you want to use intel-gpu-tools in Android. We have already ported these tools to work in Android.
Thanks,
Vijay
Vijay, please share the source for your Android ports of libpciaccess and intel-gpu-tools. We should try to avoid duplication of effort here.
Chad
Re: [PATCH 1/3] intel: Disable drm_intel_probe_agp_aperture_size() on Android
Chad,
I was under the impression that your team already have access to our internal tools - I believe at least Jesse has access.
I will make sure to include you folks in our release notices. We are planning to upstream the changes in a week. For time being I will send you a copy.
Thanks,
Vijay
Quoted 20 lines
-----Original Message-----
From: Chad Versace [mailto:[email protected]]
Sent: Friday, December 30, 2011 5:17 AM
To: Purushothaman, Vijay A
Cc: '[email protected]'; '[email protected]'; 'intel- [email protected]'
Subject: Re: [Intel-gfx] [PATCH 1/3] intel: Disabledrm_intel_probe_agp_aperture_size()on AndroidQuoted 1 line · Vijay A
You need libpciaccess in Android if you want to use intel-gpu-tools in
Android. We have already ported these tools to work in Android.
Quoted 3 lines
Thanks,
VijayVijay, please share the source for your Android ports of libpciaccess and intel-gpu-tools. We should try to avoid duplication of effort here.
Chad
Re: [PATCH 1/3] intel: Disable drm_intel_probe_agp_aperture_size() on Android
In reply to Chad VersaceQuoted 3 lines · Chad Versace <chad.versace <at> linux.intel.com> writes:
Quoted 1 line · Vijay A
You need libpciaccess in Android if you want to use intel-gpu-tools in
Android. We have already ported
Quoted 6 lines
these tools to work in Android.
Quoted 3 lines
Thanks,
VijayVijay, please share the source for your Android ports of libpciaccess and
intel-gpu-tools. We should try
Quoted 4 lines
to avoid duplication of effort here.
Chad
We need to run the intel gpu tools test in Android(ICS). As you have said here ,we require the libpciaccess for the intel GPU tools tests to be run in Android. I have not found any method so far as how to put the libpciaccess into Android. Can u help us on this ASAP?
Thanks,
Engineer
Re: [PATCH 1/3] intel: Disable drm_intel_probe_agp_aperture_size() on Android
Quoted 6 lines
We need to run the intel gpu tools test in Android(ICS). As you have said here ,we require the libpciaccess for the intel GPU tools tests to be run in Android. I have not found any method so far as how to put the libpciaccess into Android. Can u help us on this ASAP?
I remember seeing a patch from Sateesh for porting intel-gpu-tools and libpciaccess.
I will request him to resend the patch.
Thanks,
Vijay
Re: [PATCH 1/3] intel: Disable drm_intel_probe_agp_aperture_size() on Android
In reply to Chad VersaceQuoted 3 lines · Chad Versace <chad.versace <at> linux.intel.com> writes:
Quoted 1 line · Vijay A
You need libpciaccess in Android if you want to use intel-gpu-tools in
Android. We have already ported
Quoted 6 lines
these tools to work in Android.
Quoted 3 lines
Thanks,
VijayVijay, please share the source for your Android ports of libpciaccess and
intel-gpu-tools. We should try
Quoted 4 lines
to avoid duplication of effort here.
Chad
hi vijay,
Do post the source code of libpciaccess android porting as we face
issues with the porting of libpciaccess with android.
Thanks
Iyshwarya
Re: [PATCH 1/3] intel: Disable drm_intel_probe_agp_aperture_size() on Android
Daniel,
I sent the patch for intel-gpu-tools port to Android and I remember you mentioning that it is merged. But I do not see my patches in the intel-gpu-tools git repo.
Have the patches been merged?
--
Sateesh
Quoted 29 lines · iyshwarya
Quoted 2 lines · Chad Versace<chad.versace<at> linux.intel.com> writes:
Quoted 1 line · Vijay A
You need libpciaccess in Android if you want to use intel-gpu-tools in
Android. We have already ported
Quoted 4 lines
these tools to work in Android.
Quoted 2 lines
Thanks,
VijayVijay, please share the source for your Android ports of libpciaccess and
intel-gpu-tools. We should try
Quoted 4 lines
to avoid duplication of effort here.
Chad
hi vijay,
Do post the source code of libpciaccess android porting as we face
issues with the porting of libpciaccess with android.Thanks
Iyshwarya_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 1/3] intel: Disable drm_intel_probe_agp_aperture_size() on Android
The repository hosted at git.debian.org does not have my changes, but the one at freedesktop does. Which is the maintained repo?
apt-get source prints the repository being at git://git.debian.org/git/pkg-xorg/app/intel-gpu-tools.git
--
Sateesh
Quoted 41 lines · Sateesh Kavuri
Daniel,
I sent the patch for intel-gpu-tools port to Android and I remember you mentioning that it is merged. But I do not see my patches in the intel-gpu-tools git repo.Have the patches been merged?
Signature · 1 line
SateeshQuoted 29 lines · iyshwarya
Quoted 2 lines · Chad Versace<chad.versace<at> linux.intel.com> writes:
Quoted 1 line · Vijay A
You need libpciaccess in Android if you want to use intel-gpu-tools in
Android. We have already ported
Quoted 4 lines
these tools to work in Android.
Quoted 2 lines
Thanks,
VijayVijay, please share the source for your Android ports of libpciaccess and
intel-gpu-tools. We should try
Quoted 4 lines
to avoid duplication of effort here.
Chad
hi vijay,
Do post the source code of libpciaccess android porting as we face
issues with the porting of libpciaccess with android.Thanks
Iyshwarya_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 1/3] intel: Disable drm_intel_probe_agp_aperture_size() on Android
Quoted 5 lines · Sateesh Kavuri
The repository hosted at git.debian.org does not have my changes, but the one at freedesktop does. Which is the maintained repo?
apt-get source prints the repository being at
git://git.debian.org/git/pkg-xorg/app/intel-gpu-tools.git
That's the wrong one, i-g-t is at fdo since quite a while. -Daniel
Quoted 47 lines
--
SateeshQuoted 41 lines · Sateesh Kavuri
Daniel,
I sent the patch for intel-gpu-tools port to Android and I remember you mentioning that it is merged. But I do not see my patches in the intel-gpu-tools git repo.Have the patches been merged?
Signature · 1 line
SateeshQuoted 29 lines · iyshwarya
Quoted 2 lines · Chad Versace<chad.versace<at> linux.intel.com> writes:
Quoted 1 line · Vijay A
You need libpciaccess in Android if you want to use intel-gpu-tools in
Android. We have already ported
Quoted 4 lines
these tools to work in Android.
Quoted 2 lines
Thanks,
VijayVijay, please share the source for your Android ports of libpciaccess and
intel-gpu-tools. We should try
Quoted 4 lines
to avoid duplication of effort here.
Chad
hi vijay,
Do post the source code of libpciaccess android porting as we face
issues with the porting of libpciaccess with android.Thanks
Iyshwarya_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Mail: [email protected] Mobile: +41 (0)79 365 57 48
Re: [PATCH 1/3] intel: Disable drm_intel_probe_agp_aperture_size() on Android
In reply to Eugeni Dodonov-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 4 lines · Eugeni Dodonov
Quoted 2 lines · On Dec 27, 2011 6:41 PM, "Eric Anholt" <[email protected]…
On Fri, 23 Dec 2011 12:11:10 -0800, Chad Versace <[email protected] <mailto:[email protected]>> wrote:
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
The function uses libpciaccess, which is not present on Android. So, make it a no-op that returns 0.
It's a bug that we're not using this function in mesa. How hard would it be to get libpciaccess available?
Not hard, but do we need it for anything else besides this part?
We only need it for this one function.
I haven't looked into how hard it would be yet. It's on my todo list for Thursday to try to squeeze it into the Android build.
- ----
Chad Versace
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJO+7gmAAoJEAIvNt057x8ipYwQAKKlAtQDdDFMRElz3qBAZ/8Z L1FdVbWF6tIqg/0hDxbZxUw/8sENL86dg7kJr/Gbc4zU9inyE4h/6zYr6ZU7PsLg UDk/SPvzqScCCrwHwbXHb4S+X7OXb5NTTO8BK8D8vzcIrLanW6+dOTayJfXLQBtw t0C9hClvRnmP1ZPLF7PY9AG2A2OnMzhOYBTgdyIZY6YgOVPWtITjgJFQz/d4zx5E akjTNJ5WAycwHhfj9Uc5LwApEfpaIx/Leb4pr77bCz8i/Eu8/kJd5CkzQ+Kn76Wn rbdyAi9Vx3OtE4WS58R46Q77T0gLoqoSWgKQ246XQkjB3Mp0daY2E3EKxgS1/Dhi AqdGE63SdjWpUiZe1J5yUCl/iD1SPTL72ESBAlUMkvdkt5+BOcj+yy8ZdfZ2jMaH EqWbEOrXyqIN2uqsCgRKwO4xYEH/Kv8Cw/32JdF+d2EDqRutli9Q2wAMFDGzZy0n DAtY3c9KsfBY8vDkVCjs7eX7yAYaJIr5hJN9d9wO4mE5ZNYtJMUP1ADgHdNEeuaL OKOPb6mK7DAG9FPeuEM70/8Dq0NaxIhaR2lbFj5bSu9EVKIyC7+HiVYNjiXZVibB bML3FbX1iThGStStPJzio1wwQ2J1y2uQH78SM9wZX5CYlKKcooig4hQOh1/CDFIK oKAIwSnWpq9RH0HiQmlu
=t3DY
-----END PGP SIGNATURE-----
PATCH 2/3 libdrm,intel: Factor source file lists into sources.mk
In reply to Chad VersaceFactor the source file list for libdrm.so from Makefile.am into sources.mk. Ditto for libdrm_intel.so.
This is in preparation for adding support for Android. The sources.mk's will be shared between autotools and Android.
Rationale: The most commonly changed parts of any makefile are the source lists. So, by sharing the lists between the two build systems, we can reduce the frequency at which modifications to the Linux build breaks the Android build.
--- Makefile.am | 9 ++++----- intel/Makefile.am | 8 ++++---- intel/sources.mk | 29 +++++++++++++++++++++++++++++ sources.mk | 30 ++++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+), 9 deletions(-) create mode 100644 intel/sources.mk create mode 100644 sources.mk
Makefile.am +4 -5
@@ -41,6 +41,9 @@ if HAVE_RADEON RADEON_SUBDIR = radeon endif +# Import variable LIBDRM_SOURCES. +include sources.mk + SUBDIRS = . $(LIBKMS_SUBDIR) $(INTEL_SUBDIR) $(NOUVEAU_SUBDIR) $(RADEON_SUBDIR) tests include libdrm_la_LTLIBRARIES = libdrm.la
@@ -51,11 +54,7 @@ libdrm_la_LIBADD = @CLOCK_LIB@ libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm libdrm_la_SOURCES = \ - xf86drm.c \ - xf86drmHash.c \ - xf86drmRandom.c \ - xf86drmSL.c \ - xf86drmMode.c \ + $(LIBDRM_SOURCES) \ xf86atomic.h \ libdrm_lists.h
intel/Makefile.am +4 -4
@@ -22,6 +22,9 @@ # Authors: # Eric Anholt <[email protected]> +# Import variable LIBDRM_INTEL_SOURCES. +include sources.mk + AM_CFLAGS = \ $(WARN_CFLAGS) \ -I$(top_srcdir) \
@@ -36,12 +39,9 @@ libdrm_intel_la_LDFLAGS = -version-number 1:0:0 -no-undefined libdrm_intel_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ @PCIACCESS_LIBS@ @CLOCK_LIB@ libdrm_intel_la_SOURCES = \ - intel_bufmgr.c \ + $(LIBDRM_INTEL_SOURCES) \ intel_bufmgr_priv.h \ - intel_bufmgr_fake.c \ - intel_bufmgr_gem.c \ intel_chipset.h \ - mm.c \ mm.h libdrm_intelincludedir = ${includedir}/libdrm
intel/sources.mk new file +29 -0
@@ -0,0 +1,29 @@ +# +# Copyright © 2011 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# + +# for libdrm_intel.so +LIBDRM_INTEL_SOURCES := \ + intel_bufmgr.c \ + intel_bufmgr_fake.c \ + intel_bufmgr_gem.c \ + mm.c
sources.mk new file +30 -0
@@ -0,0 +1,30 @@ +# +# Copyright © 2011 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# + +# for libdrm.so +LIBDRM_SOURCES := \ + xf86drm.c \ + xf86drmHash.c \ + xf86drmRandom.c \ + xf86drmSL.c \ + xf86drmMode.c
Signature · 6 lines
1.7.7.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 libdrm,intel: Add Android makefiles
In reply to Chad VersaceThis enables libdrm.so and libdrm_intel.so to build on Android IceCreamSandwich.
--- Android.mk | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ intel/Android.mk | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 0 deletions(-) create mode 100644 Android.mk create mode 100644 intel/Android.mk
Android.mk new file +52 -0
@@ -0,0 +1,52 @@ +# +# Copyright © 2011 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# + +LIBDRM_VALID_GPU_DRIVERS := i915 i965 + +# Skip this makefile if we're not building for a known GPU. +ifneq ($(filter $(BOARD_GPU_DRIVERS), $(LIBDRM_VALID_GPU_DRIVERS)),) + +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LIBDRM_TOP := $(LOCAL_PATH) + +# Import variable LIBDRM_SOURCES. +include $(LOCAL_PATH)/sources.mk + +LOCAL_MODULE := libdrm +LOCAL_MODULE_TAGS := optional + +LOCAL_SRC_FILES := $(LIBDRM_SOURCES) + +LOCAL_C_INCLUDES := \ + $(LIBDRM_TOP)/include/drm + +LOCAL_CFLAGS := \ + -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1 + +include $(BUILD_SHARED_LIBRARY) + +include $(LOCAL_PATH)/intel/Android.mk + +endif # BOARD_GPU_DRIVERS
intel/Android.mk new file +49 -0
49 lines not on this page · raw message
Signature · 6 lines
1.7.7.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx