Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915/dp: Add checking of YCBCR420 Pass-through to YCBCR420 outputs.
Date: Mon, 3 Feb 2020 17:12:36 +0200	[thread overview]
Message-ID: <20200203151236.GG13686@intel.com> (raw)
In-Reply-To: <20200203120421.113744-2-gwan-gyeong.mun@intel.com>

On Mon, Feb 03, 2020 at 02:04:21PM +0200, Gwan-gyeong Mun wrote:
> When a DP downstream uses a DP to HDMI active converter, the active
> converter needs to support YCbCr420 Pass-through to enable DP YCbCr 4:2:0
> outputs.
> 
> Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 26 +++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index f4dede6253f8..824ed8096426 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2298,6 +2298,22 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
>  	return 0;
>  }
>  
> +static bool
> +intel_dp_downstream_is_hdmi_detailed_cap_info(struct intel_dp *intel_dp)
> +{
> +	int type = intel_dp->downstream_ports[0] & DP_DS_PORT_TYPE_MASK;
> +	bool detailed_cap_info = intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] &
> +				 DP_DETAILED_CAP_INFO_AVAILABLE;
> +
> +	return type == DP_DS_PORT_TYPE_HDMI && detailed_cap_info;

This looks a bit incomplete, and should really be in the core. I have a
bunch of stuff for DFPs sitting in a branch. I'll just post the whole
thing...

> +}
> +
> +static bool
> +intel_dp_downstream_supports_ycbcr_420_passthru(struct intel_dp *intel_dp)
> +{
> +	return intel_dp->downstream_ports[3] & DP_DS_YCBCR420_PASSTHRU_SUPPORT;
> +}
> +
>  static int
>  intel_dp_ycbcr420_config(struct intel_dp *intel_dp,
>  			 struct drm_connector *connector,
> @@ -2314,6 +2330,16 @@ intel_dp_ycbcr420_config(struct intel_dp *intel_dp,
>  	    !connector->ycbcr_420_allowed)
>  		return 0;
>  
> +	/*
> +	 * When a DP downstream uses a DP to HDMI active converter,
> +	 * the active converter needs to support YCbCr420 Pass-through.
> +	 */
> +	if (drm_dp_is_branch(intel_dp->dpcd)) {
> +		if (intel_dp_downstream_is_hdmi_detailed_cap_info(intel_dp) &&
> +		    !intel_dp_downstream_supports_ycbcr_420_passthru(intel_dp))
> +			return 0;
> +	}
> +
>  	crtc_state->output_format = INTEL_OUTPUT_FORMAT_YCBCR420;
>  
>  	/* YCBCR 420 output conversion needs a scaler */
> -- 
> 2.24.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-02-03 15:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-03 12:04 [Intel-gfx] [PATCH 1/2] drm: Add a detailed DP HDMI branch info on debugfs Gwan-gyeong Mun
2020-02-03 12:04 ` [Intel-gfx] [PATCH 2/2] drm/i915/dp: Add checking of YCBCR420 Pass-through to YCBCR420 outputs Gwan-gyeong Mun
2020-02-03 15:12   ` Ville Syrjälä [this message]
2020-02-03 16:02 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm: Add a detailed DP HDMI branch info on debugfs Patchwork
2020-02-06  0:43 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2020-02-03 11:20 [Intel-gfx] [PATCH 2/2] drm/i915/dp: Add checking of YCBCR420 Pass-through to YCBCR420 outputs Gwan-gyeong Mun

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=20200203151236.GG13686@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gwan-gyeong.mun@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox