Skip to contentSkip to conversation

drm_hwcomposer: fix check for valid fence fd for in fences

PATCH In review Rob Herring 2 participants 2 messages Feb 13, 2018 – Feb 14, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm_hwcomposer: fix check for valid fence fd for in fences

The check for a valid fence fd is inverted, so we're failing to pass IN_FENCE_FD's to the kernel when we have a valid fence.

---
 drmdisplaycompositor.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drmdisplaycompositor.cpp +1 -1
index 3a20b31dec99..e556e8641d79 100644
@@ -589,7 +589,7 @@ int DrmDisplayCompositor::CommitFrame(DrmDisplayComposition *display_comp,
       else
         rotation |= DRM_MODE_ROTATE_0;
 
-      if (fence_fd < 0) {
+      if (fence_fd >= 0) {
         int prop_id = plane->in_fence_fd_property().id();
         if (prop_id == 0) {
                 ALOGE("Failed to get IN_FENCE_FD property id");
Signature · 6 lines
2.14.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw

Hey Rob,

This looks good to me, feel free to add my r-b.

Rob.

Quoted 15 lines · Rob Herring

The check for a valid fence fd is inverted, so we're failing to pass IN_FENCE_FD's to the kernel when we have a valid fence.

---
  drmdisplaycompositor.cpp | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drmdisplaycompositor.cpp +0 -0
index 3a20b31dec99..e556e8641d79 100644

drmdisplaycompositor.cpp int DrmDisplayCompositor::CommitFrame(DrmDisplayComposition *display_comp, · line 595

Quoted 8 lines
drmdisplaycompositor.cpp +1 -1
@@ -589,7 +589,7 @@ int DrmDisplayCompositor::CommitFrame(DrmDisplayComposition *display_comp,
        else
          rotation |= DRM_MODE_ROTATE_0;
 
-      if (fence_fd < 0) {
+      if (fence_fd >= 0) {
          int prop_id = plane->in_fence_fd_property().id();
          if (prop_id == 0) {
                  ALOGE("Failed to get IN_FENCE_FD property id");

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel