drm_hwcomposer: Stop using libsync to provide sw_sync wrappers
PATCH 2/3 drm_hwcomposer: Stop using libsync to provide sw_sync wrappers
Use of the sw_sync API is not allowed any more. Until drm_hwcomposer is weaned off of sw_sync, build our own copy.
--- Android.mk | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-)
Android.mk +29 -8
@@ -14,15 +14,38 @@ ifeq ($(strip $(BOARD_USES_DRM_HWCOMPOSER)),true) -LOCAL_PATH := $(call my-dir) +__this_dir := $(call my-dir) + +# ===================== +# libdrmhwc_sync.a +# ===================== +include $(CLEAR_VARS) + +LOCAL_PATH := system/core/libsync + +LOCAL_SRC_FILES := sync.c + +LOCAL_CFLAGS := -Wno-unused-variable + +LOCAL_MODULE := libdrmhwc_sync + +LOCAL_VENDOR_MODULE := true + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/include + +LOCAL_EXPORT_C_INCLUDE_DIRS := \ + $(LOCAL_PATH) $(LOCAL_PATH)/include + +include $(BUILD_STATIC_LIBRARY) # ===================== # libdrmhwc_utils.a # ===================== include $(CLEAR_VARS) -LOCAL_SRC_FILES := \ - worker.cpp +LOCAL_PATH := $(__this_dir) + +LOCAL_SRC_FILES := worker.cpp LOCAL_MODULE := libdrmhwc_utils LOCAL_VENDOR_MODULE := true
@@ -34,6 +57,8 @@ include $(BUILD_STATIC_LIBRARY) # ===================== include $(CLEAR_VARS) +LOCAL_PATH := $(__this_dir) + LOCAL_SHARED_LIBRARIES := \ libcutils \ libdrm \
@@ -41,14 +66,10 @@ LOCAL_SHARED_LIBRARIES := \ libGLESv2 \ libhardware \ liblog \ - libsync \ libui \ libutils -LOCAL_STATIC_LIBRARIES := libdrmhwc_utils - -LOCAL_C_INCLUDES := \ - system/core/libsync +LOCAL_STATIC_LIBRARIES := libdrmhwc_utils libdrmhwc_sync LOCAL_SRC_FILES := \ autolock.cpp \
Signature · 6 lines
2.17.0.441.gb46fe60e1d-goog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Alistair Strachan
Use of the
sw_syncAPI is not allowed any more. Untildrm_hwcomposeris weaned off ofsw_sync, build our own copy.Cc John Stultz <[email protected]>Cc Rob Herring <[email protected]>Cc Sean Paul <[email protected]>Signed-off-by Alistair Strachan <[email protected]>
This patch is particularly important for building drm_hwc with Treble enabled.
thanks
-john
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 2 lines · Alistair Strachan
Use of the
sw_syncAPI is not allowed any more. Untildrm_hwcomposeris weaned off ofsw_sync, build our own copy.
I don't think it is used any longer. AFAICT, with 2 seconds of grep, it's referenced in drmcompositorworker.cpp, virtualcompositorworker.cpp, and hwcomposer.cpp
I think these are all HWC1 legacy files, so they can probably just get cleaned up.
Sean
Quoted 83 lines
Cc John Stultz <[email protected]>Cc Rob Herring <[email protected]>Cc Sean Paul <[email protected]>Signed-off-by Alistair Strachan <[email protected]>--- Android.mk | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-)Android.mk +29
-8@@ -14,15 +14,38 @@ ifeq ($(strip $(BOARD_USES_DRM_HWCOMPOSER)),true) -LOCAL_PATH := $(call my-dir) +__this_dir := $(call my-dir) + +# ===================== +# libdrmhwc_sync.a +# ===================== +include $(CLEAR_VARS) + +LOCAL_PATH := system/core/libsync + +LOCAL_SRC_FILES := sync.c + +LOCAL_CFLAGS := -Wno-unused-variable + +LOCAL_MODULE := libdrmhwc_sync + +LOCAL_VENDOR_MODULE := true + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/include + +LOCAL_EXPORT_C_INCLUDE_DIRS := \ + $(LOCAL_PATH) $(LOCAL_PATH)/include + +include $(BUILD_STATIC_LIBRARY) # ===================== # libdrmhwc_utils.a # ===================== include $(CLEAR_VARS) -LOCAL_SRC_FILES := \ - worker.cpp +LOCAL_PATH := $(__this_dir) + +LOCAL_SRC_FILES := worker.cpp LOCAL_MODULE := libdrmhwc_utils LOCAL_VENDOR_MODULE := true@@ -34,6 +57,8 @@ include $(BUILD_STATIC_LIBRARY) # ===================== include $(CLEAR_VARS) +LOCAL_PATH := $(__this_dir) + LOCAL_SHARED_LIBRARIES := \ libcutils \ libdrm \@@ -41,14 +66,10 @@ LOCAL_SHARED_LIBRARIES := \ libGLESv2 \ libhardware \ liblog \ - libsync \ libui \ libutils -LOCAL_STATIC_LIBRARIES := libdrmhwc_utils - -LOCAL_C_INCLUDES := \ - system/core/libsync +LOCAL_STATIC_LIBRARIES := libdrmhwc_utils libdrmhwc_sync LOCAL_SRC_FILES := \ autolock.cpp \Signature · 1 line
2.17.0.441.gb46fe60e1d-goog
Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 10 lines · Sean Paul
Quoted 2 lines · Alistair Strachan
Use of the
sw_syncAPI is not allowed any more. Untildrm_hwcomposeris weaned off ofsw_sync, build our own copy.I don't think it is used any longer. AFAICT, with 2 seconds of grep, it's referenced in drmcompositorworker.cpp, virtualcompositorworker.cpp, and hwcomposer.cpp
I think these are all HWC1 legacy files, so they can probably just get cleaned up.
Are you sure? Doesn't the GL compositor have to wait on the fences of the input buffers and create new fences for the GL compositing output buffer(s) to pass into the kernel? It looked to me like sw_sync fences are used in the latter case and that needs to be converted to use eglCreateSyncKHR.
Rob
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 9 lines · Rob Herring
Quoted 8 lines · Sean Paul
Quoted 2 lines · Alistair Strachan
Use of the
sw_syncAPI is not allowed any more. Untildrm_hwcomposeris weaned off ofsw_sync, build our own copy.I don't think it is used any longer. AFAICT, with 2 seconds of grep, it's referenced in drmcompositorworker.cpp, virtualcompositorworker.cpp, and hwcomposer.cpp
Quoted 8 lines
Quoted 2 lines
I think these are all HWC1 legacy files, so they can probably just get cleaned up.
Are you sure? Doesn't the GL compositor have to wait on the fences of the input buffers and create new fences for the GL compositing output buffer(s) to pass into the kernel? It looked to me like
sw_syncfences are used in the latter case and that needs to be converted to use eglCreateSyncKHR.
Hmmm, yeah thanks for pointing that out. It does look like drmdisplaycomposition is using sw_sync to handle the GL compositor release fences.
I'm pretty confident that despite the known issues causing GLC to not work on open stacks, there are probably a bunch of unknown issues that have been introduced while we try to tiptoe around it.
If anyone wants to remove it, I'd certainly be interested in reviewing that patch :-). I'd do it myself, but unfortunately the amount of time I have to dedicate to drm_hwc at this point is just enough to perform [incorrect] reviews.
Sean
Quoted 2 lines
Rob
Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 22 lines · Sean Paul
Quoted 9 lines · Rob Herring
Quoted 8 lines · Sean Paul
Quoted 2 lines · Alistair Strachan
Use of the
sw_syncAPI is not allowed any more. Untildrm_hwcomposeris weaned off ofsw_sync, build our own copy.I don't think it is used any longer. AFAICT, with 2 seconds of grep, it's referenced in drmcompositorworker.cpp, virtualcompositorworker.cpp, and hwcomposer.cpp
Quoted 8 lines
Quoted 2 lines
I think these are all HWC1 legacy files, so they can probably just get cleaned up.
Are you sure? Doesn't the GL compositor have to wait on the fences of the input buffers and create new fences for the GL compositing output buffer(s) to pass into the kernel? It looked to me like
sw_syncfences are used in the latter case and that needs to be converted to use eglCreateSyncKHR.Hmmm, yeah thanks for pointing that out. It does look like drmdisplaycomposition is using
sw_syncto handle the GL compositor release fences.
Quoted 8 lines
I'm pretty confident that despite the known issues causing GLC to not work on open stacks, there are probably a bunch of unknown issues that have been introduced while we try to tiptoe around it.
If anyone wants to remove it, I'd certainly be interested in reviewing that patch :-). I'd do it myself, but unfortunately the amount of time I have to dedicate to
drm_hwcat this point is just enough to perform [incorrect] reviews.
Removing GL compositor or sw_sync? I've already written a patch to do the former.
Rob
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 27 lines · Rob Herring
Quoted 26 lines · Sean Paul
Quoted 9 lines · Rob Herring
Quoted 8 lines · Sean Paul
Quoted 2 lines · Alistair Strachan
Use of the
sw_syncAPI is not allowed any more. Untildrm_hwcomposeris weaned off ofsw_sync, build our own copy.I don't think it is used any longer. AFAICT, with 2 seconds of grep, it's referenced in drmcompositorworker.cpp, virtualcompositorworker.cpp, and hwcomposer.cpp
Quoted 8 lines
Quoted 2 lines
I think these are all HWC1 legacy files, so they can probably just get cleaned up.
Are you sure? Doesn't the GL compositor have to wait on the fences of the input buffers and create new fences for the GL compositing output buffer(s) to pass into the kernel? It looked to me like
sw_syncfences are used in the latter case and that needs to be converted to use eglCreateSyncKHR.Hmmm, yeah thanks for pointing that out. It does look like drmdisplaycomposition is using
sw_syncto handle the GL compositor release fences.I'm pretty confident that despite the known issues causing GLC to not work on open stacks, there are probably a bunch of unknown issues that have been introduced while we try to tiptoe around it.
Quoted 7 lines
Quoted 4 lines
If anyone wants to remove it, I'd certainly be interested in reviewing that patch :-). I'd do it myself, but unfortunately the amount of time I have to dedicate to
drm_hwcat this point is just enough to perform [incorrect] reviews.Removing GL compositor or
sw_sync? I've already written a patch to do the former.
Removing GL compositor. Is your patch on the list?
Sean
Quoted 2 lines
Rob
Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 33 lines · Sean Paul
Quoted 32 lines · Rob Herring
Quoted 30 lines · Sean Paul
Quoted 9 lines · Rob Herring
Quoted 8 lines · Sean Paul
Quoted 2 lines · Alistair Strachan
Use of the
sw_syncAPI is not allowed any more. Untildrm_hwcomposeris weaned off ofsw_sync, build our own copy.I don't think it is used any longer. AFAICT, with 2 seconds of grep, it's referenced in drmcompositorworker.cpp, virtualcompositorworker.cpp, and hwcomposer.cpp
Quoted 8 lines
Quoted 2 lines
I think these are all HWC1 legacy files, so they can probably just get cleaned up.
Are you sure? Doesn't the GL compositor have to wait on the fences of the input buffers and create new fences for the GL compositing output buffer(s) to pass into the kernel? It looked to me like
sw_syncfences are used in the latter case and that needs to be converted to use eglCreateSyncKHR.Hmmm, yeah thanks for pointing that out. It does look like drmdisplaycomposition is using
sw_syncto handle the GL compositor release fences.I'm pretty confident that despite the known issues causing GLC to not work on open stacks, there are probably a bunch of unknown issues that have been introduced while we try to tiptoe around it.
If anyone wants to remove it, I'd certainly be interested in reviewing that patch :-). I'd do it myself, but unfortunately the amount of time I have to dedicate to
drm_hwcat this point is just enough to perform [incorrect] reviews.
Quoted 4 lines
Quoted 2 lines
Removing GL compositor or
sw_sync? I've already written a patch to do the former.Removing GL compositor. Is your patch on the list?
No, I never got around to discussing it. I somewhat figured you would not be in favor of that.
I'll need to rebase it as it's about 3 months old now.
Rob
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 34 lines · Rob Herring
Quoted 33 lines · Sean Paul
Quoted 32 lines · Rob Herring
Quoted 30 lines · Sean Paul
Quoted 9 lines · Rob Herring
Quoted 8 lines · Sean Paul
Quoted 2 lines · Alistair Strachan
Use of the
sw_syncAPI is not allowed any more. Untildrm_hwcomposeris weaned off ofsw_sync, build our own copy.I don't think it is used any longer. AFAICT, with 2 seconds of grep, it's referenced in drmcompositorworker.cpp, virtualcompositorworker.cpp, and hwcomposer.cpp
Quoted 8 lines
Quoted 2 lines
I think these are all HWC1 legacy files, so they can probably just get cleaned up.
Are you sure? Doesn't the GL compositor have to wait on the fences of the input buffers and create new fences for the GL compositing output buffer(s) to pass into the kernel? It looked to me like
sw_syncfences are used in the latter case and that needs to be converted to use eglCreateSyncKHR.Hmmm, yeah thanks for pointing that out. It does look like drmdisplaycomposition is using
sw_syncto handle the GL compositor release fences.I'm pretty confident that despite the known issues causing GLC to not work on open stacks, there are probably a bunch of unknown issues that have been introduced while we try to tiptoe around it.
If anyone wants to remove it, I'd certainly be interested in reviewing that patch :-). I'd do it myself, but unfortunately the amount of time I have to dedicate to
drm_hwcat this point is just enough to perform [incorrect] reviews.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Removing GL compositor or
sw_sync? I've already written a patch to do the former.Removing GL compositor. Is your patch on the list?
No, I never got around to discussing it. I somewhat figured you would not be in favor of that.
The writeback series definitely helped sway my opinion. I would really like to have our own super-spiffy GL compositor, since it was a net gain for us. However, in its current state, it's just bringing us down.
Quoted 1 line
I'll need to rebase it as it's about 3 months old now.
Cool! I'm relieved I didn't miss it :-)
Sean
Quoted 2 lines
Rob
Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel