aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>2018-07-13 11:11:00 -0400
committerLiviu Dudau <Liviu.Dudau@arm.com>2018-07-23 10:42:17 -0400
commit2e012e76ad59edb4a5a175c0957a44337dc39d87 (patch)
tree5c48f8811a44a05b6d7efee859d9c87f6066439c /drivers/gpu
parent7749a57a285342ff5664c80236a63c7fa53cbdfc (diff)
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')
-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)
616 struct malidp_hw_device *hwdev; 616 struct malidp_hw_device *hwdev;
617 struct platform_device *pdev = to_platform_device(dev); 617 struct platform_device *pdev = to_platform_device(dev);
618 struct of_device_id const *dev_id; 618 struct of_device_id const *dev_id;
619 struct drm_encoder *encoder;
619 /* number of lines for the R, G and B output */ 620 /* number of lines for the R, G and B output */
620 u8 output_width[MAX_OUTPUT_CHANNELS]; 621 u8 output_width[MAX_OUTPUT_CHANNELS];
621 int ret = 0, i; 622 int ret = 0, i;
@@ -737,6 +738,15 @@ static int malidp_bind(struct device *dev)
737 goto bind_fail; 738 goto bind_fail;
738 } 739 }
739 740
741 /* We expect to have a maximum of two encoders one for the actual
742 * display and a virtual one for the writeback connector
743 */
744 WARN_ON(drm->mode_config.num_encoder > 2);
745 list_for_each_entry(encoder, &drm->mode_config.encoder_list, head) {
746 encoder->possible_clones =
747 (1 << drm->mode_config.num_encoder) - 1;
748 }
749
740 ret = malidp_irq_init(pdev); 750 ret = malidp_irq_init(pdev);
741 if (ret < 0) 751 if (ret < 0)
742 goto irq_init_fail; 752 goto irq_init_fail;