[PATCH] drm: mali-dp: Set encoder possible_clones
Alexandru Gheorghe
alexandru-cosmin.gheorghe at arm.com
Thu Jul 12 08:48:56 UTC 2018
Set possible_clones field to report that the writeback connector and
the one driving the display could be enabled at the same time.
Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe at arm.com>
---
drivers/gpu/drm/arm/malidp_drv.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c
index 5b72605..3664da9 100644
--- a/drivers/gpu/drm/arm/malidp_drv.c
+++ b/drivers/gpu/drm/arm/malidp_drv.c
@@ -616,6 +616,8 @@ static int malidp_bind(struct device *dev)
struct malidp_hw_device *hwdev;
struct platform_device *pdev = to_platform_device(dev);
struct of_device_id const *dev_id;
+ struct drm_encoder *encoder;
+ int num_encoders = 0;
/* number of lines for the R, G and B output */
u8 output_width[MAX_OUTPUT_CHANNELS];
int ret = 0, i;
@@ -737,6 +739,14 @@ static int malidp_bind(struct device *dev)
goto bind_fail;
}
+ list_for_each_entry(encoder, &drm->mode_config.encoder_list, head) {
+ num_encoders++;
+ }
+
+ list_for_each_entry(encoder, &drm->mode_config.encoder_list, head) {
+ encoder->possible_clones = (1 << num_encoders) - 1;
+ }
+
ret = malidp_irq_init(pdev);
if (ret < 0)
goto irq_init_fail;
--
2.7.4
More information about the dri-devel
mailing list