Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Suraj Kandpal <suraj.kandpal@intel.com>
To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 1/7] drm/dp_helper: Add helper to check DSC support with given o/p format
Date: Wed, 22 Feb 2023 11:01:47 +0530	[thread overview]
Message-ID: <20230222053153.3658345-2-suraj.kandpal@intel.com> (raw)
In-Reply-To: <20230222053153.3658345-1-suraj.kandpal@intel.com>

From: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

Add helper to check if the DP sink supports DSC with the given
o/p format.

v2: Add documentation for the helper. (Uma Shankar)

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
 include/drm/display/drm_dp_helper.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h
index ab55453f2d2c..41da8eb4801e 100644
--- a/include/drm/display/drm_dp_helper.h
+++ b/include/drm/display/drm_dp_helper.h
@@ -194,6 +194,19 @@ drm_dp_dsc_sink_max_slice_width(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
 		DP_DSC_SLICE_WIDTH_MULTIPLIER;
 }
 
+/*
+ * drm_dp_dsc_sink_supports_format() - check if sink supports DSC with given output format
+ * @dsc_dpcd : DSC-capability DPCDs of the sink
+ * @output_format: output_format which is to be checked
+ *
+ * Returns true if the sink supports DSC with the given output_format, false otherwise.
+ */
+static inline bool
+drm_dp_dsc_sink_supports_format(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE], u8 output_format)
+{
+	return dsc_dpcd[DP_DSC_DEC_COLOR_FORMAT_CAP - DP_DSC_SUPPORT] & output_format;
+}
+
 /* Forward Error Correction Support on DP 1.4 */
 static inline bool
 drm_dp_sink_supports_fec(const u8 fec_capable)
-- 
2.25.1


  reply	other threads:[~2023-02-22  5:33 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22  5:31 [Intel-gfx] [PATCH 0/7] Enable YCbCr420 format for VDSC Suraj Kandpal
2023-02-22  5:31 ` Suraj Kandpal [this message]
2023-03-08 10:50   ` [Intel-gfx] [PATCH 1/7] drm/dp_helper: Add helper to check DSC support with given o/p format Shankar, Uma
2023-02-22  5:31 ` [Intel-gfx] [PATCH 2/7] drm/i915/dp: Check if DSC supports the given output_format Suraj Kandpal
2023-03-08 10:55   ` Shankar, Uma
2023-02-22  5:31 ` [Intel-gfx] [PATCH 3/7] drm/i915: Adding the new registers for DSC Suraj Kandpal
2023-03-08 10:58   ` Shankar, Uma
2023-03-08 11:26     ` Jani Nikula
2023-03-08 11:31       ` Shankar, Uma
2023-02-22  5:31 ` [Intel-gfx] [PATCH 4/7] drm/i915: Enable YCbCr420 for VDSC Suraj Kandpal
2023-03-08 10:59   ` Shankar, Uma
2023-02-22  5:31 ` [Intel-gfx] [PATCH 5/7] drm/i915/display: Fill in native_420 field Suraj Kandpal
2023-03-03  5:34   ` [Intel-gfx] [PATCH v2 " Suraj Kandpal
2023-03-08 11:21     ` Shankar, Uma
2023-02-22  5:31 ` [Intel-gfx] [PATCH 6/7] drm/i915/vdsc: Check slice design requirement Suraj Kandpal
2023-03-08 11:23   ` Shankar, Uma
2023-02-22  5:31 ` [Intel-gfx] [PATCH 7/7] drm/i915/dsc: Add debugfs entry to validate DSC output formats Suraj Kandpal
2023-02-22  6:04 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Enable YCbCr420 format for VDSC Patchwork
2023-02-22  6:31 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-03-03 10:50 ` [Intel-gfx] ✓ Fi.CI.BAT: success for Enable YCbCr420 format for VDSC (rev2) Patchwork
2023-03-06 17:57 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-03-08 11:30 ` [Intel-gfx] [PATCH 0/7] Enable YCbCr420 format for VDSC Jani Nikula
2023-03-08 12:32   ` Dmitry Baryshkov
2023-03-08 12:47     ` Jani Nikula
2023-03-28 13:20   ` Kandpal, Suraj
2023-03-28 13:27     ` Dmitry Baryshkov
2023-04-03  6:08       ` Shankar, Uma
2023-04-03  7:15         ` Shankar, Uma
2023-04-07  2:57     ` Dmitry Baryshkov
2023-04-07  3:11       ` Kandpal, Suraj
2023-04-13 14:33         ` Dmitry Baryshkov

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=20230222053153.3658345-2-suraj.kandpal@intel.com \
    --to=suraj.kandpal@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