drm_hwcomposer: Add platform backend for minigbm
PATCH 3/3 drm_hwcomposer: Add platform backend for minigbm
This adds support for the chromiumos (not AOSP) version of minigbm. Like hisi, the gralloc handle is not the same as the common libdrm handle (just yet), so we do need a separate backend.
Tested with a pending change to the 'cuttlefish' android virtual device in AOSP with its custom gralloc switched to minigbm.
--- Android.mk | 8 +-- platformminigbm.cpp | 122 ++++++++++++++++++++++++++++++++++++++++++++ platformminigbm.h | 46 +++++++++++++++++ 3 files changed, 173 insertions(+), 3 deletions(-) create mode 100644 platformminigbm.cpp create mode 100644 platformminigbm.h
Android.mk +5 -3
@@ -101,14 +101,16 @@ ifeq ($(TARGET_PRODUCT),hikey960) LOCAL_CPPFLAGS += -DUSE_HISI_IMPORTER LOCAL_SRC_FILES += platformhisi.cpp LOCAL_C_INCLUDES += device/linaro/hikey/gralloc960/ -else -ifeq ($(TARGET_PRODUCT),hikey) +else ifeq ($(TARGET_PRODUCT),hikey) LOCAL_CPPFLAGS += -DUSE_HISI_IMPORTER LOCAL_SRC_FILES += platformhisi.cpp LOCAL_C_INCLUDES += device/linaro/hikey/gralloc/ +else ifeq ($(strip $(BOARD_DRM_HWCOMPOSER_BUFFER_IMPORTER)),minigbm) +LOCAL_SRC_FILES += platformminigbm.cpp +LOCAL_C_INCLUDES += external/minigbm/cros_gralloc/ else LOCAL_CPPFLAGS += -DUSE_DRM_GENERIC_IMPORTER -endif +LOCAL_C_INCLUDES += external/drm_gralloc endif LOCAL_MODULE := hwcomposer.drm
platformminigbm.cpp new file +122 -0
122 lines not on this page · raw message
platformminigbm.h new file +46 -0
46 lines not on this page · raw message
Signature · 6 lines
2.17.0.441.gb46fe60e1d-goog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 3/3 drm_hwcomposer: Add platform backend for minigbm
This adds support for the chromiumos (not AOSP) version of minigbm. Like hisi, the gralloc handle is not the same as the common libdrm handle (just yet), so we do need a separate backend for now.
Tested with a pending change to the 'cuttlefish' android virtual device in AOSP with its custom gralloc switched to minigbm.
---
v2: Removed re-introduction of <external/drm_gralloc>
Android.mk | 7 +-- platformminigbm.cpp | 122 ++++++++++++++++++++++++++++++++++++++++++++ platformminigbm.h | 46 +++++++++++++++++ 3 files changed, 172 insertions(+), 3 deletions(-) create mode 100644 platformminigbm.cpp create mode 100644 platformminigbm.h
Android.mk +4 -3
@@ -101,15 +101,16 @@ ifeq ($(TARGET_PRODUCT),hikey960) LOCAL_CPPFLAGS += -DUSE_HISI_IMPORTER LOCAL_SRC_FILES += platformhisi.cpp LOCAL_C_INCLUDES += device/linaro/hikey/gralloc960/ -else -ifeq ($(TARGET_PRODUCT),hikey) +else ifeq ($(TARGET_PRODUCT),hikey) LOCAL_CPPFLAGS += -DUSE_HISI_IMPORTER LOCAL_SRC_FILES += platformhisi.cpp LOCAL_C_INCLUDES += device/linaro/hikey/gralloc/ +else ifeq ($(strip $(BOARD_DRM_HWCOMPOSER_BUFFER_IMPORTER)),minigbm) +LOCAL_SRC_FILES += platformminigbm.cpp +LOCAL_C_INCLUDES += external/minigbm/cros_gralloc/ else LOCAL_CPPFLAGS += -DUSE_DRM_GENERIC_IMPORTER endif -endif LOCAL_MODULE := hwcomposer.drm LOCAL_MODULE_TAGS := optional
platformminigbm.cpp new file +122 -0
122 lines not on this page · raw message
platformminigbm.h new file +46 -0
46 lines not on this page · raw message
Signature · 6 lines
2.17.0.441.gb46fe60e1d-goog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 29 lines · Alistair Strachan
This adds support for the chromiumos (not AOSP) version of minigbm. Like hisi, the gralloc handle is not the same as the common libdrm handle (just yet), so we do need a separate backend for now.
Tested with a pending change to the 'cuttlefish' android virtual device in AOSP with its custom gralloc switched to minigbm.
Cc John Stultz <[email protected]>Cc Rob Herring <[email protected]>Cc Sean Paul <[email protected]>Cc Greg Hartman <[email protected]>Signed-off-by Alistair Strachan <[email protected]>---
v2: Removed re-introduction of <external/drm_gralloc>Android.mk | 7 +-- platformminigbm.cpp | 122 ++++++++++++++++++++++++++++++++++++++++++++ platformminigbm.h | 46 +++++++++++++++++ 3 files changed, 172 insertions(+), 3 deletions(-) create mode 100644 platformminigbm.cpp create mode 100644 platformminigbm.hAndroid.mk +0
-0@@ -101,15 +101,16 @@ ifeq ($(TARGET_PRODUCT),hikey960) LOCAL_CPPFLAGS += -DUSE_HISI_IMPORTER LOCAL_SRC_FILES += platformhisi.cpp
Android.mk ifeq ($(TARGET_PRODUCT),hikey960) · line 110
Quoted 10 lines
Android.mk +4
-2LOCAL_C_INCLUDES += device/linaro/hikey/gralloc960/ -else -ifeq ($(TARGET_PRODUCT),hikey) +else ifeq ($(TARGET_PRODUCT),hikey) LOCAL_CPPFLAGS += -DUSE_HISI_IMPORTER LOCAL_SRC_FILES += platformhisi.cpp LOCAL_C_INCLUDES += device/linaro/hikey/gralloc/ +else ifeq ($(strip $(BOARD_DRM_HWCOMPOSER_BUFFER_IMPORTER)),minigbm) +LOCAL_SRC_FILES += platformminigbm.cpp +LOCAL_C_INCLUDES += external/minigbm/cros_gralloc/
So, I'm not seeing external/minigbm in the manifest file yet, so I'm not sure much testing of this bit in-particular can be done, but otherwise I don't see anything to object to.
I did apply your entire series here (including the separate cleanups) and did validate it all works ok with HiKey960 (sans Treble - I'm currently rebuilding w/ Treble now so that's ~an hour out).
thanks
-john
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
John Stultz
Tested-byQuoted 45 lines · John Stultz
Quoted 29 lines · Alistair Strachan
This adds support for the chromiumos (not AOSP) version of minigbm. Like hisi, the gralloc handle is not the same as the common libdrm handle (just yet), so we do need a separate backend for now.
Tested with a pending change to the 'cuttlefish' android virtual device in AOSP with its custom gralloc switched to minigbm.
Cc John Stultz <[email protected]>Cc Rob Herring <[email protected]>Cc Sean Paul <[email protected]>Cc Greg Hartman <[email protected]>Signed-off-by Alistair Strachan <[email protected]>---
v2: Removed re-introduction of <external/drm_gralloc>Android.mk | 7 +-- platformminigbm.cpp | 122 ++++++++++++++++++++++++++++++++++++++++++++ platformminigbm.h | 46 +++++++++++++++++ 3 files changed, 172 insertions(+), 3 deletions(-) create mode 100644 platformminigbm.cpp create mode 100644 platformminigbm.hAndroid.mk +0
-0@@ -101,15 +101,16 @@ ifeq ($(TARGET_PRODUCT),hikey960) LOCAL_CPPFLAGS += -DUSE_HISI_IMPORTER LOCAL_SRC_FILES += platformhisi.cppAndroid.mk ifeq ($(TARGET_PRODUCT),hikey960) · line 110
Quoted 10 lines
Android.mk +4
-2LOCAL_C_INCLUDES += device/linaro/hikey/gralloc960/ -else -ifeq ($(TARGET_PRODUCT),hikey) +else ifeq ($(TARGET_PRODUCT),hikey) LOCAL_CPPFLAGS += -DUSE_HISI_IMPORTER LOCAL_SRC_FILES += platformhisi.cpp LOCAL_C_INCLUDES += device/linaro/hikey/gralloc/ +else ifeq ($(strip $(BOARD_DRM_HWCOMPOSER_BUFFER_IMPORTER)),minigbm) +LOCAL_SRC_FILES += platformminigbm.cpp +LOCAL_C_INCLUDES += external/minigbm/cros_gralloc/So, I'm not seeing external/minigbm in the manifest file yet, so I'm not sure much testing of this bit in-particular can be done, but otherwise I don't see anything to object to.
Quoted 3 lines
I did apply your entire series here (including the separate cleanups) and did validate it all works ok with HiKey960 (sans Treble - I'm currently rebuilding w/ Treble now so that's ~an hour out).
Just finished building and its looking good on HiKey960.
So for the whole series:
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel