From: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org, suraj.kandpal@intel.com,
ville.syrjala@linux.intel.com
Subject: [PATCH 10/17] drm/i915/display/vdsc: Add ultrajoiner support with DSC
Date: Fri, 27 Sep 2024 20:52:34 +0530 [thread overview]
Message-ID: <20240927152241.4014909-11-ankit.k.nautiyal@intel.com> (raw)
In-Reply-To: <20240927152241.4014909-1-ankit.k.nautiyal@intel.com>
From: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Add changes to DSC which are required for Ultrajoiner.
v2:
-Use correct helper for setting bits for bigjoiner secondary. (Ankit)
-Use primary/secondary instead of master/slave. (Suraj)
v3: Add the ultrajoiner helpers and use it for setting ultrajoiner
bits (Ankit)
v4: Use num_vdsc_instances *= num_joined_pipes (Ville)
v5: Align the helper to get ultrajoiner enabled pipes with other helpers
(Ville)
Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 42 ++++++++++++++++++++
drivers/gpu/drm/i915/display/intel_display.h | 3 ++
drivers/gpu/drm/i915/display/intel_vdsc.c | 11 ++++-
3 files changed, 54 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 099304a74203..40ad3fdaab10 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -312,6 +312,48 @@ u8 _intel_modeset_secondary_pipes(const struct intel_crtc_state *crtc_state)
return bigjoiner_secondary_pipes(crtc_state);
}
+bool intel_crtc_is_ultrajoiner(const struct intel_crtc_state *crtc_state)
+{
+ return intel_crtc_num_joined_pipes(crtc_state) >= 4;
+}
+
+static u8 ultrajoiner_primary_pipes(const struct intel_crtc_state *crtc_state)
+{
+ if (!intel_crtc_is_ultrajoiner(crtc_state))
+ return 0;
+
+ return crtc_state->joiner_pipes & (0b00010001 << joiner_primary_pipe(crtc_state));
+}
+
+bool intel_crtc_is_ultrajoiner_primary(const struct intel_crtc_state *crtc_state)
+{
+ struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+
+ return intel_crtc_is_ultrajoiner(crtc_state) &&
+ BIT(crtc->pipe) & ultrajoiner_primary_pipes(crtc_state);
+}
+
+/*
+ * The ultrajoiner enable bit doesn't seem to follow primary/secondary logic or
+ * any other logic, so lets just add helper function to
+ * at least hide this hassle..
+ */
+static u8 ultrajoiner_enable_pipes(const struct intel_crtc_state *crtc_state)
+{
+ if (!intel_crtc_is_ultrajoiner(crtc_state))
+ return 0;
+
+ return crtc_state->joiner_pipes & (0b01110111 << joiner_primary_pipe(crtc_state));
+}
+
+bool intel_crtc_ultrajoiner_enable_needed(const struct intel_crtc_state *crtc_state)
+{
+ struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+
+ return intel_crtc_is_ultrajoiner(crtc_state) &&
+ BIT(crtc->pipe) & ultrajoiner_enable_pipes(crtc_state);
+}
+
u8 intel_crtc_joiner_secondary_pipes(const struct intel_crtc_state *crtc_state)
{
if (crtc_state->joiner_pipes)
diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
index 1f0fed5ea7bc..61e1df878de9 100644
--- a/drivers/gpu/drm/i915/display/intel_display.h
+++ b/drivers/gpu/drm/i915/display/intel_display.h
@@ -441,6 +441,9 @@ bool intel_crtc_is_joiner_secondary(const struct intel_crtc_state *crtc_state);
bool intel_crtc_is_joiner_primary(const struct intel_crtc_state *crtc_state);
bool intel_crtc_is_bigjoiner_primary(const struct intel_crtc_state *crtc_state);
bool intel_crtc_is_bigjoiner_secondary(const struct intel_crtc_state *crtc_state);
+bool intel_crtc_is_ultrajoiner(const struct intel_crtc_state *crtc_state);
+bool intel_crtc_is_ultrajoiner_primary(const struct intel_crtc_state *crtc_state);
+bool intel_crtc_ultrajoiner_enable_needed(const struct intel_crtc_state *crtc_state);
u8 intel_crtc_joiner_secondary_pipes(const struct intel_crtc_state *crtc_state);
u8 _intel_modeset_primary_pipes(const struct intel_crtc_state *crtc_state);
u8 _intel_modeset_secondary_pipes(const struct intel_crtc_state *crtc_state);
diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.c b/drivers/gpu/drm/i915/display/intel_vdsc.c
index 8158e3702ed5..c3405234dc51 100644
--- a/drivers/gpu/drm/i915/display/intel_vdsc.c
+++ b/drivers/gpu/drm/i915/display/intel_vdsc.c
@@ -379,9 +379,9 @@ static int intel_dsc_get_vdsc_per_pipe(const struct intel_crtc_state *crtc_state
int intel_dsc_get_num_vdsc_instances(const struct intel_crtc_state *crtc_state)
{
int num_vdsc_instances = intel_dsc_get_vdsc_per_pipe(crtc_state);
+ int num_joined_pipes = intel_crtc_num_joined_pipes(crtc_state);
- if (crtc_state->joiner_pipes)
- num_vdsc_instances *= 2;
+ num_vdsc_instances *= num_joined_pipes;
return num_vdsc_instances;
}
@@ -770,7 +770,14 @@ void intel_dsc_enable(const struct intel_crtc_state *crtc_state)
dss_ctl1_val |= JOINER_ENABLE;
}
if (crtc_state->joiner_pipes) {
+ if (intel_crtc_ultrajoiner_enable_needed(crtc_state))
+ dss_ctl1_val |= ULTRA_JOINER_ENABLE;
+
+ if (intel_crtc_is_ultrajoiner_primary(crtc_state))
+ dss_ctl1_val |= PRIMARY_ULTRA_JOINER_ENABLE;
+
dss_ctl1_val |= BIG_JOINER_ENABLE;
+
if (intel_crtc_is_bigjoiner_primary(crtc_state))
dss_ctl1_val |= PRIMARY_BIG_JOINER_ENABLE;
}
--
2.45.2
next prev parent reply other threads:[~2024-09-27 15:21 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-27 15:22 [PATCH 00/17] Ultrajoiner basic functionality series Ankit Nautiyal
2024-09-27 15:22 ` [PATCH 01/17] drm/i915/display_device: Add Check HAS_DSC for bigjoiner Ankit Nautiyal
2024-09-27 15:22 ` [PATCH 02/17] drm/i915/display_debugfs: Allow force joiner only if supported Ankit Nautiyal
2024-09-27 15:22 ` [PATCH 03/17] drm/i915/display: Modify debugfs for joiner to force n pipes Ankit Nautiyal
2024-09-27 15:22 ` [PATCH 04/17] drm/i915/dp: Add helper to compute num pipes required Ankit Nautiyal
2024-09-27 15:22 ` [PATCH 05/17] drm/i915: Split current joiner hw state readout Ankit Nautiyal
2024-09-27 15:22 ` [PATCH 06/17] drm/i915: Add bigjoiner and uncompressed joiner hw readout sanity checks Ankit Nautiyal
2024-09-27 15:22 ` [PATCH 07/17] drm/i915/display: Add macro HAS_ULTRAJOINER() Ankit Nautiyal
2024-09-27 15:22 ` [PATCH 08/17] drm/i915/display: Refactor enable_joiner_pipes Ankit Nautiyal
2024-09-27 15:22 ` [PATCH 09/17] drm/i915: Implement hw state readout and checks for ultrajoiner Ankit Nautiyal
2024-09-27 15:22 ` Ankit Nautiyal [this message]
2024-09-27 15:22 ` [PATCH 11/17] drm/i915/dp: Refactor joiner max_bpp calculations into separate functions Ankit Nautiyal
2024-09-27 15:43 ` Ville Syrjälä
2024-09-27 15:22 ` [PATCH 12/17] drm/i915/dp: Use num_joined_pipes in bigjoiner_bw_max_bpp Ankit Nautiyal
2024-09-27 15:44 ` Ville Syrjälä
2024-09-27 15:22 ` [PATCH 13/17] drm/i915/dp: Modify compressed bpp limitations for ultrajoiner Ankit Nautiyal
2024-09-27 15:55 ` Ville Syrjälä
2024-09-27 17:04 ` Ankit Nautiyal
2024-09-27 15:22 ` [PATCH 14/17] drm/i915/dp: Simplify helper to get slice count with joiner Ankit Nautiyal
2024-09-27 15:22 ` [PATCH 15/17] drm/i915: Compute config and mode valid changes for ultrajoiner Ankit Nautiyal
2024-09-27 15:22 ` [PATCH 16/17] drm/i915/display: Consider ultrajoiner for computing maxdotclock Ankit Nautiyal
2024-09-27 15:22 ` [PATCH 17/17] drm/i915/intel_dp: Add support for forcing ultrajoiner Ankit Nautiyal
2024-09-27 17:16 ` ✓ CI.Patch_applied: success for Ultrajoiner basic functionality series (rev6) Patchwork
2024-09-27 17:17 ` ✗ CI.checkpatch: warning " Patchwork
2024-09-27 17:18 ` ✓ CI.KUnit: success " Patchwork
2024-09-27 17:29 ` ✓ CI.Build: " Patchwork
2024-09-27 17:31 ` ✓ CI.Hooks: " Patchwork
2024-09-27 17:33 ` ✗ CI.checksparse: warning " Patchwork
2024-09-27 18:03 ` ✓ CI.BAT: success " Patchwork
2024-09-27 19:38 ` ✓ CI.Patch_applied: success for Ultrajoiner basic functionality series (rev7) Patchwork
2024-09-27 19:39 ` ✗ CI.checkpatch: warning " Patchwork
2024-09-27 19:40 ` ✓ CI.KUnit: success " Patchwork
2024-09-27 19:51 ` ✓ CI.Build: " Patchwork
2024-09-27 19:54 ` ✓ CI.Hooks: " Patchwork
2024-09-27 19:55 ` ✗ CI.checksparse: warning " Patchwork
2024-09-27 20:20 ` ✓ CI.BAT: success " Patchwork
2024-09-30 6:03 ` ✗ CI.FULL: failure for Ultrajoiner basic functionality series (rev6) Patchwork
2024-09-30 6:38 ` ✗ CI.FULL: failure for Ultrajoiner basic functionality series (rev7) Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-09-27 8:38 [PATCH 00/17] Ultrajoiner basic functionality series Ankit Nautiyal
2024-09-27 8:38 ` [PATCH 10/17] drm/i915/display/vdsc: Add ultrajoiner support with DSC Ankit Nautiyal
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=20240927152241.4014909-11-ankit.k.nautiyal@intel.com \
--to=ankit.k.nautiyal@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=suraj.kandpal@intel.com \
--cc=ville.syrjala@linux.intel.com \
/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