drm: Branch 'master' - 2 commits
[email protected] (Emil Velikov) Wed, 28 Mar 2018 16:15:16 +0000 (UTC)
| Newsgroups | gmane.comp.video.dri.patches |
|---|---|
| Message-ID | <[email protected]> |
intel/Android.mk | 5 +---- intel/intel_bufmgr.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) New commits: commit 4dfa458979c345ea5eb46749f545d78c09e3f244 Author: Emil Velikov <[email protected]> Date: Tue Mar 20 17:32:37 2018 +0000 Revert "libdrm: intel/Android.mk: Filter libdrm_intel library requirements on x86/x86_64" This reverts commit ed07718ae7bab596297abf210bb0c37c6dba58ed. 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 <[email protected]> Acked-by: John Stultz <[email protected]> diff --git a/intel/Android.mk b/intel/Android.mk index dd881688..f45312dd 100644 --- a/intel/Android.mk +++ b/intel/Android.mk @@ -21,7 +21,6 @@ # IN THE SOFTWARE. # -ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64)) LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) @@ -37,4 +36,3 @@ LOCAL_SHARED_LIBRARIES := \ include $(LIBDRM_COMMON_MK) include $(BUILD_SHARED_LIBRARY) -endif commit bb0fd5f3b30141e2049a31f9ccd3f806645b21e0 Author: Tomasz Figa <[email protected]> Date: Mon Dec 14 19:46:34 2015 +0900 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 <[email protected]> Signed-off-by: Tomasz Figa <[email protected]> [Emil Velikov: rebase against master. add missing __func__, Eric] Signed-off-by: Emil Velikov <[email protected]> Acked-by: John Stultz <[email protected]> diff --git a/intel/Android.mk b/intel/Android.mk index 3f9db785..dd881688 100644 --- a/intel/Android.mk +++ b/intel/Android.mk @@ -33,8 +33,7 @@ LOCAL_MODULE := libdrm_intel LOCAL_SRC_FILES := $(LIBDRM_INTEL_FILES) LOCAL_SHARED_LIBRARIES := \ - libdrm \ - libpciaccess + libdrm include $(LIBDRM_COMMON_MK) include $(BUILD_SHARED_LIBRARY) diff --git a/intel/intel_bufmgr.c b/intel/intel_bufmgr.c index bede0a21..192de093 100644 --- a/intel/intel_bufmgr.c +++ b/intel/intel_bufmgr.c @@ -32,7 +32,9 @@ #include <errno.h> #include <drm.h> #include <i915_drm.h> +#ifndef __ANDROID__ #include <pciaccess.h> +#endif #include "libdrm_macros.h" #include "intel_bufmgr.h" #include "intel_bufmgr_priv.h" @@ -322,6 +324,7 @@ drm_intel_get_pipe_from_crtc_id(drm_intel_bufmgr *bufmgr, int crtc_id) return -1; } +#ifndef __ANDROID__ static size_t drm_intel_probe_agp_aperture_size(int fd) { @@ -347,6 +350,15 @@ err: pci_system_cleanup (); return size; } +#else +static size_t +drm_intel_probe_agp_aperture_size(int fd) +{ + /* Nothing seems to rely on this value on Android anyway... */ + fprintf(stderr, "%s: Mappable aperture size hardcoded to 64MiB\n", __func__); + return 64 * 1024 * 1024; +} +#endif int drm_intel_get_aperture_sizes(int fd, size_t *mappable, size_t *total) ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot --