From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 7/9] drm/i915: Split intel_disable_ddi() into DP vs. HDMI variants
Date: Thu, 12 Oct 2017 12:49:52 +0300 [thread overview]
Message-ID: <20171012094952.GD10981@intel.com> (raw)
In-Reply-To: <87k201o3jt.fsf@intel.com>
On Wed, Oct 11, 2017 at 11:03:18PM +0300, Jani Nikula wrote:
> On Tue, 10 Oct 2017, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Untangle intel_disable_ddi() by splitting it into DP and HDMI specific
> > variants.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_ddi.c | 51 ++++++++++++++++++++++++----------------
> > 1 file changed, 31 insertions(+), 20 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> > index 945980e71697..c930ef0338c5 100644
> > --- a/drivers/gpu/drm/i915/intel_ddi.c
> > +++ b/drivers/gpu/drm/i915/intel_ddi.c
> > @@ -2424,29 +2424,40 @@ static void intel_enable_ddi(struct intel_encoder *intel_encoder,
> > intel_audio_codec_enable(intel_encoder, pipe_config, conn_state);
> > }
> >
> > -static void intel_disable_ddi(struct intel_encoder *intel_encoder,
> > +static void intel_disable_ddi_dp(struct intel_encoder *encoder,
> > + const struct intel_crtc_state *old_crtc_state,
> > + const struct drm_connector_state *old_conn_state)
> > +{
> > + struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
> > +
> > + if (old_crtc_state->has_audio)
> > + intel_audio_codec_disable(encoder);
> > +
>
> You remove the eDP check here, and...
>
> > + intel_edp_drrs_disable(intel_dp, old_crtc_state);
>
> ...this will now depend on old_crtc_state->has_drrs which is probably
> fine, but...
>
> > + intel_psr_disable(intel_dp, old_crtc_state);
>
> ...but this will be wrong. I don't mind adding the edp check within.
Argh. Yeah, looks like we're still tracking PSR globally for whatever
reason :( Let me fix that right up...
>
> > + intel_edp_backlight_off(old_conn_state);
>
> This is ok.
>
> I guess easiest would be to keep the type == INTEL_OUTPUT_EDP check and
> clean up afterwards.
>
> Otherwise LGTM.
>
> BR,
> Jani.
>
>
>
> > +}
> > +
> > +static void intel_disable_ddi_hdmi(struct intel_encoder *encoder,
> > + const struct intel_crtc_state *old_crtc_state,
> > + const struct drm_connector_state *old_conn_state)
> > +{
> > + if (old_crtc_state->has_audio)
> > + intel_audio_codec_disable(encoder);
> > +
> > + intel_hdmi_handle_sink_scrambling(encoder,
> > + old_conn_state->connector,
> > + false, false);
> > +}
> > +
> > +static void intel_disable_ddi(struct intel_encoder *encoder,
> > const struct intel_crtc_state *old_crtc_state,
> > const struct drm_connector_state *old_conn_state)
> > {
> > - struct drm_encoder *encoder = &intel_encoder->base;
> > - int type = intel_encoder->type;
> > -
> > - if (old_crtc_state->has_audio)
> > - intel_audio_codec_disable(intel_encoder);
> > -
> > - if (type == INTEL_OUTPUT_HDMI) {
> > - intel_hdmi_handle_sink_scrambling(intel_encoder,
> > - old_conn_state->connector,
> > - false, false);
> > - }
> > -
> > - if (type == INTEL_OUTPUT_EDP) {
> > - struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
> > -
> > - intel_edp_drrs_disable(intel_dp, old_crtc_state);
> > - intel_psr_disable(intel_dp, old_crtc_state);
> > - intel_edp_backlight_off(old_conn_state);
> > - }
> > + if (intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_HDMI))
> > + intel_disable_ddi_hdmi(encoder, old_crtc_state, old_conn_state);
> > + else
> > + intel_disable_ddi_dp(encoder, old_crtc_state, old_conn_state);
> > }
> >
> > static void bxt_ddi_pre_pll_enable(struct intel_encoder *encoder,
>
> --
> Jani Nikula, Intel Open Source Technology Center
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-12 9:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-10 12:11 [PATCH v2 0/9] drm/i915: Cleaner DDI DP vs. HDMI split Ville Syrjala
2017-10-10 12:11 ` [PATCH v2 1/9] drm/i915: Dump 'output_types' in crtc state dump Ville Syrjala
2017-10-11 19:50 ` Jani Nikula
2017-10-10 12:12 ` [PATCH v2 2/9] drm/i915: Extract intel_ddi_clk_disable() Ville Syrjala
2017-10-11 19:52 ` Jani Nikula
2017-10-10 12:12 ` [PATCH v2 3/9] drm/i915: Extract intel_disable_ddi_buf() Ville Syrjala
2017-10-11 19:53 ` Jani Nikula
2017-10-10 12:12 ` [PATCH 4/9] drm/i915: Inline the required bits of intel_ddi_post_disable() into intel_ddi_fdi_post_disable() Ville Syrjala
2017-10-10 12:12 ` [PATCH v2 5/9] drm/i915: Split intel_ddi_post_disable() into DP vs. HDMI variants Ville Syrjala
2017-10-10 12:12 ` [PATCH 6/9] drm/i915: Remove useless eDP check from intel_ddi_pre_enable_dp() Ville Syrjala
2017-10-10 12:12 ` [PATCH 7/9] drm/i915: Split intel_disable_ddi() into DP vs. HDMI variants Ville Syrjala
2017-10-11 20:03 ` Jani Nikula
2017-10-12 9:49 ` Ville Syrjälä [this message]
2017-10-13 14:13 ` Jani Nikula
2017-10-10 12:12 ` [PATCH v2 8/9] drm/i915: Plumb crtc_state etc. directly to intel_ddi_pre_enable_{dp, hdmi}() Ville Syrjala
2017-10-13 14:25 ` Jani Nikula
2017-10-10 12:12 ` [PATCH v2 9/9] drm/i915: Split intel_enable_ddi() into DP and HDMI variants Ville Syrjala
2017-10-11 20:06 ` Jani Nikula
2017-10-13 14:20 ` Jani Nikula
2017-10-13 18:10 ` Ville Syrjälä
2017-10-10 13:07 ` ✗ Fi.CI.BAT: warning for drm/i915: Cleaner DDI DP vs. HDMI split Patchwork
2017-10-10 13:21 ` Ville Syrjälä
2017-10-13 17:03 ` ✓ Fi.CI.BAT: success " Patchwork
2017-10-13 18:16 ` Ville Syrjälä
2017-10-13 18:49 ` Jani Nikula
2017-10-14 0:10 ` ✗ Fi.CI.IGT: failure " 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=20171012094952.GD10981@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.