All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Takashi Iwai <tiwai@suse.de>, Libin Yang <libin.yang@linux.intel.com>
Cc: alsa-devel@alsa-project.org, intel-gfx@lists.freedesktop.org,
	Dave Airlie <airlied@redhat.com>,
	daniel.vetter@intel.com
Subject: Re: [PATCH V4 2/2] drm/i915: start adding dp mst audio
Date: Mon, 14 Dec 2015 11:33:44 +0200	[thread overview]
Message-ID: <87io41v0g7.fsf@intel.com> (raw)
In-Reply-To: <s5h6105l0yg.wl-tiwai@suse.de>

On Fri, 11 Dec 2015, Takashi Iwai <tiwai@suse.de> wrote:
> On Fri, 11 Dec 2015 07:07:53 +0100,
> Libin Yang wrote:
>> 
>> >>> diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
>> >>> index 9aa83e7..5ad2e66 100644
>> >>> --- a/drivers/gpu/drm/i915/intel_audio.c
>> >>> +++ b/drivers/gpu/drm/i915/intel_audio.c
>> >>> @@ -262,7 +262,8 @@ static void hsw_audio_codec_disable(struct intel_encoder *encoder)
>> >>>   	tmp |= AUD_CONFIG_N_PROG_ENABLE;
>> >>>   	tmp &= ~AUD_CONFIG_UPPER_N_MASK;
>> >>>   	tmp &= ~AUD_CONFIG_LOWER_N_MASK;
>> >>> -	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT))
>> >>> +	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) ||
>> >>> +	    intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))
>> >>>   		tmp |= AUD_CONFIG_N_VALUE_INDEX;
>
> The same check is missing in hsw_audio_codec_enable()?
>
>> >>>   	I915_WRITE(HSW_AUD_CFG(pipe), tmp);
>> >>>
>> >>> @@ -474,7 +475,8 @@ static void ilk_audio_codec_enable(struct drm_connector *connector,
>> >>>   	tmp &= ~AUD_CONFIG_N_VALUE_INDEX;
>> >>>   	tmp &= ~AUD_CONFIG_N_PROG_ENABLE;
>> >>>   	tmp &= ~AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK;
>> >>> -	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT))
>> >>> +	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) ||
>> >>> +	    intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))
>> >>>   		tmp |= AUD_CONFIG_N_VALUE_INDEX;
>
> ... and missing for ilk_audio_codec_disable()?
>
>
>> >>>   	else
>> >>>   		tmp |= audio_config_hdmi_pixel_clock(adjusted_mode);
>> >>> @@ -512,7 +514,8 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder)
>> >>>
>> >>>   	/* ELD Conn_Type */
>> >>>   	connector->eld[5] &= ~(3 << 2);
>> >>> -	if (intel_pipe_has_type(crtc, INTEL_OUTPUT_DISPLAYPORT))
>> >>> +	if (intel_pipe_has_type(crtc, INTEL_OUTPUT_DISPLAYPORT) ||
>> >>> +	    intel_pipe_has_type(crtc, INTEL_OUTPUT_DP_MST))
>
> IMO, it's better to have a macro to cover this two-line check instead
> of open-coding at each place.  We'll have 5 places in the end.

I don't think that's necessary. Only the hsw_* functions need it, the
other platforms (using the other functions) don't support DP MST.

BR,
Jani.


>
>
> thanks,
>
> Takashi

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2015-12-14  9:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02  6:09 [PATCH V4 1/2] dp/mst: add SDP stream support libin.yang
2015-12-02  6:09 ` [PATCH V4 2/2] drm/i915: start adding dp mst audio libin.yang
2015-12-08  8:01   ` Libin Yang
2015-12-10  9:02     ` Daniel Vetter
2015-12-11  6:07       ` Libin Yang
2015-12-11 10:43         ` Takashi Iwai
2015-12-11 13:58           ` Takashi Iwai
2015-12-21  8:31             ` [alsa-devel] " Libin Yang
2015-12-14  9:33           ` Jani Nikula [this message]
2015-12-14  9:40             ` Takashi Iwai
2015-12-14 10:34               ` Jani Nikula
2015-12-14 10:41                 ` Takashi Iwai
2015-12-11 14:05         ` Takashi Iwai
2015-12-13  8:27           ` Takashi Iwai
2015-12-11  6:09 ` [PATCH V4 1/2] dp/mst: add SDP stream support Libin Yang

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=87io41v0g7.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@redhat.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=daniel.vetter@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=libin.yang@linux.intel.com \
    --cc=tiwai@suse.de \
    /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.