From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3.1 1/3] drm/i915: Fix broken mst get_hw_state.
Date: Thu, 6 Aug 2015 15:37:08 +0200 [thread overview]
Message-ID: <55C36304.6060305@linux.intel.com> (raw)
In-Reply-To: <20150806125924.GL17734@phenom.ffwll.local>
Op 06-08-15 om 14:59 schreef Daniel Vetter:
> On Thu, Aug 06, 2015 at 01:47:35PM +0200, Maarten Lankhorst wrote:
>> This function always returned false because intel_connector->encoder
>> is always NULL. Instead use the attached encoder from atomic.
> Note that you've broken this since you removed the updating of
> intel_connector->encoder somewhere in the 4.3 atomic series. So this is a
> regression fix. Can you please digg out the right commit?
Looks like 'Use full atomic modeset' broke it. intel_connector->encoder was updated in its set_config function..
Would below amend for this commit be good?
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
index ee2a77144373..671715ba8538 100644
--- a/drivers/gpu/drm/i915/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/intel_dp_mst.c
@@ -173,6 +173,11 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder)
return;
}
+ /* MST encoders are bound to a crtc, not to a connector,
+ * force the mapping here for get_hw_state.
+ */
+ found->encoder = encoder;
+
DRM_DEBUG_KMS("%d\n", intel_dp->active_mst_links);
intel_mst->port = found->port;
And corresponding amendment to the convert connector to atomic..
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index a6617283b1bd..90caa62cf2c3 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6313,7 +6313,7 @@ static void intel_connector_check_state(struct intel_connector *connector)
I915_STATE_WARN(!crtc->state->active,
"connector is active, but attached crtc isn't\n");
- if (!encoder)
+ if (!encoder || encoder->type == INTEL_OUTPUT_DP_MST)
return;
I915_STATE_WARN(conn_state->best_encoder != encoder,
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_dp_mst.c | 7 +++++--
>> 1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
>> index e3a5864160fa..ff01569158ea 100644
>> --- a/drivers/gpu/drm/i915/intel_dp_mst.c
>> +++ b/drivers/gpu/drm/i915/intel_dp_mst.c
>> @@ -395,9 +395,12 @@ static const struct drm_encoder_funcs intel_dp_mst_enc_funcs = {
>>
>> static bool intel_dp_mst_get_hw_state(struct intel_connector *connector)
>> {
>> - if (connector->encoder) {
>> + struct intel_encoder *encoder;
>> +
>> + encoder = to_intel_encoder(connector->base.state->best_encoder);
> Strictly speaking this won't work for hw state readout since what we
> really need to do is ask the mst connector which mst stream it accepts and
> then compare that with all the mst encoders ...
It's good enough to make sure the encoder callbacks did run.
> But that's been broken since forever. Only side-effect here is that
> fastboot won't work with mst and that's imo totally ok. Please also add
> this to your commit message.
HW readout runs before mst probing, so you wouldn't get the mst connectors anyway with fastboot. Not sure it needs a fixme. :-)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-08-06 13:37 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-05 10:36 [PATCH v3 00/13] DPMS updates and atomic state checking Maarten Lankhorst
2015-08-05 10:36 ` [PATCH v3 01/13] drm/i915: Make the force_thru workaround atomic, v2 Maarten Lankhorst
2015-08-05 14:03 ` Daniel Vetter
2015-08-05 10:37 ` [PATCH v3 02/13] drm/i915: Validate the state after an atomic modeset only, and pass the state Maarten Lankhorst
2015-08-05 10:37 ` [PATCH v3 03/13] drm/i915: Update atomic state when removing mst connector Maarten Lankhorst
2015-08-06 11:47 ` [PATCH v3.1 1/3] drm/i915: Fix broken mst get_hw_state Maarten Lankhorst
2015-08-06 11:47 ` [PATCH v3.1 2/3] drm/i915: Update atomic state when removing mst connector, v3 Maarten Lankhorst
2015-08-06 12:30 ` Sivakumar Thulasimani
2015-08-06 11:47 ` [PATCH v3.1 3/3] drm/i915: Don't try to remove MST cleanly when force removed Maarten Lankhorst
2015-08-06 13:01 ` Daniel Vetter
2015-08-06 13:51 ` Maarten Lankhorst
2015-08-06 15:45 ` Daniel Vetter
2015-08-06 12:59 ` [PATCH v3.1 1/3] drm/i915: Fix broken mst get_hw_state Daniel Vetter
2015-08-06 13:37 ` Maarten Lankhorst [this message]
2015-08-06 15:58 ` Daniel Vetter
2015-08-05 10:37 ` [PATCH v3 04/13] drm/i915: Convert connector checking to atomic, v2 Maarten Lankhorst
2015-08-06 11:49 ` [PATCH v3.1 04/13] drm/i915: Convert connector checking to atomic, v3 Maarten Lankhorst
2015-08-05 10:37 ` [PATCH v3 05/13] drm/i915: Remove some unneeded checks from check_crtc_state Maarten Lankhorst
2015-08-05 10:37 ` [PATCH v3 06/13] drm/i915: Remove connectors_active from state checking Maarten Lankhorst
2015-08-05 10:37 ` [PATCH v3 07/13] drm/i915: Make crtc checking use the atomic state, v2 Maarten Lankhorst
2015-08-05 10:37 ` [PATCH v3 08/13] drm/i915: Get rid of dpms handling Maarten Lankhorst
2015-08-05 10:37 ` [PATCH v3 09/13] drm/i915: Remove connectors_active from sanitization, v2 Maarten Lankhorst
2015-08-05 10:37 ` [PATCH v3 10/13] drm/i915: Remove connectors_active from intel_dp.c, v2 Maarten Lankhorst
2015-08-05 10:37 ` [PATCH v3 11/13] drm/i915: Remove connectors_active Maarten Lankhorst
2015-08-05 10:37 ` [PATCH v3 12/13] drm/i915: Only update mode related state if a modeset happened Maarten Lankhorst
2015-08-06 13:12 ` Daniel Vetter
2015-08-06 14:06 ` Maarten Lankhorst
2015-08-06 16:01 ` Daniel Vetter
2015-08-05 10:37 ` [PATCH v3 13/13] drm/i915: Handle return value in intel_pin_and_fence_fb_obj, v2 Maarten Lankhorst
2015-08-11 22:17 ` shuang.he
2015-08-06 13:13 ` [PATCH v3 00/13] DPMS updates and atomic state checking Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55C36304.6060305@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox