public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 4/6] drm/i915: Make intel_get_pipe_from_connector atomic
Date: Wed, 21 Dec 2016 15:09:03 +0100	[thread overview]
Message-ID: <b97859ea-da02-008d-e254-3a2862b90879@linux.intel.com> (raw)
In-Reply-To: <20161220134916.54xo5hnbljqmgl2n@phenom.ffwll.local>

Op 20-12-16 om 14:49 schreef Daniel Vetter:
> On Tue, Dec 20, 2016 at 02:35:40PM +0100, Maarten Lankhorst wrote:
>> Op 19-12-16 om 09:24 schreef Daniel Vetter:
>>> Drive-by fixup while looking at all the connector_list walkers -
>>> holding connection_mutex does actually _not_ give you locking to look
>>> at the legacy drm_connector->encoder->crtc pointer chain. That one is
>>> solely owned by the atomic commit workers. Instead we must inspect the
>>> atomic state.
>>>
>>> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
>>> ---
>>>  drivers/gpu/drm/i915/intel_display.c | 5 ++---
>>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>>> index 0b0d7e8be630..438d27f93aca 100644
>>> --- a/drivers/gpu/drm/i915/intel_display.c
>>> +++ b/drivers/gpu/drm/i915/intel_display.c
>>> @@ -15427,15 +15427,14 @@ static int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)
>>>  
>>>  enum pipe intel_get_pipe_from_connector(struct intel_connector *connector)
>>>  {
>>> -	struct drm_encoder *encoder = connector->base.encoder;
>>>  	struct drm_device *dev = connector->base.dev;
>>>  
>>>  	WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex));
>>>  
>>> -	if (!encoder || WARN_ON(!encoder->crtc))
>>> +	if (!connector->base.state->crtc)
>>>  		return INVALID_PIPE;
>>>  
>>> -	return to_intel_crtc(encoder->crtc)->pipe;
>>> +	return to_intel_crtc(connector->base.state->crtc)->pipe;
>>>  }
>>>  
>>>  int intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data,
>> This patch clashes with the previous patch. intel_panel_set_backlight_acpi is called
>> from asle_set_backlight. You should probably keep connection_mutex alive for it.
> Oh, I've forgotten to update the commit message for the previous patch - I
> ended up _not_ nuking the locking because it did blow up here ;-)
>
> r-b on both if I fix up the previous commit message that we can't nuke the
> locking because the asle_set_backlight thing needs it for the backlight
> callbacks?
> -Daniel

Yeah ok. I'd rather we pass the state, but this will do for now.


Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-12-21 14:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-19  8:24 [PATCH 1/6] drm/i915: Use drm_connector_list_iter in debugfs Daniel Vetter
2016-12-19  8:24 ` [PATCH 2/6] drm/i915: use drm_connector_list_iter in intel_hotplug.c Daniel Vetter
2016-12-20 13:32   ` Maarten Lankhorst
2016-12-19  8:24 ` [PATCH 3/6] drm/i915: use drm_connector_list_iter in intel_opregion.c Daniel Vetter
2016-12-20 13:57   ` Daniel Vetter
2016-12-19  8:24 ` [PATCH 4/6] drm/i915: Make intel_get_pipe_from_connector atomic Daniel Vetter
2016-12-20 13:35   ` Maarten Lankhorst
2016-12-20 13:49     ` Daniel Vetter
2016-12-21 14:09       ` Maarten Lankhorst [this message]
2016-12-19  8:24 ` [PATCH 5/6] drm/i915: use for_each_intel_connector_iter in intel_display.c Daniel Vetter
2016-12-19  8:58   ` [PATCH] " Daniel Vetter
2016-12-19  9:22     ` Daniel Vetter
2016-12-19  9:47       ` Maarten Lankhorst
2016-12-20 18:29         ` Daniel Vetter
2016-12-21 10:01           ` Maarten Lankhorst
2016-12-19  8:24 ` [PATCH 6/6] drm/i915: Update comment that sets I915_MODE_FLAG_INHERITED Daniel Vetter
2016-12-20 13:38   ` Maarten Lankhorst
2016-12-21 10:24     ` Daniel Vetter
2016-12-19  8:45 ` ✓ Fi.CI.BAT: success for series starting with [1/6] drm/i915: Use drm_connector_list_iter in debugfs Patchwork
2016-12-19  9:15 ` ✗ Fi.CI.BAT: warning for series starting with [1/6] drm/i915: Use drm_connector_list_iter in debugfs (rev2) Patchwork
2016-12-20 12:38 ` [PATCH 1/6] drm/i915: Use drm_connector_list_iter in debugfs Maarten Lankhorst
2016-12-20 13:59 ` [PATCH] " Daniel Vetter
2016-12-20 16:15 ` ✗ Fi.CI.BAT: warning for series starting with drm/i915: Use drm_connector_list_iter in debugfs (rev3) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2017-02-28 13:53 [PATCH 1/6] drm/i915: Use drm_connector_list_iter in debugfs Daniel Vetter
2017-02-28 13:53 ` [PATCH 4/6] drm/i915: Make intel_get_pipe_from_connector atomic Daniel Vetter
2017-03-01  9:52 [PATCH 1/6] drm/i915: Use drm_connector_list_iter in debugfs Daniel Vetter
2017-03-01  9:52 ` [PATCH 4/6] drm/i915: Make intel_get_pipe_from_connector atomic 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=b97859ea-da02-008d-e254-3a2862b90879@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@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