From 39d8f7e1934b40dc84e784f2ab2f637f1a6202bb Mon Sep 17 00:00:00 2001 From: Roman Stratiienko Date: Tue, 30 Nov 2021 17:06:44 +0200 Subject: drm_hwcomposer: Validate gralloc0 name for minigbm and libdrm getters Using of incorrect gralloc0 results in a runtime issues, with logs like "Cannot convert hal format to drm format " or other. Validate gralloc name and exit gracefully in case it doesnt't match the one we are expecting. Signed-off-by: Roman Stratiienko --- bufferinfo/legacy/BufferInfoLibdrm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'bufferinfo/legacy/BufferInfoLibdrm.h') diff --git a/bufferinfo/legacy/BufferInfoLibdrm.h b/bufferinfo/legacy/BufferInfoLibdrm.h index 4d37d00..cad8add 100644 --- a/bufferinfo/legacy/BufferInfoLibdrm.h +++ b/bufferinfo/legacy/BufferInfoLibdrm.h @@ -27,6 +27,7 @@ class BufferInfoLibdrm : public LegacyBufferInfoGetter { public: using LegacyBufferInfoGetter::LegacyBufferInfoGetter; int ConvertBoInfo(buffer_handle_t handle, hwc_drm_bo_t *bo) override; + int ValidateGralloc() override; private: bool GetYuvPlaneInfo(int num_fds, buffer_handle_t handle, hwc_drm_bo_t *bo); -- cgit v1.2.3