Commit Graph

14 Commits (dd3655ce73c6e905265cd677fdc53dc28376a290)

Author SHA1 Message Date
Emil Velikov 4dfa458979 Revert "libdrm: intel/Android.mk: Filter libdrm_intel library requirements on x86/x86_64"
This reverts commit ed07718ae7.

The commit added a guard since libpciaccess may be missing on some
setups. As of last commit there are no traces of the project, from
Android POV.

Hence, we can revert this workaround - which caused similar breakage to
the one it's trying to fix. This time in Mesa.

Cc: Rob Herring <rob.herring@linaro.org>
Acked-by: John Stultz <john.stultz@linaro.org>
2018-03-28 17:08:32 +01:00
Tomasz Figa bb0fd5f3b3 intel: Do not use libpciaccess on Android
This patch makes the code not rely anymore on libpciaccess when compiled
for Android to eliminate ioperm() and iopl() syscalls required by that
library. As a side effect, the mappable aperture size is hardcoded to 64
MiB on Android, however nothing seems to rely on this value anyway, as
checked be grepping relevant code in drm_gralloc and Mesa.

Cc: Rob Herring <rob.herring@linaro.org>
Signed-off-by: Tomasz Figa <tfiga@google.com>
[Emil Velikov: rebase against master. add missing __func__, Eric]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: John Stultz <john.stultz@linaro.org>
2018-03-28 17:08:32 +01:00
John Stultz ed07718ae7 libdrm: intel/Android.mk: Filter libdrm_intel library requirements on x86/x86_64
When building AOSP after updating libdrm project to the
freedesktop/master branch, I've seen the following build errors:

external/libdrm/intel/Android.mk: error: libdrm_intel
(SHARED_LIBRARIES android-arm64) missing libpciaccess
(SHARED_LIBRARIES android-arm64) You can set
ALLOW_MISSING_DEPENDENCIES=true in your environment if this is
intentional, but that may defer real problems until later in the
build.

Using ALLOW_MISSING_DEPENDENCIES=true when building allows
things to function properly, but is not ideal.

So basically, while I'm not including the libdrm_intel package
into the build, just the fact that the Android.mk file references
libpciaccess which isn't a repo included in AOSP causes the build
failure.

So it seems we need some sort of conditional filter in the
Android.mk to skip over it if we're not building for intel.

Cc: Chad Versace <chad.versace@linux.intel.com>
Cc: Marissa Wall <marissaw@google.com>
Cc: Sean Paul <seanpaul@google.com>
Cc: Dan Willemsen <dwillemsen@google.com>
Cc: Tomasz Figa <tfiga@google.com>
Cc: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-03-18 23:18:36 -05:00
Emil Velikov 03d2e91d00 android: introduce Android.common.mk to reduce boilerplate
... across the makefiles. Currently this isn't much but that will change
shortly.

As an added bonus this fixes all present and future cases where we've
forgotten to strip out the headers from LOCAL_SRC_FILES.

In a couple of cases (the tests) we start setting
LOCAL_EXPORT_C_INCLUDE_DIRS, which shouldn't be an issue.

Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
2017-01-27 15:48:16 +00:00
Emil Velikov de5b41ef5a android: remove LOCAL_MODULE_TAGS := optional tag
Seems to be the default option since ~2009 with commit 2f31293ba78 "auto
import from //branches/cupcake/...@137197". Fleshed out from a larger
commit in the AOSP repo/fork.

Cc: Dan Willemsen <dwillemsen@google.com>
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
2017-01-27 15:47:13 +00:00
Rob Herring d342cd34ac Android: strip out header files from sources list
AOSP master now errors if LOCAL_SRC_FILES contains headers, so filter
out header files from the source lists.

Signed-off-by: Rob Herring <robh@kernel.org>
2016-07-06 16:58:38 +01:00
Emil Velikov bc6b5174d3 android: remove explicit include to libpciaccess
Both android-x86 and android-ia versions of libpciacccess correctly
"export" the include. If anyone else is wrapping up their own version
they should do so as well.

Remove this fixed location hack from the build.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
2015-03-26 20:37:10 +00:00
Emil Velikov ff021215ea android: remove LOCAL_COPY_HEADERS* variables
With earlier changes we've implicitly add the relevant directories
to the includes list, via LOCAL_EXPORT_C_INCLUDES_DIRS.

v2: Update the top Android.mk as well.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 17:02:56 +00:00
Emil Velikov c277cbdd15 android: remove ${srcdir} from the includes
Already handled by the build system.

v2: s/compiler/build system/. Spotted by Chih-Wei.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 16:59:58 +00:00
Emil Velikov af4379f759 android: simplify LOCAL_C_INCLUDES
Each of the libdrm_${hw} modules pull libdrm for linking as such:

libdrm's LOCAL_EXPORT_C_INCLUDE_DIRS are added to the includes list.
The former of which is already set to ${top} and ${top}/include/drm.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 16:59:22 +00:00
Emil Velikov 24ac8cd7db android: correcly set LOCAL_EXPORT_C_INCLUDE_DIRS
- Don't add ${hw}/${hw}, but ${hw} to the includes path. The former
does not exist.
 - Set the variable for libkms.

Inspired by the work of from Chih-Wei from the Android-x86 project.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 16:59:22 +00:00
Chih-Wei Huang 5c1c09e0d2 android: remove duplicate libdrm in LOCAL_SHARED_LIBRARIES
v2: Fold libpciaccess and libdrm into a single local_shared_libraries

Acked-by: Jan Vesely <jan.vesely@rutgers.edu>
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-02-23 09:27:49 +00:00
Emil Velikov b26dc002f7 libdrm,intel: rework android header handling
Contains the following patches squashed in:

    commit 99247a5bd724ddcf0f06a5518baad207c53f1e2b
    Author: Haitao Huang <haitao.huang@intel.com>
    Date: Fri, 27 Apr 2012 13:20:53 -0500

        Android.mk: use LOCAL_COPY_HEADERS to export headers.

        Export necessary header files used by other components for
        Android, such as libva intel-driver, gralloc, hwcomposer, etc.

        Change-Id: I2feabf6941379ef4d756e942f30eba059de641f1
        Signed-off-by: Haitao Huang <haitao.huang@intel.com>
        [chad: Fixed inconsistent indentation.]
        Signed-off-by: Chad Versace <chad.versace@linux.intel.com>

    commit 7d0b528cb69995d7ea4e29b2daa1e3b28a362f42
    Author: Emil Velikov <emil.l.velikov@gmail.com>
    Date: Sun, 27 Jul 2014 18:22:41 +0100

        android: reuse headers lists, separate libdrm from intel headers

        Rather than having a duplicate copy of the headers list(s),
        reuse the existing one(s). Distinguish that the intel headers
        should be copied when libdrm_intel is used.

        v2 Rename the headers variable(s) to *_H_FILES.

        Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>

    commit 361de3ba4cadd5357596d1537bb3f216d281532b
    Author: Piotr Luc <piotr.luc@intel.com>
    Date: Fri, 14 Jun 2013 13:00:39 +0200

        Export include dir from libdrm

        BZ: 116218

        Google introduced new method of specifying include path(s)
        between modules. This allows a module to include header from a
        library without directly specifyining by includer the path where
        headers are located.

        The method requires from library that holds headers to export
        include path(s) in LOCAL_EXPORT_C_INCLUDE_DIRS variable.
        These exported include path(s) are automatically added to
        include path(s) of modules that have name of the library in the
        LOCAL_SHARED_LIBRARIES or LOCAL_STATIC_LIBRARIES list.

        This change sets LOCAL_EXPORT_C_INCLUDE_DIRS to folders that
        contain headers file that used by other modules in order to
        export these paths.

        Change-Id: Id1ac885b31ef2efe194e0289fbcaecd9eb533df0
        Signed-off-by: Piotr Luc <piotr.luc@intel.com>
        Reviewed-on: http://android.intel.com:8080/113562
        Reviewed-by: cactus <cactus@intel.com>
        Reviewed-by: Luc, Piotr <Piotr.Luc@intel.com>
        Reviewed-by: Purushothaman, Vijay A <vijay.a.purushothaman@intel.com>
        Reviewed-by: Stimson, Dale B <dale.b.stimson@intel.com>
        Tested-by: Stimson, Dale B <dale.b.stimson@intel.com>
        Reviewed-by: buildbot <buildbot@intel.com>
        Tested-by: buildbot <buildbot@intel.com>

    commit 2bf22fcbd4cbb9e7c7764d5eff0bb4e75ab1a005
    Author: Emil Velikov <emil.l.velikov@gmail.com>
    Date: 27 Jul 2014 18:27:21 +0100

        android: Separate libdrm and intel LOCAL_EXPORT_C_INCLUDE_DIRS

        Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-09-01 16:06:02 +01:00
Emil Velikov 0a92953e70 libdrm,intel: Add Android build
Contains the following patches squashed in:

    commit f340a8b9f2b84d5762553bef046914e0bde20795
    Author: Chad Versace <chad.versace@linux.intel.com>
    Date: Wed, 21 Dec 2011 11:43:57 -0800

        libdrm,intel: Add Android makefiles (v2)

        This enables libdrm.so and libdrm_intel.so to build on Android
        IceCreamSandwich.

        v2: Link libdrm_intel to libpciaccess.

        Change-Id: Ie5ed4bc0e6b4f9f819e3ec44488e385c35e97128
        Signed-off-by: Chad Versace <chad.versace@linux.intel.com>

    commit 8fb3f42389dea34218ed1fe59550ec2abb4d6953
    Author: Andrew Boie <andrew.p.boie@intel.com>
    Date: Wed, 26 Sep 2012 13:32:05 -0700

        libdrm, libdrm_intel: Skip driver name checks

        These libraries have 'optional' tags, which means they won't get
        built unless something else depends on them or they are added to
        PRODUCT_PACKAGES. There's no need for additional filtering.

        Change-Id: I5d90969f38671f8144c0dc27d47144b3f09a15ce
        Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2014-09-01 16:06:01 +01:00