From: Fengguang Wu <fengguang.wu@intel.com>
To: Wang Xingchao <xingchao.wang@intel.com>
Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: ELD info update during HDMI hot plug
Date: Wed, 5 Sep 2012 13:29:52 +0800 [thread overview]
Message-ID: <20120905052952.GA7081@localhost> (raw)
In-Reply-To: <1346821576-18024-1-git-send-email-xingchao.wang@intel.com>
Xingchao,
We have the drm_i915_display_funcs.write_eld() for such
functionalities.
Thanks,
Fengguang
On Wed, Sep 05, 2012 at 01:06:16PM +0800, Wang Xingchao wrote:
> ELD infomation should update immediately when detected HDMI hot plug event.
> The related ELD_VALID bit should be set/clear to generate unsolicited event
> to notify Alsa driver this change.
>
> Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
> ---
> drivers/gpu/drm/i915/intel_hdmi.c | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index e4c37bb..1d9aaa9 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -719,6 +719,10 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
> struct drm_i915_private *dev_priv = connector->dev->dev_private;
> struct edid *edid;
> enum drm_connector_status status = connector_status_disconnected;
> + enum drm_connector_status old_status = connector->status;
> + int aud_cntrl_st2;
> + uint32_t eldv;
> + int i;
>
> if (IS_G4X(connector->dev) && !g4x_hdmi_connected(intel_hdmi))
> return status;
> @@ -747,6 +751,30 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
> (intel_hdmi->force_audio == HDMI_AUDIO_ON);
> }
>
> + if (status != old_status) {
> + if (HAS_PCH_IBX(connector->dev))
> + aud_cntrl_st2 = IBX_AUD_CNTL_ST2;
> + else if (IS_HASWELL(connector->dev))
> + aud_cntrl_st2 = HSW_AUD_PIN_ELD_CP_VLD;
> + else
> + aud_cntrl_st2 = CPT_AUD_CNTRL_ST2;
> +
> + eldv = (AUDIO_ELD_VALID_A |
> + AUDIO_ELD_VALID_B |
> + AUDIO_ELD_VALID_C) ;
> + if (status == connector_status_connected) {
> + DRM_DEBUG_KMS("[CONNECTOR:%d:%s] Pluged In\n", connector->base.id,
> + drm_get_connector_name(connector));
> + I915_WRITE(aud_cntrl_st2, eldv);
> + } else {
> + i = I915_READ(aud_cntrl_st2);
> + i &= ~eldv;
> + I915_WRITE(aud_cntrl_st2, i);
> + DRM_DEBUG_KMS("[CONNECTOR:%d:%s] Pluged Out\n", connector->base.id,
> + drm_get_connector_name(connector));
> + }
> + }
> +
> return status;
> }
>
> --
> 1.7.9.5
next prev parent reply other threads:[~2012-09-05 5:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-05 5:06 [PATCH] drm/i915: ELD info update during HDMI hot plug Wang Xingchao
2012-09-05 5:29 ` Fengguang Wu [this message]
2012-09-12 7:19 ` Wang, Xingchao
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=20120905052952.GA7081@localhost \
--to=fengguang.wu@intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=xingchao.wang@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.