intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Enable DP audio for Haswell
@ 2012-11-16 14:48 Takashi Iwai
  2012-11-19 17:01 ` Paulo Zanoni
  0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2012-11-16 14:48 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx, Zanoni, Paulo R

This patch adds the missing code to send ELD for Haswell DisplayPort,
based on Xingchao's original patch.

A test was performed with HSW-D machine and NEC EA232Wmi DP monitor.

Cc: Xingchao Wang <xingchao.wang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 drivers/gpu/drm/i915/intel_ddi.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 58f50eb..d8dbd99 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -669,6 +669,15 @@ static void intel_ddi_mode_set(struct drm_encoder *encoder,
 			break;
 		}
 
+		if (intel_hdmi->has_audio) {
+			DRM_DEBUG_DRIVER("DP audio on pipe %c on DDI\n",
+					 pipe_name(intel_crtc->pipe));
+
+			/* write eld */
+			DRM_DEBUG_DRIVER("DP audio: write eld information\n");
+			intel_write_eld(encoder, adjusted_mode);
+		}
+
 		intel_dp_init_link_config(intel_dp);
 
 	} else if (type == INTEL_OUTPUT_HDMI) {
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Enable DP audio for Haswell
  2012-11-16 14:48 [PATCH] drm/i915: Enable DP audio for Haswell Takashi Iwai
@ 2012-11-19 17:01 ` Paulo Zanoni
  2012-11-19 17:05   ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Paulo Zanoni @ 2012-11-19 17:01 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Daniel Vetter, intel-gfx, Zanoni, Paulo R

Hi

drivers/gpu/drm/i915/intel_ddi.c: In function ‘intel_ddi_mode_set’:
drivers/gpu/drm/i915/intel_ddi.c:672:7: error: ‘intel_hdmi’ undeclared
(first use in this function)
drivers/gpu/drm/i915/intel_ddi.c:672:7: note: each undeclared
identifier is reported only once for each function it appears in
make[4]: ** [drivers/gpu/drm/i915/intel_ddi.o] Erro 1


2012/11/16 Takashi Iwai <tiwai@suse.de>:
> This patch adds the missing code to send ELD for Haswell DisplayPort,
> based on Xingchao's original patch.
>
> A test was performed with HSW-D machine and NEC EA232Wmi DP monitor.
>
> Cc: Xingchao Wang <xingchao.wang@intel.com>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 58f50eb..d8dbd99 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -669,6 +669,15 @@ static void intel_ddi_mode_set(struct drm_encoder *encoder,
>                         break;
>                 }
>
> +               if (intel_hdmi->has_audio) {

Replacing it with intel_dp->has_audio makes it look correct.

You could also try to "unify" the 2 "has_audio" checks of this
function into one single check at the end of the function.

> +                       DRM_DEBUG_DRIVER("DP audio on pipe %c on DDI\n",
> +                                        pipe_name(intel_crtc->pipe));
> +
> +                       /* write eld */
> +                       DRM_DEBUG_DRIVER("DP audio: write eld information\n");
> +                       intel_write_eld(encoder, adjusted_mode);
> +               }
> +
>                 intel_dp_init_link_config(intel_dp);
>
>         } else if (type == INTEL_OUTPUT_HDMI) {
> --
> 1.8.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Paulo Zanoni

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Enable DP audio for Haswell
  2012-11-19 17:01 ` Paulo Zanoni
@ 2012-11-19 17:05   ` Takashi Iwai
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2012-11-19 17:05 UTC (permalink / raw)
  To: Paulo Zanoni; +Cc: Daniel Vetter, intel-gfx, Zanoni, Paulo R

At Mon, 19 Nov 2012 15:01:59 -0200,
Paulo Zanoni wrote:
> 
> Hi
> 
> drivers/gpu/drm/i915/intel_ddi.c: In function ‘intel_ddi_mode_set’:
> drivers/gpu/drm/i915/intel_ddi.c:672:7: error: ‘intel_hdmi’ undeclared
> (first use in this function)
> drivers/gpu/drm/i915/intel_ddi.c:672:7: note: each undeclared
> identifier is reported only once for each function it appears in
> make[4]: ** [drivers/gpu/drm/i915/intel_ddi.o] Erro 1

Doh, sorry, I posted a version before refreshing.
Will submit the right one soon.

> 2012/11/16 Takashi Iwai <tiwai@suse.de>:
> > This patch adds the missing code to send ELD for Haswell DisplayPort,
> > based on Xingchao's original patch.
> >
> > A test was performed with HSW-D machine and NEC EA232Wmi DP monitor.
> >
> > Cc: Xingchao Wang <xingchao.wang@intel.com>
> > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > ---
> >  drivers/gpu/drm/i915/intel_ddi.c | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> > index 58f50eb..d8dbd99 100644
> > --- a/drivers/gpu/drm/i915/intel_ddi.c
> > +++ b/drivers/gpu/drm/i915/intel_ddi.c
> > @@ -669,6 +669,15 @@ static void intel_ddi_mode_set(struct drm_encoder *encoder,
> >                         break;
> >                 }
> >
> > +               if (intel_hdmi->has_audio) {
> 
> Replacing it with intel_dp->has_audio makes it look correct.
> 
> You could also try to "unify" the 2 "has_audio" checks of this
> function into one single check at the end of the function.

Yes.  A more refactoring is possible, but I left it as is from the
safety side.


thanks,

Takashi

> > +                       DRM_DEBUG_DRIVER("DP audio on pipe %c on DDI\n",
> > +                                        pipe_name(intel_crtc->pipe));
> > +
> > +                       /* write eld */
> > +                       DRM_DEBUG_DRIVER("DP audio: write eld information\n");
> > +                       intel_write_eld(encoder, adjusted_mode);
> > +               }
> > +
> >                 intel_dp_init_link_config(intel_dp);
> >
> >         } else if (type == INTEL_OUTPUT_HDMI) {
> > --
> > 1.8.0
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> 
> 
> -- 
> Paulo Zanoni
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-19 17:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-16 14:48 [PATCH] drm/i915: Enable DP audio for Haswell Takashi Iwai
2012-11-19 17:01 ` Paulo Zanoni
2012-11-19 17:05   ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).