From: Jani Nikula <jani.nikula@linux.intel.com>
To: ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org
Cc: stable@vger.kernel.org,
Ander Conselvan de Oliveira
<ander.conselvan.de.oliveira@intel.com>
Subject: Re: [PATCH v2] drm/i915: Unbreak check_digital_port_conflicts()
Date: Tue, 22 Dec 2015 14:29:55 +0200 [thread overview]
Message-ID: <87egee64zg.fsf@intel.com> (raw)
In-Reply-To: <1449764551-12466-1-git-send-email-ville.syrjala@linux.intel.com>
On Thu, 10 Dec 2015, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Atomic changes broke check_digital_port_conflicts(). It needs to look
> at the global situation instead of just trying to find a conflict
> within the current atomic state.
>
> This bug made my HSW explode spectacularly after I had split the DDI
> encoders into separate DP and HDMI encoders. With the fix, things
> seem much more solid.
>
> I hope holding the connection_mutex is enough protection that we can
> actually walk the connectors even if they're not part of the current
> atomic state...
>
> v2: Regenerate the patch so that it actually applies (Jani)
>
> Cc: stable@vger.kernel.org
> Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> Fixes: 5448a00d3f06 ("drm/i915: Don't use staged config in check_digital_port_conflicts()")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Pushed to drm-intel-next-queued, thanks for the patch and review.
BR,
Jani.
> ---
> drivers/gpu/drm/i915/intel_display.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 930661de11ff..10974424bdfa 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -12260,18 +12260,22 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc,
> static bool check_digital_port_conflicts(struct drm_atomic_state *state)
> {
> struct drm_device *dev = state->dev;
> - struct intel_encoder *encoder;
> struct drm_connector *connector;
> - struct drm_connector_state *connector_state;
> unsigned int used_ports = 0;
> - int i;
>
> /*
> * Walk the connector list instead of the encoder
> * list to detect the problem on ddi platforms
> * where there's just one encoder per digital port.
> */
> - for_each_connector_in_state(state, connector, connector_state, i) {
> + drm_for_each_connector(connector, dev) {
> + struct drm_connector_state *connector_state;
> + struct intel_encoder *encoder;
> +
> + connector_state = drm_atomic_get_existing_connector_state(state, connector);
> + if (!connector_state)
> + connector_state = connector->state;
> +
> if (!connector_state->best_encoder)
> continue;
--
Jani Nikula, Intel Open Source Technology Center
prev parent reply other threads:[~2015-12-22 12:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-07 21:13 [PATCH] drm/i915: Unbreak check_digital_port_conflicts() ville.syrjala
2015-12-10 9:52 ` Daniel Vetter
2015-12-10 11:39 ` Jani Nikula
2015-12-10 13:19 ` Ville Syrjälä
2015-12-10 16:22 ` [PATCH v2] " ville.syrjala
2015-12-22 12:29 ` Jani Nikula [this message]
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=87egee64zg.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=ander.conselvan.de.oliveira@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=stable@vger.kernel.org \
--cc=ville.syrjala@linux.intel.com \
/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