From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 5/7] drm/i915: Reuse intel_dp_supports_dsc() for MST
Date: Fri, 17 May 2024 17:53:54 +0300 [thread overview]
Message-ID: <20240517145356.26103-6-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20240517145356.26103-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
intel_dp_supports_dsc() now works for MST as well, reuse it.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 4 ++--
drivers/gpu/drm/i915/display/intel_dp.h | 3 +++
drivers/gpu/drm/i915/display/intel_dp_mst.c | 20 ++++----------------
3 files changed, 9 insertions(+), 18 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 6dfde22e5f9d..a15ef6c015c8 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1459,8 +1459,8 @@ bool intel_dp_supports_fec(struct intel_dp *intel_dp,
drm_dp_sink_supports_fec(connector->dp.fec_capability);
}
-static bool intel_dp_supports_dsc(struct intel_connector *connector,
- const struct intel_crtc_state *crtc_state)
+bool intel_dp_supports_dsc(struct intel_connector *connector,
+ const struct intel_crtc_state *crtc_state)
{
if (!intel_dp_has_dsc(connector))
return false;
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
index c0d3e315559e..f1d90fc458d9 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -170,6 +170,9 @@ bool intel_dp_supports_fec(struct intel_dp *intel_dp,
const struct intel_connector *connector,
const struct intel_crtc_state *pipe_config);
+bool intel_dp_supports_dsc(struct intel_connector *connector,
+ const struct intel_crtc_state *crtc_state);
+
u32 intel_dp_dsc_nearest_valid_bpp(struct drm_i915_private *i915, u32 bpp, u32 pipe_bpp);
void intel_ddi_update_pipe(struct intel_atomic_state *state,
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index b57753d2d82c..4a624c826604 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -400,18 +400,6 @@ static int intel_dp_mst_update_slots(struct intel_encoder *encoder,
return 0;
}
-static bool
-intel_dp_mst_dsc_source_support(const struct intel_crtc_state *crtc_state)
-{
- struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
-
- /*
- * FIXME: Enabling DSC on ICL results in blank screen and FIFO pipe /
- * transcoder underruns, re-enable DSC after fixing this issue.
- */
- return DISPLAY_VER(i915) >= 12 && intel_dsc_source_support(crtc_state);
-}
-
static int mode_hblank_period_ns(const struct drm_display_mode *mode)
{
return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(mode->htotal - mode->hdisplay,
@@ -443,7 +431,7 @@ hblank_expansion_quirk_needs_dsc(const struct intel_connector *connector,
}
static bool
-adjust_limits_for_dsc_hblank_expansion_quirk(const struct intel_connector *connector,
+adjust_limits_for_dsc_hblank_expansion_quirk(struct intel_connector *connector,
const struct intel_crtc_state *crtc_state,
struct link_config_limits *limits,
bool dsc)
@@ -456,7 +444,7 @@ adjust_limits_for_dsc_hblank_expansion_quirk(const struct intel_connector *conne
return true;
if (!dsc) {
- if (intel_dp_mst_dsc_source_support(crtc_state)) {
+ if (intel_dp_supports_dsc(connector, crtc_state)) {
drm_dbg_kms(&i915->drm,
"[CRTC:%d:%s][CONNECTOR:%d:%s] DSC needed by hblank expansion quirk\n",
crtc->base.base.id, crtc->base.name,
@@ -503,7 +491,7 @@ adjust_limits_for_dsc_hblank_expansion_quirk(const struct intel_connector *conne
static bool
intel_dp_mst_compute_config_limits(struct intel_dp *intel_dp,
- const struct intel_connector *connector,
+ struct intel_connector *connector,
struct intel_crtc_state *crtc_state,
bool dsc,
struct link_config_limits *limits)
@@ -602,7 +590,7 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
str_yes_no(ret), str_yes_no(joiner_needs_dsc),
str_yes_no(intel_dp->force_dsc_en));
- if (!intel_dp_mst_dsc_source_support(pipe_config))
+ if (!intel_dp_supports_dsc(connector, pipe_config))
return -EINVAL;
if (!intel_dp_mst_compute_config_limits(intel_dp,
--
2.44.1
next prev parent reply other threads:[~2024-05-17 14:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-17 14:53 [PATCH 0/7] drm/i915: DSC stuff Ville Syrjala
2024-05-17 14:53 ` [PATCH 1/7] drm/i915: Drop redundant dsc_decompression_aux check Ville Syrjala
2024-05-17 14:53 ` [PATCH 2/7] drm/i915: Extract intel_dp_has_dsc() Ville Syrjala
2024-05-20 10:47 ` Jani Nikula
2024-05-20 16:00 ` Ville Syrjälä
2024-05-21 9:51 ` Jani Nikula
2024-05-21 18:26 ` Ville Syrjälä
2024-05-22 9:05 ` Jani Nikula
2024-05-17 14:53 ` [PATCH 3/7] drm/i915: Handle MST in intel_dp_has_dsc() Ville Syrjala
2024-05-17 14:53 ` [PATCH 4/7] drm/i915: Use intel_dp_has_dsc() during .compute_config() Ville Syrjala
2024-05-17 14:53 ` Ville Syrjala [this message]
2024-05-17 14:53 ` [PATCH 6/7] drm/i915: Utilize edp_disable_dsc from VBT Ville Syrjala
2024-05-17 14:53 ` [PATCH 7/7] drm/i915: Remove bogus MST check in intel_dp_has_audio() Ville Syrjala
2024-05-20 11:02 ` Jani Nikula
2024-05-17 15:38 ` ✗ Fi.CI.SPARSE: warning for drm/i915: DSC stuff Patchwork
2024-05-17 16:01 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-05-20 11:03 ` [PATCH 0/7] " Jani Nikula
2024-06-12 14:58 ` ✗ Fi.CI.SPARSE: warning for drm/i915: DSC stuff (rev2) Patchwork
2024-06-12 14:59 ` ✓ Fi.CI.BAT: success " Patchwork
2024-06-14 0:50 ` ✗ 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=20240517145356.26103-6-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.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