Skip to content

Commit 459485a

Browse files
committed
drm/i915: Fixup dp mst encoder selection
In commit 8c7b5cc Author: Ander Conselvan de Oliveira <[email protected]> Date: Tue Apr 21 17:13:19 2015 +0300 drm/i915: Use atomic helpers for computing changed flags we've switched over to the atomic version to compute the crtc->encoder->connector routing from the i915 variant. That one relies upon the ->best_encoder callback, but the i915-private version relied upon intel_find_encoder. Which didn't matter except for dp mst, where the encoder depends upon the selected crtc. Fix this functional bug by implemented a correct atomic-state based encoder selector for dp mst. Note that we can't get rid of the legacy best_encoder callback since the fbdev emulation uses that still. That means it's incorrect there still, but that's been the case ever since i915 dp mst support was merged so not a regression. Best to fix that by converting fbdev over to atomic too. Cc: Chris Wilson <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Theodore Ts'o <[email protected]> Reviewed-by: Ander Conselvan de Oliveira <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
1 parent 3b8a684 commit 459485a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/gpu/drm/i915/intel_dp_mst.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,16 @@ intel_dp_mst_mode_valid(struct drm_connector *connector,
357357
return MODE_OK;
358358
}
359359

360+
static struct drm_encoder *intel_mst_atomic_best_encoder(struct drm_connector *connector,
361+
struct drm_connector_state *state)
362+
{
363+
struct intel_connector *intel_connector = to_intel_connector(connector);
364+
struct intel_dp *intel_dp = intel_connector->mst_port;
365+
struct intel_crtc *crtc = to_intel_crtc(state->crtc);
366+
367+
return &intel_dp->mst_encoders[crtc->pipe]->base.base;
368+
}
369+
360370
static struct drm_encoder *intel_mst_best_encoder(struct drm_connector *connector)
361371
{
362372
struct intel_connector *intel_connector = to_intel_connector(connector);
@@ -367,6 +377,7 @@ static struct drm_encoder *intel_mst_best_encoder(struct drm_connector *connecto
367377
static const struct drm_connector_helper_funcs intel_dp_mst_connector_helper_funcs = {
368378
.get_modes = intel_dp_mst_get_modes,
369379
.mode_valid = intel_dp_mst_mode_valid,
380+
.atomic_best_encoder = intel_mst_atomic_best_encoder,
370381
.best_encoder = intel_mst_best_encoder,
371382
};
372383

0 commit comments

Comments
 (0)