Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e012e76 authored by Alexandru Gheorghe's avatar Alexandru Gheorghe Committed by Liviu Dudau
Browse files

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: default avatarAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Acked-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
parent 7749a57a
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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;