summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Rossi <issor.oruam@gmail.com>2016-04-10 16:22:58 +0200
committerChih-Wei Huang <cwhuang@linux.org.tw>2016-05-02 23:59:36 +0800
commitcbf96c0d9e4fec7462dd9ce71a2805437501418f (patch)
tree66b44292e6114b644361a1bf80138ecc556d69ad
parentf61f81e90e264df6f5c72f07e81cff91fc79bdf7 (diff)
downloadexternal_drm_gralloc-cbf96c0d9e4fec7462dd9ce71a2805437501418f.zip
external_drm_gralloc-cbf96c0d9e4fec7462dd9ce71a2805437501418f.tar.gz
external_drm_gralloc-cbf96c0d9e4fec7462dd9ce71a2805437501418f.tar.bz2
gralloc_drm: use pipe as a fallback instead of default
Current implementation prefers gralloc_drm_pipe over gralloc_drm_{driver} while it may be the target solution, for nouveau it causes problems because it is not anymore possible to use gralloc_drm_nouveau whenever there is a driver ( e.g. swrast) in BoardConfig.mk BOARD_GPU_DRIVERS not matching the list of valid drivers in drm_gralloc Android.mk
-rw-r--r--gralloc_drm.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/gralloc_drm.c b/gralloc_drm.c
index 6b3825e..23815bb 100644
--- a/gralloc_drm.c
+++ b/gralloc_drm.c
@@ -68,13 +68,6 @@ init_drv_from_fd(int fd)
}
if (version->name) {
-#ifdef ENABLE_PIPE
- drv = gralloc_drm_drv_create_for_pipe(fd, version->name);
- if (drv) {
- ALOGI("create pipe for driver %s", version->name);
- } else
-#endif
-
#ifdef ENABLE_FREEDRENO
if (!strcmp(version->name, "msm")) {
drv = gralloc_drm_drv_create_for_freedreno(fd);
@@ -99,6 +92,12 @@ init_drv_from_fd(int fd)
ALOGI_IF(drv, "create nouveau for driver nouveau");
} else
#endif
+#ifdef ENABLE_PIPE
+ if (!drv) {
+ drv = gralloc_drm_drv_create_for_pipe(fd, version->name);
+ ALOGI_IF(drv, "create pipe for driver %s", version->name);
+ } else
+#endif
if (!drv) {
ALOGE("unsupported driver: %s", (version->name) ?
version->name : "NULL");