summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Wei Huang <cwhuang@linux.org.tw>2015-01-01 16:21:46 +0800
committerChih-Wei Huang <cwhuang@linux.org.tw>2015-01-01 16:21:46 +0800
commit00ba5a9ddd04b44cebf2bbd6014da57f06413d5e (patch)
tree58a24e8e6cc6e0769e37e924d7bdb0c1f2c7a9c6
parent7161569c26f65d01104a6ce29f47f2f10c7c4162 (diff)
downloadexternal_drm_gralloc-00ba5a9ddd04b44cebf2bbd6014da57f06413d5e.zip
external_drm_gralloc-00ba5a9ddd04b44cebf2bbd6014da57f06413d5e.tar.gz
external_drm_gralloc-00ba5a9ddd04b44cebf2bbd6014da57f06413d5e.tar.bz2
gralloc_drm: improve log
-rw-r--r--gralloc_drm.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/gralloc_drm.c b/gralloc_drm.c
index bd38d57..bd752cb 100644
--- a/gralloc_drm.c
+++ b/gralloc_drm.c
@@ -70,26 +70,31 @@ init_drv_from_fd(int fd)
if (version->name) {
#ifdef ENABLE_PIPE
drv = gralloc_drm_drv_create_for_pipe(fd, version->name);
+ ALOGI_IF(drv, "create pipe for driver %s", version->name);
#endif
#ifdef ENABLE_INTEL
- if (!drv && !strcmp(version->name, "i915"))
+ if (!drv && !strcmp(version->name, "i915")) {
drv = gralloc_drm_drv_create_for_intel(fd);
+ ALOGI_IF(drv, "create intel for driver i915");
+ }
#endif
#ifdef ENABLE_RADEON
- if (!drv && !strcmp(version->name, "radeon"))
+ if (!drv && !strcmp(version->name, "radeon")) {
drv = gralloc_drm_drv_create_for_radeon(fd);
+ ALOGI_IF(drv, "create radeon for driver radeon");
+ }
#endif
#ifdef ENABLE_NOUVEAU
- if (!drv && !strcmp(version->name, "nouveau"))
+ if (!drv && !strcmp(version->name, "nouveau")) {
drv = gralloc_drm_drv_create_for_nouveau(fd);
+ ALOGI_IF(drv, "create nouveau for driver nouveau");
+ }
#endif
}
- if (!drv) {
- ALOGE("unsupported driver: %s", (version->name) ?
- version->name : "NULL");
- }
+ ALOGE_IF(!drv, "unsupported driver: %s", (version->name) ?
+ version->name : "NULL");
drmFreeVersion(version);