Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/ddi: set has_infoframe flag on DDI too v2
Date: Thu, 20 Nov 2014 16:49:42 +0100	[thread overview]
Message-ID: <20141120154942.GH25711@phenom.ffwll.local> (raw)
In-Reply-To: <1416332752-28234-1-git-send-email-jbarnes@virtuousgeek.org>

On Tue, Nov 18, 2014 at 09:45:52AM -0800, Jesse Barnes wrote:
> Just like we do in the HDMI code, set the infoframe flag if we detect
> that infoframes are enabled.
> 
> v2: check for actual infoframe status as in hdmi code (Daniel)
> 
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 07c5625..24110c9 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -2075,6 +2075,14 @@ void intel_ddi_get_config(struct intel_encoder *encoder,
>  		break;
>  	}
>  
> +	if (encoder->type == INTEL_OUTPUT_HDMI) {

Hm I dind't look too closely apparently at this. You again rely upon sw
state here, just encoder->type this time around. Which means you can't
upcast the intel_hdmi struct, and you also can't really rely upon the
encoder->crtc link (that's all just about to get reconstructed). Imo the
code should have stayed in the TRANS_DDI_MODE_SELECT_HDMI case.

The later depency upon encoder->crtc is an issue for everything !g4x, but
on hsw there's the additional issue that you have to look at the cpu
transcoder and I guess that part blows up.

g4x infoframe readout is probably broken too because it doesn't check that
the port selected is the one actually queried for.

Overall I think we need to:
- Inline the g4x readout into the hdmi get_config function and check the
  port.
- Inline the ibx/cpt readout code into the relevant get_pipe_config
  functions (well pch config) since that state is per-pipe. We should
  probably double-check the port, too.
- Same inline for vlv and hsw, with the addition that we need to make sure
  on hsw to not try to read this for the edp transcoder.

Or maybe I'm totally missing why the state gets out of sync on Paulo's
machine.
-Daniel

> +		struct intel_hdmi *intel_hdmi =
> +			enc_to_intel_hdmi(&encoder->base);
> +
> +		if (intel_hdmi->infoframe_enabled(&encoder->base))
> +			pipe_config->has_infoframe = true;
> +	}
> +
>  	if (intel_display_power_is_enabled(dev_priv, POWER_DOMAIN_AUDIO)) {
>  		temp = I915_READ(HSW_AUD_PIN_ELD_CP_VLD);
>  		if (temp & AUDIO_OUTPUT_ENABLE(intel_crtc->pipe))
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2014-11-20 15:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-17 21:08 [PATCH 1/2] drm/i915/ddi: set has_infoframe flag on DDI too Jesse Barnes
2014-11-17 21:08 ` [PATCH 2/2] drm/i915/ddi: add break in DDI mode select switch Jesse Barnes
2014-11-18  3:27   ` [PATCH 2/2] drm/i915/ddi: add break in DDI mode select shuang.he
2014-11-18  8:14   ` [PATCH 2/2] drm/i915/ddi: add break in DDI mode select switch Daniel Vetter
2014-11-18  8:14 ` [PATCH 1/2] drm/i915/ddi: set has_infoframe flag on DDI too Daniel Vetter
2014-11-18 16:16   ` Jesse Barnes
2014-11-18 17:45   ` [PATCH] drm/i915/ddi: set has_infoframe flag on DDI too v2 Jesse Barnes
2014-11-19  0:00     ` [PATCH] drm/i915/ddi: set has_infoframe flag on DDI too shuang.he
2014-11-19 13:53       ` Daniel Vetter
2014-11-19 13:55     ` [PATCH] drm/i915/ddi: set has_infoframe flag on DDI too v2 Daniel Vetter
2014-11-20 15:49     ` Daniel Vetter [this message]
2014-11-20 19:54       ` Jesse Barnes
2014-11-20 21:40         ` 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=20141120154942.GH25711@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.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