From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v3 5/8] drm/i915/dp: Use sink_format in dp_is_ycbcr420
Date: Thu, 20 Oct 2022 19:54:22 +0300 [thread overview]
Message-ID: <Y1F9PtGbXTqDR867@intel.com> (raw)
In-Reply-To: <20221011063447.904649-6-ankit.k.nautiyal@intel.com>
On Tue, Oct 11, 2022 at 12:04:44PM +0530, Ankit Nautiyal wrote:
> Use the new crtc_state member sink_format to check if DP DFP will use
> YCBCR420.
> The earlier intel_dp->dfp members are not required as decision to use
> color format conversion by the PCON is computed and stored in
> crtc_state. Also drop the intel_dp argument in the helper function.
>
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 13 +++++--------
> 1 file changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 99d72b345907..d8ef4dccf0c1 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -1177,19 +1177,16 @@ static bool intel_dp_supports_dsc(struct intel_dp *intel_dp,
> drm_dp_sink_supports_dsc(intel_dp->dsc_dpcd);
> }
>
> -static bool intel_dp_is_ycbcr420(struct intel_dp *intel_dp,
> - const struct intel_crtc_state *crtc_state)
> +static bool intel_dp_is_ycbcr420(const struct intel_crtc_state *crtc_state)
> {
> - return crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 ||
> - (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR444 &&
> - intel_dp->dfp.ycbcr_444_to_420);
> + return crtc_state->sink_format == INTEL_OUTPUT_FORMAT_YCBCR420;
> }
>
> static int intel_dp_hdmi_compute_bpc(struct intel_dp *intel_dp,
> const struct intel_crtc_state *crtc_state,
> int bpc, bool respect_downstream_limits)
> {
> - bool ycbcr420_output = intel_dp_is_ycbcr420(intel_dp, crtc_state);
> + bool ycbcr420_output = intel_dp_is_ycbcr420(crtc_state);
> int clock = crtc_state->hw.adjusted_mode.crtc_clock;
I think I'd take this a notch further and start passing
the sink_format to most (maybe even all?) places that
currently take a 'bool ycbcr420_output'. That could also
serve as a slight step towards 4:2:2 support.
>
> /*
> @@ -1986,7 +1983,7 @@ intel_dp_compute_output_format(struct intel_encoder *encoder,
>
> crtc_state->output_format = intel_dp_output_format(connector, ycbcr_420_only);
>
> - if (ycbcr_420_only && !intel_dp_is_ycbcr420(intel_dp, crtc_state)) {
> + if (ycbcr_420_only && !intel_dp_is_ycbcr420(crtc_state)) {
> drm_dbg_kms(&i915->drm,
> "YCbCr 4:2:0 mode but YCbCr 4:2:0 output not possible. Falling back to RGB.\n");
> crtc_state->output_format = INTEL_OUTPUT_FORMAT_RGB;
> @@ -2001,7 +1998,7 @@ intel_dp_compute_output_format(struct intel_encoder *encoder,
> ret = intel_dp_compute_link_config(encoder, crtc_state, conn_state,
> respect_downstream_limits);
> if (ret) {
> - if (intel_dp_is_ycbcr420(intel_dp, crtc_state) ||
> + if (intel_dp_is_ycbcr420(crtc_state) ||
> !connector->base.ycbcr_420_allowed ||
> !drm_mode_is_420_also(info, adjusted_mode))
> return ret;
> --
> 2.25.1
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2022-10-20 16:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-11 6:34 [Intel-gfx] [PATCH v3 0/8] Handle BPC for HDMI2.1 PCON without DSC1.2 sink and other fixes Ankit Nautiyal
2022-10-11 6:34 ` [Intel-gfx] [PATCH v3 1/8] drm/i915/dp: Reset frl trained flag before restarting FRL training Ankit Nautiyal
2022-10-11 6:34 ` [Intel-gfx] [PATCH v3 2/8] drm/i915/dp: Remove whitespace at the end of function Ankit Nautiyal
2022-10-20 14:19 ` Ville Syrjälä
2022-10-11 6:34 ` [Intel-gfx] [PATCH v3 3/8] drm/i915/display: Add new member to configure PCON color conversion Ankit Nautiyal
2022-10-20 16:51 ` Ville Syrjälä
2022-10-28 6:16 ` Nautiyal, Ankit K
2022-10-28 6:28 ` Ville Syrjälä
2022-10-11 6:34 ` [Intel-gfx] [PATCH v3 4/8] drm/i915/display: Add new member in intel_dp to store ycbcr420 passthrough cap Ankit Nautiyal
2022-10-11 6:34 ` [Intel-gfx] [PATCH v3 5/8] drm/i915/dp: Use sink_format in dp_is_ycbcr420 Ankit Nautiyal
2022-10-20 16:54 ` Ville Syrjälä [this message]
2022-10-28 6:19 ` Nautiyal, Ankit K
2022-10-11 6:34 ` [Intel-gfx] [PATCH v3 6/8] drm/i915/dp: Replace intel_dp.dfp members with the new crtc_state sink_format Ankit Nautiyal
2022-10-11 10:10 ` kernel test robot
2022-10-11 10:51 ` kernel test robot
2022-10-12 9:55 ` [Intel-gfx] [PATCH v4 " Ankit Nautiyal
2022-10-11 6:34 ` [Intel-gfx] [PATCH v3 7/8] drm/i915/dp: Handle BPP where HDMI2.1 DFP doesn't support DSC Ankit Nautiyal
2022-10-11 6:34 ` [Intel-gfx] [PATCH v3 8/8] drm/i915/dp: Fix FRL BW check for HDMI2.1 DFP Ankit Nautiyal
2022-10-11 6:50 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Handle BPC for HDMI2.1 PCON without DSC1.2 sink and other fixes (rev3) Patchwork
2022-10-11 7:10 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-10-11 8:29 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-10-12 12:01 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Handle BPC for HDMI2.1 PCON without DSC1.2 sink and other fixes (rev4) Patchwork
2022-10-12 12:27 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-10-12 17:17 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
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=Y1F9PtGbXTqDR867@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=ankit.k.nautiyal@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 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.