drm_hwcomposer: Introduce DrmDisplayPipeline class
Create systematic way of binding DRM objects (Crtc,Encoder,Planes...)
to the pipeline using RAII. Use it to create the pipeline.
+ Allow pipeline creation to fail.
Closes: https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/issues/14
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
diff --git a/drm/DrmEncoder.h b/drm/DrmEncoder.h
index e66d6f1..39a695c 100644
--- a/drm/DrmEncoder.h
+++ b/drm/DrmEncoder.h
@@ -24,10 +24,11 @@
#include <vector>
#include "DrmCrtc.h"
+#include "DrmDisplayPipeline.h"
namespace android {
-class DrmEncoder {
+class DrmEncoder : public PipelineBindable<DrmEncoder> {
public:
static auto CreateInstance(DrmDevice &dev, uint32_t encoder_id,
uint32_t index) -> std::unique_ptr<DrmEncoder>;