summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2018-05-24 16:43:35 -0700
committerJohn Stultz <john.stultz@linaro.org>2018-06-21 13:53:23 -0700
commit78c9f6c26210423926ea027edfab0b9504c2d7ff (patch)
treec8d517248ae2761b34b8e912ec363b02954f657b
parentdf35a81f49c9c0ed4fa9e2f00b1b99ccd36a8407 (diff)
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>
-rw-r--r--drmdisplaycompositor.cpp8
-rw-r--r--drmhwctwo.cpp3
2 files changed, 5 insertions, 6 deletions
diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp
index defede6..e7e0694 100644
--- a/drmdisplaycompositor.cpp
+++ b/drmdisplaycompositor.cpp
@@ -277,14 +277,14 @@ int DrmDisplayCompositor::CommitFrame(DrmDisplayComposition *display_comp,
// 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 @@ int DrmDisplayCompositor::CommitFrame(DrmDisplayComposition *display_comp,
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;
diff --git a/drmhwctwo.cpp b/drmhwctwo.cpp
index 21309ec..6bab17b 100644
--- a/drmhwctwo.cpp
+++ b/drmhwctwo.cpp
@@ -553,7 +553,8 @@ HWC2::Error DrmHwcTwo::HwcDisplay::CreateComposition(bool test) {
ret = compositor_.ApplyComposition(std::move(composition));
}
if (ret) {
- ALOGE("Failed to apply the frame composition ret=%d", ret);
+ if (!test)
+ ALOGE("Failed to apply the frame composition ret=%d", ret);
return HWC2::Error::BadParameter;
}
return HWC2::Error::None;