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 1/6] drm/i915: Convert intel_hdmi to use atomic state
Date: Fri, 21 Oct 2016 17:14:23 +0300 [thread overview]
Message-ID: <20161021141423.GO4329@intel.com> (raw)
In-Reply-To: <1476885339-2265-2-git-send-email-maarten.lankhorst@linux.intel.com>
On Wed, Oct 19, 2016 at 03:55:34PM +0200, Maarten Lankhorst wrote:
> This is the last connector still looking at crtc->config. Fix this.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
looks all right
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_hdmi.c | 48 +++++++++++++++++----------------------
> 1 file changed, 21 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 501334242d38..ef43244a884f 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -975,7 +975,9 @@ static void intel_hdmi_get_config(struct intel_encoder *encoder,
> pipe_config->lane_count = 4;
> }
>
> -static void intel_enable_hdmi_audio(struct intel_encoder *encoder)
> +static void intel_enable_hdmi_audio(struct intel_encoder *encoder,
> + struct intel_crtc_state *pipe_config,
> + struct drm_connector_state *conn_state)
> {
> struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
>
> @@ -991,21 +993,20 @@ static void g4x_enable_hdmi(struct intel_encoder *encoder,
> {
> struct drm_device *dev = encoder->base.dev;
> struct drm_i915_private *dev_priv = to_i915(dev);
> - struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
> struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base);
> u32 temp;
>
> temp = I915_READ(intel_hdmi->hdmi_reg);
>
> temp |= SDVO_ENABLE;
> - if (crtc->config->has_audio)
> + if (pipe_config->has_audio)
> temp |= SDVO_AUDIO_ENABLE;
>
> I915_WRITE(intel_hdmi->hdmi_reg, temp);
> POSTING_READ(intel_hdmi->hdmi_reg);
>
> - if (crtc->config->has_audio)
> - intel_enable_hdmi_audio(encoder);
> + if (pipe_config->has_audio)
> + intel_enable_hdmi_audio(encoder, pipe_config, conn_state);
> }
>
> static void ibx_enable_hdmi(struct intel_encoder *encoder,
> @@ -1040,8 +1041,8 @@ static void ibx_enable_hdmi(struct intel_encoder *encoder,
> * FIXME: BSpec says this should be done at the end of
> * of the modeset sequence, so not sure if this isn't too soon.
> */
> - if (crtc->config->pipe_bpp > 24 &&
> - crtc->config->pixel_multiplier > 1) {
> + if (pipe_config->pipe_bpp > 24 &&
> + pipe_config->pixel_multiplier > 1) {
> I915_WRITE(intel_hdmi->hdmi_reg, temp & ~SDVO_ENABLE);
> POSTING_READ(intel_hdmi->hdmi_reg);
>
> @@ -1055,8 +1056,8 @@ static void ibx_enable_hdmi(struct intel_encoder *encoder,
> POSTING_READ(intel_hdmi->hdmi_reg);
> }
>
> - if (crtc->config->has_audio)
> - intel_enable_hdmi_audio(encoder);
> + if (pipe_config->has_audio)
> + intel_enable_hdmi_audio(encoder, pipe_config, conn_state);
> }
>
> static void cpt_enable_hdmi(struct intel_encoder *encoder,
> @@ -1073,7 +1074,7 @@ static void cpt_enable_hdmi(struct intel_encoder *encoder,
> temp = I915_READ(intel_hdmi->hdmi_reg);
>
> temp |= SDVO_ENABLE;
> - if (crtc->config->has_audio)
> + if (pipe_config->has_audio)
> temp |= SDVO_AUDIO_ENABLE;
>
> /*
> @@ -1086,7 +1087,7 @@ static void cpt_enable_hdmi(struct intel_encoder *encoder,
> * 4. enable HDMI clock gating
> */
>
> - if (crtc->config->pipe_bpp > 24) {
> + if (pipe_config->pipe_bpp > 24) {
> I915_WRITE(TRANS_CHICKEN1(pipe),
> I915_READ(TRANS_CHICKEN1(pipe)) |
> TRANS_CHICKEN1_HDMIUNIT_GC_DISABLE);
> @@ -1098,7 +1099,7 @@ static void cpt_enable_hdmi(struct intel_encoder *encoder,
> I915_WRITE(intel_hdmi->hdmi_reg, temp);
> POSTING_READ(intel_hdmi->hdmi_reg);
>
> - if (crtc->config->pipe_bpp > 24) {
> + if (pipe_config->pipe_bpp > 24) {
> temp &= ~SDVO_COLOR_FORMAT_MASK;
> temp |= HDMI_COLOR_FORMAT_12bpc;
>
> @@ -1110,8 +1111,8 @@ static void cpt_enable_hdmi(struct intel_encoder *encoder,
> ~TRANS_CHICKEN1_HDMIUNIT_GC_DISABLE);
> }
>
> - if (crtc->config->has_audio)
> - intel_enable_hdmi_audio(encoder);
> + if (pipe_config->has_audio)
> + intel_enable_hdmi_audio(encoder, pipe_config, conn_state);
> }
>
> static void vlv_enable_hdmi(struct intel_encoder *encoder,
> @@ -1178,9 +1179,7 @@ static void g4x_disable_hdmi(struct intel_encoder *encoder,
> struct intel_crtc_state *old_crtc_state,
> struct drm_connector_state *old_conn_state)
> {
> - struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
> -
> - if (crtc->config->has_audio)
> + if (old_crtc_state->has_audio)
> intel_audio_codec_disable(encoder);
>
> intel_disable_hdmi(encoder, old_crtc_state, old_conn_state);
> @@ -1190,9 +1189,7 @@ static void pch_disable_hdmi(struct intel_encoder *encoder,
> struct intel_crtc_state *old_crtc_state,
> struct drm_connector_state *old_conn_state)
> {
> - struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
> -
> - if (crtc->config->has_audio)
> + if (old_crtc_state->has_audio)
> intel_audio_codec_disable(encoder);
> }
>
> @@ -1645,13 +1642,12 @@ static void intel_hdmi_pre_enable(struct intel_encoder *encoder,
> struct drm_connector_state *conn_state)
> {
> struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base);
> - struct intel_crtc *intel_crtc = to_intel_crtc(encoder->base.crtc);
> - const struct drm_display_mode *adjusted_mode = &intel_crtc->config->base.adjusted_mode;
> + const struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode;
>
> intel_hdmi_prepare(encoder);
>
> intel_hdmi->set_infoframes(&encoder->base,
> - intel_crtc->config->has_hdmi_sink,
> + pipe_config->has_hdmi_sink,
> adjusted_mode);
> }
>
> @@ -1663,9 +1659,7 @@ static void vlv_hdmi_pre_enable(struct intel_encoder *encoder,
> struct intel_hdmi *intel_hdmi = &dport->hdmi;
> struct drm_device *dev = encoder->base.dev;
> struct drm_i915_private *dev_priv = to_i915(dev);
> - struct intel_crtc *intel_crtc =
> - to_intel_crtc(encoder->base.crtc);
> - const struct drm_display_mode *adjusted_mode = &intel_crtc->config->base.adjusted_mode;
> + const struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode;
>
> vlv_phy_pre_encoder_enable(encoder);
>
> @@ -1674,7 +1668,7 @@ static void vlv_hdmi_pre_enable(struct intel_encoder *encoder,
> 0x2b247878);
>
> intel_hdmi->set_infoframes(&encoder->base,
> - intel_crtc->config->has_hdmi_sink,
> + pipe_config->has_hdmi_sink,
> adjusted_mode);
>
> g4x_enable_hdmi(encoder, pipe_config, conn_state);
> --
> 2.7.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
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:[~2016-10-21 14:14 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ä [this message]
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ä
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=20161021141423.GO4329@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 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.