Re: [PATCH v3 2/2] drm/i915/hsw: add flag has_audio in crtc config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel,

Thanks for your advice!
Would you help working on this patch? Or can I continue after a few days, I have some Android support task these days.

Regards
Mengdong

> -----Original Message-----
> From: Daniel Vetter [mailto:daniel.vetter@xxxxxxxx] On Behalf Of Daniel Vetter
> Sent: Tuesday, September 24, 2013 8:48 PM
> To: Lin, Mengdong
> Cc: intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  [PATCH v3 2/2] drm/i915/hsw: add flag has_audio in crtc
> config
> 
> On Tue, Sep 24, 2013 at 01:01:37AM -0400, mengdong.lin@xxxxxxxxx wrote:
> > From: Mengdong Lin <mengdong.lin@xxxxxxxxx>
> >
> > This patch adds a flag "has_audio" for audio presence in intel_crtc->config.
> > HMDI and DP encoders set this flag in their computer_config() if the
> > external monitor supports audio. Later audio sequence will check this flag.
> >
> > Signed-off-by: Mengdong Lin <mengdong.lin@xxxxxxxxx>
> 
> [snip]
> 
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c
> > b/drivers/gpu/drm/i915/intel_dp.c index 26e162b..4bc125e 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -764,6 +764,8 @@ found:
> >
> >  	intel_dp_set_clock(encoder, pipe_config, intel_dp->link_bw);
> >
> > +	pipe_config->has_audio = intel_dp->has_audio;
> > +
> 
> This should only be set when we actually have an audio-capable monitor and
> want to enable the audio output on the port. Furthermore you need to add hw
> state readout support for this boolean to haswell_get_pipe_config and also the
> relevant state check code to intel_pipe_config_compare (by adding
> PIPE_CONF_CHECK_I(has_audio)).
> 
> Same applies to the intel_hdmi.c part ofc.
> 
> Cheers, Daniel
> 
> >  	return true;
> >  }
> >
> > diff --git a/drivers/gpu/drm/i915/intel_drv.h
> > b/drivers/gpu/drm/i915/intel_drv.h
> > index b7d6e09..2bdc23c 100644
> > --- a/drivers/gpu/drm/i915/intel_drv.h
> > +++ b/drivers/gpu/drm/i915/intel_drv.h
> > @@ -290,6 +290,7 @@ struct intel_crtc_config {
> >  	struct intel_link_m_n fdi_m_n;
> >
> >  	bool ips_enabled;
> > +	bool has_audio;
> >  };
> >
> >  struct intel_crtc {
> > @@ -303,7 +304,6 @@ struct intel_crtc {
> >  	 * some outputs connected to this crtc.
> >  	 */
> >  	bool active;
> > -	bool eld_vld;
> >  	bool primary_disabled; /* is the crtc obscured by a plane? */
> >  	bool lowfreq_avail;
> >  	struct intel_overlay *overlay;
> > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c
> > b/drivers/gpu/drm/i915/intel_hdmi.c
> > index 2fd3fd5..09c9d69 100644
> > --- a/drivers/gpu/drm/i915/intel_hdmi.c
> > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> > @@ -864,6 +864,8 @@ bool intel_hdmi_compute_config(struct
> intel_encoder *encoder,
> >  		return false;
> >  	}
> >
> > +	pipe_config->has_audio = intel_hdmi->has_audio;
> > +
> >  	return true;
> >  }
> >
> > --
> > 1.8.1.2
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> > 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@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux