From: Chris Wilson <chris@chris-wilson.co.uk>
To: Zhenyu Wang <zhenyuw@linux.intel.com>, dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org, fengguang.wu@intel.com
Subject: Re: [PATCH 2/4] drm/i915: Enable DisplayPort audio
Date: Sun, 19 Sep 2010 08:43:30 +0100 [thread overview]
Message-ID: <89k77n$p02tuc@fmsmga001.fm.intel.com> (raw)
In-Reply-To: <1284879129-19720-3-git-send-email-zhenyuw@linux.intel.com>
On Sun, 19 Sep 2010 14:52:07 +0800, Zhenyu Wang <zhenyuw@linux.intel.com> wrote:
> This will turn on DP audio output by checking monitor's audio
> capability.
>
> Tested-by: Wu Fengguang <fengguang.wu@intel.com>
> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 61 +++++++++++++++++++++++----------------
> 1 files changed, 36 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 208a4ec..81fca1e 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1444,39 +1444,50 @@ intel_dp_detect(struct drm_connector *connector)
> struct drm_i915_private *dev_priv = dev->dev_private;
> uint32_t temp, bit;
> enum drm_connector_status status;
> + struct edid *edid = NULL;
>
> intel_dp->has_audio = false;
>
> - if (HAS_PCH_SPLIT(dev))
> - return ironlake_dp_detect(connector);
> + if (HAS_PCH_SPLIT(dev)) {
> + status = ironlake_dp_detect(connector);
> + } else {
> + switch (intel_dp->output_reg) {
> + case DP_B:
> + bit = DPB_HOTPLUG_INT_STATUS;
> + break;
> + case DP_C:
> + bit = DPC_HOTPLUG_INT_STATUS;
> + break;
> + case DP_D:
> + bit = DPD_HOTPLUG_INT_STATUS;
> + break;
> + default:
> + return connector_status_unknown;
> + }
Move the switch and register check into a separate function, so
the main detect body becomes:
if (HAS_PCH_SPLIT(dev))
status = ironlake_dp_detect(connector);
else
status = g4x_dp_detect(connector);
if (status != connector_status_connected)
return status;
--
Chris Wilson, Intel Open Source Technology Centre
next prev parent reply other threads:[~2010-09-19 7:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-19 6:52 [PATCH 0/4] updated patches for KMS audio Zhenyu Wang
2010-09-19 6:52 ` [PATCH 1/4] drm/edid: add helper function to detect monitor audio capability Zhenyu Wang
2010-09-19 7:38 ` [Intel-gfx] " Chris Wilson
2010-09-19 7:56 ` Zhenyu Wang
2010-10-19 7:24 ` Ben Skeggs
2010-09-19 6:52 ` [PATCH 2/4] drm/i915: Enable DisplayPort audio Zhenyu Wang
2010-09-19 7:43 ` Chris Wilson [this message]
2010-09-19 7:57 ` Zhenyu Wang
2010-09-19 6:52 ` [PATCH 3/4] drm/i915: Enable HDMI audio for monitor with audio support Zhenyu Wang
2010-09-19 6:52 ` [PATCH 4/4] drm/i915: add new param to force audio on or off for HDMI/DP port Zhenyu Wang
2010-09-19 8:14 ` Chris Wilson
2010-09-19 8:22 ` Zhenyu Wang
2010-09-19 8:57 ` Chris Wilson
2010-09-20 19:42 ` [PATCH 0/4] updated patches for KMS audio Adam Jackson
2010-10-14 10:24 ` Chris Wilson
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='89k77n$p02tuc@fmsmga001.fm.intel.com' \
--to=chris@chris-wilson.co.uk \
--cc=dri-devel@lists.freedesktop.org \
--cc=fengguang.wu@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=zhenyuw@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.