From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13011C35247 for ; Mon, 3 Feb 2020 15:12:44 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E7CFC21582 for ; Mon, 3 Feb 2020 15:12:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E7CFC21582 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 26CE76EC20; Mon, 3 Feb 2020 15:12:41 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 12B886EC20; Mon, 3 Feb 2020 15:12:40 +0000 (UTC) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Feb 2020 07:12:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,398,1574150400"; d="scan'208";a="310747262" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga001.jf.intel.com with SMTP; 03 Feb 2020 07:12:36 -0800 Received: by stinkbox (sSMTP sendmail emulation); Mon, 03 Feb 2020 17:12:36 +0200 Date: Mon, 3 Feb 2020 17:12:36 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Gwan-gyeong Mun Subject: Re: [PATCH 2/2] drm/i915/dp: Add checking of YCBCR420 Pass-through to YCBCR420 outputs. Message-ID: <20200203151236.GG13686@intel.com> References: <20200203120421.113744-1-gwan-gyeong.mun@intel.com> <20200203120421.113744-2-gwan-gyeong.mun@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200203120421.113744-2-gwan-gyeong.mun@intel.com> X-Patchwork-Hint: comment User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 > --- > 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/i9= 15/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 =3D intel_dp->downstream_ports[0] & DP_DS_PORT_TYPE_MASK; > + bool detailed_cap_info =3D intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] & > + DP_DETAILED_CAP_INFO_AVAILABLE; > + > + return type =3D=3D 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_d= p) > +{ > + 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 =3D 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=E4l=E4 Intel _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4880C35247 for ; Mon, 3 Feb 2020 15:12:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 908B520CC7 for ; Mon, 3 Feb 2020 15:12:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 908B520CC7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0DDE36EC1D; Mon, 3 Feb 2020 15:12:41 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 12B886EC20; Mon, 3 Feb 2020 15:12:40 +0000 (UTC) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Feb 2020 07:12:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,398,1574150400"; d="scan'208";a="310747262" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga001.jf.intel.com with SMTP; 03 Feb 2020 07:12:36 -0800 Received: by stinkbox (sSMTP sendmail emulation); Mon, 03 Feb 2020 17:12:36 +0200 Date: Mon, 3 Feb 2020 17:12:36 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Gwan-gyeong Mun Message-ID: <20200203151236.GG13686@intel.com> References: <20200203120421.113744-1-gwan-gyeong.mun@intel.com> <20200203120421.113744-2-gwan-gyeong.mun@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200203120421.113744-2-gwan-gyeong.mun@intel.com> X-Patchwork-Hint: comment User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915/dp: Add checking of YCBCR420 Pass-through to YCBCR420 outputs. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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 > --- > 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/i9= 15/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 =3D intel_dp->downstream_ports[0] & DP_DS_PORT_TYPE_MASK; > + bool detailed_cap_info =3D intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] & > + DP_DETAILED_CAP_INFO_AVAILABLE; > + > + return type =3D=3D 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_d= p) > +{ > + 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 =3D 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=E4l=E4 Intel _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx