drm_hwcomposer: Avoid filling the log with warnings when test compositions fail
We frequently test compositions that might fail due to various
reasons. On db820 we see:
W HwcComposer: command 0x4010000 generated error 8
E hwc-drm-display-compositor: Alpha is not supported on plane 29
E hwc-drm-two: Failed to apply the frame composition ret=-22
over and over
So to avoid filling the log with errors when those test
compsitions don't work out, this patch tries to quiet down those
error messages when we are doing test compositions.
Change-Id: Iab19628bd7488c7d104e2c775310989bb59e140d
Signed-off-by: John Stultz <john.stultz@linaro.org>
diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp
index defede6..e7e0694 100644
--- a/drmdisplaycompositor.cpp
+++ b/drmdisplaycompositor.cpp
@@ -277,14 +277,14 @@
// TODO: Once we have atomic test, this should fall back to GL
if (rotation != DRM_MODE_ROTATE_0 && plane->rotation_property().id() == 0) {
- ALOGE("Rotation is not supported on plane %d", plane->id());
+ ALOGV("Rotation is not supported on plane %d", plane->id());
ret = -EINVAL;
break;
}
// TODO: Once we have atomic test, this should fall back to GL
if (alpha != 0xFFFF && plane->alpha_property().id() == 0) {
- ALOGE("Alpha is not supported on plane %d", plane->id());
+ ALOGV("Alpha is not supported on plane %d", plane->id());
ret = -EINVAL;
break;
}
@@ -352,9 +352,7 @@
ret = drmModeAtomicCommit(drm_->fd(), pset, flags, drm_);
if (ret) {
- if (test_only)
- ALOGI("Commit test pset failed ret=%d\n", ret);
- else
+ if (!test_only)
ALOGE("Failed to commit pset ret=%d\n", ret);
drmModeAtomicFree(pset);
return ret;