intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [RESEND PATCH 2/6] drm/i915: Pass atomic state to intel_audio_codec_enable
Date: Mon, 24 Oct 2016 13:17:54 +0300	[thread overview]
Message-ID: <20161024101754.GG4617@intel.com> (raw)
In-Reply-To: <e339fe85-f3ce-681f-31cd-6db49ffb69f9@linux.intel.com>

On Mon, Oct 24, 2016 at 12:12:59PM +0200, Maarten Lankhorst wrote:
> Op 24-10-16 om 12:04 schreef Ville Syrjälä:
> > On Mon, Oct 24, 2016 at 10:45:36AM +0200, Maarten Lankhorst wrote:
> >> Op 21-10-16 om 16:16 schreef Ville Syrjälä:
> >>> On Fri, Oct 21, 2016 at 05:04:46PM +0300, Ville Syrjälä wrote:
> >>>> On Wed, Oct 19, 2016 at 03:55:35PM +0200, Maarten Lankhorst wrote:
> >>>>> drm_select_eld requires mode_config.mutex and connection_mutex
> >>>>> because it looks at the connector list and at the legacy encoders.
> >>>>>
> >>>>> This is not required, because when we call audio_codec_enable we know
> >>>>> which connector it was called for, so pass the state.
> >>>>>
> >>>>> This also removes having to look at crtc->config.
> >>>>>
> >>>>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> >>>>> ---
> >>>>>  drivers/gpu/drm/i915/intel_audio.c | 17 ++++++++++-------
> >>>>>  drivers/gpu/drm/i915/intel_ddi.c   |  2 +-
> >>>>>  drivers/gpu/drm/i915/intel_dp.c    | 11 ++++++-----
> >>>>>  drivers/gpu/drm/i915/intel_drv.h   |  4 +++-
> >>>>>  drivers/gpu/drm/i915/intel_hdmi.c  |  2 +-
> >>>>>  5 files changed, 21 insertions(+), 15 deletions(-)
> >>>>>
> >>>>> diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
> >>>>> index 7093cfbb62b1..63ef25893c7e 100644
> >>>>> --- a/drivers/gpu/drm/i915/intel_audio.c
> >>>>> +++ b/drivers/gpu/drm/i915/intel_audio.c
> >>>>> @@ -485,23 +485,26 @@ static void ilk_audio_codec_enable(struct drm_connector *connector,
> >>>>>  /**
> >>>>>   * intel_audio_codec_enable - Enable the audio codec for HD audio
> >>>>>   * @intel_encoder: encoder on which to enable audio
> >>>>> + * @crtc_state: pointer to the current crtc state.
> >>>>> + * @conn_state: pointer to the current connector state.
> >>>>>   *
> >>>>>   * The enable sequences may only be performed after enabling the transcoder and
> >>>>>   * port, and after completed link training.
> >>>>>   */
> >>>>> -void intel_audio_codec_enable(struct intel_encoder *intel_encoder)
> >>>>> +void intel_audio_codec_enable(struct intel_encoder *intel_encoder,
> >>>>> +			      const struct intel_crtc_state *crtc_state,
> >>>>> +			      const struct drm_connector_state *conn_state)
> >>>>>  {
> >>>>>  	struct drm_encoder *encoder = &intel_encoder->base;
> >>>>> -	struct intel_crtc *crtc = to_intel_crtc(encoder->crtc);
> >>>>> -	const struct drm_display_mode *adjusted_mode = &crtc->config->base.adjusted_mode;
> >>>>> +	const struct drm_display_mode *adjusted_mode = &crtc_state->base.adjusted_mode;
> >>>>>  	struct drm_connector *connector;
> >>>>>  	struct drm_i915_private *dev_priv = to_i915(encoder->dev);
> >>>>>  	struct i915_audio_component *acomp = dev_priv->audio_component;
> >>>>>  	enum port port = intel_encoder->port;
> >>>>> -	enum pipe pipe = crtc->pipe;
> >>>>> +	enum pipe pipe = drm_crtc_index(crtc_state->base.crtc);
> >>>> While we may require that to be true, I'm not sure I like this use.
> >>> I should say that otherwise I like this.
> >> What do you mean with this comment?
> > That the rest of the patch makes sense.
> >
> Sorry, I meant the first comment you wrote.

I mean that 'enum pipe pipe = drm_crtc_index(crtc_state->base.crtc);'
is not something that's done anywhere else. So it looks totally foreign.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-10-24 10:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19 13:55 [RESEND PATCH 0/6] drm/i915: Enable support for nonblocking modeset Maarten Lankhorst
2016-10-19 13:55 ` [RESEND PATCH 1/6] drm/i915: Convert intel_hdmi to use atomic state Maarten Lankhorst
2016-10-21 14:14   ` Ville Syrjälä
2016-10-19 13:55 ` [RESEND PATCH 2/6] drm/i915: Pass atomic state to intel_audio_codec_enable Maarten Lankhorst
2016-10-21 14:04   ` Ville Syrjälä
2016-10-21 14:16     ` Ville Syrjälä
2016-10-24  8:45       ` Maarten Lankhorst
2016-10-24 10:04         ` Ville Syrjälä
2016-10-24 10:12           ` Maarten Lankhorst
2016-10-24 10:17             ` Ville Syrjälä [this message]
2016-10-24 10:47               ` Maarten Lankhorst
2016-10-24 11:41                 ` Ville Syrjälä
2016-10-25 11:00                   ` Maarten Lankhorst
2016-10-19 13:55 ` [RESEND PATCH 3/6] drm/edid: Remove drm_select_eld Maarten Lankhorst
2016-10-21 14:05   ` Ville Syrjälä
2016-10-21 14:17     ` Ville Syrjälä
2016-10-24  8:44       ` [Intel-gfx] " Maarten Lankhorst
2016-10-19 13:55 ` [RESEND PATCH 4/6] drm/i915: Update atomic modeset state synchronously Maarten Lankhorst
2016-10-21 14:08   ` Ville Syrjälä
2016-10-24 10:07     ` Maarten Lankhorst
2016-10-24 10:19       ` Ville Syrjälä
2016-10-24 10:43         ` Maarten Lankhorst
2016-10-21 14:21   ` Ville Syrjälä
2016-10-24  8:47     ` Maarten Lankhorst
2016-10-19 13:55 ` [RESEND PATCH 5/6] drm/i915: Pass atomic state to verify_connector_state Maarten Lankhorst
2016-11-01 13:01   ` Ville Syrjälä
2016-10-19 13:55 ` [RESEND PATCH 6/6] drm/i915: Enable support for nonblocking modeset Maarten Lankhorst
2016-10-19 17:28 ` ✗ Fi.CI.BAT: failure for " Patchwork

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=20161024101754.GG4617@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@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;
as well as URLs for NNTP newsgroup(s).