Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Lisovskiy, Stanislav" <stanislav.lisovskiy@intel.com>
To: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 20/20] drm/i915/dp: Check if force_dsc_output_format is possible
Date: Mon, 7 Aug 2023 15:25:55 +0300	[thread overview]
Message-ID: <ZNDi0z9R7XXYq6HP@intel.com> (raw)
In-Reply-To: <20230728041150.2524032-21-ankit.k.nautiyal@intel.com>

On Fri, Jul 28, 2023 at 09:41:50AM +0530, Ankit Nautiyal wrote:
> Currently for testing an output format with DSC, we just force the
> output format, without checking if it can be supported.
> This also creates an issue where there is a PCON which might need to
> convert from forced output format to the format to sink format.
> 
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 30 +++++++++++++++++++++++--
>  1 file changed, 28 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 0299b378ba6e..1aee27c0fb55 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -935,16 +935,42 @@ dfp_can_convert_from_ycbcr444(struct intel_dp *intel_dp,
>  	return false;
>  }
>  
> +static bool
> +dfp_can_convert(struct intel_dp *intel_dp,
> +		enum intel_output_format output_format,
> +		enum intel_output_format sink_format)
> +{
> +	switch (output_format) {
> +	case INTEL_OUTPUT_FORMAT_RGB:
> +		return dfp_can_convert_from_rgb(intel_dp, sink_format);
> +	case INTEL_OUTPUT_FORMAT_YCBCR444:
> +		return dfp_can_convert_from_ycbcr444(intel_dp, sink_format);
> +	default:
> +		MISSING_CASE(output_format);
> +		return false;
> +	}
> +
> +	return false;
> +}
> +
>  static enum intel_output_format
>  intel_dp_output_format(struct intel_connector *connector,
>  		       enum intel_output_format sink_format)
>  {
>  	struct intel_dp *intel_dp = intel_attached_dp(connector);
>  	struct drm_i915_private *i915 = dp_to_i915(intel_dp);
> +	enum intel_output_format force_dsc_output_format =
> +		intel_dp->force_dsc_output_format;
>  	enum intel_output_format output_format;
> +	if (force_dsc_output_format) {
> +		if (source_can_output(intel_dp, force_dsc_output_format) &&
> +		    (!drm_dp_is_branch(intel_dp->dpcd) ||
> +		     sink_format != force_dsc_output_format ||
> +		     dfp_can_convert(intel_dp, force_dsc_output_format, sink_format)))
> +			return force_dsc_output_format;
>  
> -	if (intel_dp->force_dsc_output_format)
> -		return intel_dp->force_dsc_output_format;
> +		drm_dbg_kms(&i915->drm, "Cannot force DSC output format\n");
> +	}
>  
>  	if (sink_format == INTEL_OUTPUT_FORMAT_RGB ||
>  	    dfp_can_convert_from_rgb(intel_dp, sink_format))
> -- 
> 2.40.1
> 

  reply	other threads:[~2023-08-07 12:26 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-28  4:11 [Intel-gfx] [PATCH 00/20] DSC misc fixes Ankit Nautiyal
2023-07-28  4:11 ` [Intel-gfx] [PATCH 01/20] drm/i915/dp: Consider output_format while computing dsc bpp Ankit Nautiyal
2023-07-28  4:11 ` [Intel-gfx] [PATCH 02/20] drm/i915/dp: Move compressed bpp check with 420 format inside the helper Ankit Nautiyal
2023-07-28  4:11 ` [Intel-gfx] [PATCH 03/20] drm/i915/dp_mst: Use output_format to get the final link bpp Ankit Nautiyal
2023-07-28  4:11 ` [Intel-gfx] [PATCH 04/20] drm/i915/dp: Use consistent name for link bpp and compressed bpp Ankit Nautiyal
2023-07-28  4:11 ` [Intel-gfx] [PATCH 05/20] drm/i915/dp: Update Bigjoiner interface bits for computing " Ankit Nautiyal
2023-07-28  4:11 ` [Intel-gfx] [PATCH 06/20] drm/i915/intel_cdclk: Add vdsc with bigjoiner constraints on min_cdlck Ankit Nautiyal
2023-07-28  4:11 ` [Intel-gfx] [PATCH 07/20] drm/i915/dp: Remove extra logs for printing DSC info Ankit Nautiyal
2023-07-28  4:11 ` [Intel-gfx] [PATCH 08/20] drm/display/dp: Fix the DP DSC Receiver cap size Ankit Nautiyal
2023-08-02 11:43   ` Lisovskiy, Stanislav
2023-07-28  4:11 ` [Intel-gfx] [PATCH 09/20] drm/i915/dp: Avoid forcing DSC BPC for MST case Ankit Nautiyal
2023-08-02 11:47   ` Lisovskiy, Stanislav
2023-07-28  4:11 ` [Intel-gfx] [PATCH 10/20] drm/i915/dp: Add functions to get min/max src input bpc with DSC Ankit Nautiyal
2023-08-02 12:05   ` Lisovskiy, Stanislav
2023-08-04  4:12     ` Nautiyal, Ankit K
2023-08-07 12:30       ` Lisovskiy, Stanislav
2023-08-08 10:08   ` Ankit Nautiyal
2023-07-28  4:11 ` [Intel-gfx] [PATCH 11/20] drm/i915/dp: Check min bpc DSC limits for dsc_force_bpc also Ankit Nautiyal
2023-08-07 12:33   ` Lisovskiy, Stanislav
2023-07-28  4:11 ` [Intel-gfx] [PATCH 12/20] drm/i915/dp: Avoid left shift of DSC output bpp by 4 Ankit Nautiyal
2023-07-28  4:11 ` [Intel-gfx] [PATCH 13/20] drm/i915/dp: Rename helper to get DSC max pipe_bpp Ankit Nautiyal
2023-08-07 12:06   ` Lisovskiy, Stanislav
2023-07-28  4:11 ` [Intel-gfx] [PATCH 14/20] drm/i915/dp: Separate out functions for edp/DP for computing DSC bpp Ankit Nautiyal
2023-08-07 12:08   ` Lisovskiy, Stanislav
2023-07-28  4:11 ` [Intel-gfx] [PATCH 15/20] drm/i915/dp: Add DSC BPC/BPP constraints while selecting pipe bpp with DSC Ankit Nautiyal
2023-08-07 12:23   ` Lisovskiy, Stanislav
2023-07-28  4:11 ` [Intel-gfx] [PATCH 16/20] drm/i915/dp: Separate out function to get compressed bpp with joiner Ankit Nautiyal
2023-08-07 12:35   ` Lisovskiy, Stanislav
2023-07-28  4:11 ` [Intel-gfx] [PATCH 17/20] drm/i915/dp: Get optimal link config to have best compressed bpp Ankit Nautiyal
2023-07-28  4:11 ` [Intel-gfx] [PATCH 18/20] drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info Ankit Nautiyal
2023-07-28  4:11 ` [Intel-gfx] [PATCH 19/20] drm/i915/dp: Check src/sink compressed bpp limit for edp Ankit Nautiyal
2023-08-07 12:27   ` Lisovskiy, Stanislav
2023-07-28  4:11 ` [Intel-gfx] [PATCH 20/20] drm/i915/dp: Check if force_dsc_output_format is possible Ankit Nautiyal
2023-08-07 12:25   ` Lisovskiy, Stanislav [this message]
2023-07-28  4:57 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for DSC misc fixes (rev5) Patchwork
2023-07-28  5:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-07-28 12:40 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-08-08 10:42 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for DSC misc fixes (rev6) Patchwork
2023-08-08 10:42 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-08-08 10:57 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-08 17:29 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=ZNDi0z9R7XXYq6HP@intel.com \
    --to=stanislav.lisovskiy@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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