summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/arm
diff options
context:
space:
mode:
authorAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>2018-07-13 18:11:00 +0300
committerLiviu Dudau <Liviu.Dudau@arm.com>2018-07-23 17:42:17 +0300
commit2e012e76ad59edb4a5a175c0957a44337dc39d87 (patch)
tree5c48f8811a44a05b6d7efee859d9c87f6066439c /drivers/gpu/drm/arm
parent7749a57a285342ff5664c80236a63c7fa53cbdfc (diff)
downloadlinux-2e012e76ad59edb4a5a175c0957a44337dc39d87.tar.xz
drm: mali-dp: Set encoder possible_clones
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@arm.com> Acked-by: Liviu Dudau <liviu.dudau@arm.com> Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Diffstat (limited to 'drivers/gpu/drm/arm')
-rw-r--r--drivers/gpu/drm/arm/malidp_drv.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c
index 5b7260557391..08b5bb219816 100644
--- a/drivers/gpu/drm/arm/malidp_drv.c
+++ b/drivers/gpu/drm/arm/malidp_drv.c
@@ -616,6 +616,7 @@ 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;
/* number of lines for the R, G and B output */
u8 output_width[MAX_OUTPUT_CHANNELS];
int ret = 0, i;
@@ -737,6 +738,15 @@ static int malidp_bind(struct device *dev)
goto bind_fail;
}
+ /* We expect to have a maximum of two encoders one for the actual
+ * display and a virtual one for the writeback connector
+ */
+ WARN_ON(drm->mode_config.num_encoder > 2);
+ list_for_each_entry(encoder, &drm->mode_config.encoder_list, head) {
+ encoder->possible_clones =
+ (1 << drm->mode_config.num_encoder) - 1;
+ }
+
ret = malidp_irq_init(pdev);
if (ret < 0)
goto irq_init_fail;