drm_hwcomposer: Add Imagination platform support
External Android.bp file should be created in order to build this module:
```
cc_library_shared {
name: "hwcomposer.drm_imagination",
defaults: ["hwcomposer.drm_defaults"],
srcs: [":drm_hwcomposer_platformimagination"],
whole_static_libs: ["drm_hwcomposer"],
shared_libs: ["libion"],
include_dirs: [
"path/to/imgtec/include/files",
],
}
```
libion is needed to make ion.h header visible `linux/ion.h`.
Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
diff --git a/platform/platformimagination.h b/platform/platformimagination.h
new file mode 100644
index 0000000..85dfc45
--- /dev/null
+++ b/platform/platformimagination.h
@@ -0,0 +1,22 @@
+#ifndef PLATFORMIMAGINATION_H
+#define PLATFORMIMAGINATION_H
+
+#include "drmdevice.h"
+#include "platform.h"
+#include "platformdrmgeneric.h"
+
+#include <stdatomic.h>
+
+#include <hardware/gralloc.h>
+
+namespace android {
+
+class ImaginationImporter : public DrmGenericImporter {
+ public:
+ using DrmGenericImporter::DrmGenericImporter;
+
+ int ImportBuffer(buffer_handle_t handle, hwc_drm_bo_t *bo) override;
+};
+} // namespace android
+
+#endif // PLATFORMIMAGINATION_H