[PATCH 3/8] drm/i915/vdsc: Add register bits for VDSC2 engine
Ankit Nautiyal
ankit.k.nautiyal at intel.com
Tue Jun 18 05:49:59 UTC 2024
Add bits to enable third VDSC engine VDSC2.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
---
.../drm/i915/display/intel_display_types.h | 1 +
drivers/gpu/drm/i915/display/intel_vdsc.c | 20 +++++++++++++++----
.../gpu/drm/i915/display/intel_vdsc_regs.h | 4 ++++
3 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 0360952d8eb2..8aa0398391fd 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -1034,6 +1034,7 @@ struct intel_csc_matrix {
enum intel_dsc_split_state {
DSC_SPLIT_DISABLED,
DSC_SPLIT_2_STREAMS,
+ DSC_SPLIT_3_STREAMS,
};
struct intel_crtc_state {
diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.c b/drivers/gpu/drm/i915/display/intel_vdsc.c
index 3b50627e0403..397c14b7abc2 100644
--- a/drivers/gpu/drm/i915/display/intel_vdsc.c
+++ b/drivers/gpu/drm/i915/display/intel_vdsc.c
@@ -375,6 +375,8 @@ static int intel_dsc_get_vdsc_per_pipe(const struct intel_crtc_state *crtc_state
switch (crtc_state->dsc.dsc_split) {
case DSC_SPLIT_2_STREAMS :
return 2;
+ case DSC_SPLIT_3_STREAMS :
+ return 3;
case DSC_SPLIT_DISABLED :
default :
break;
@@ -795,6 +797,12 @@ void intel_dsc_enable(const struct intel_crtc_state *crtc_state)
dss_ctl2_val |= VDSC1_ENABLE;
dss_ctl1_val |= JOINER_ENABLE;
}
+
+ if (vdsc_instances_per_pipe > 2) {
+ dss_ctl2_val |= VDSC2_ENABLE;
+ dss_ctl2_val |= SMALL_JOINER_CONFIG_3_ENGINES;
+ }
+
if (crtc_state->joiner_pipes) {
dss_ctl1_val |= BIG_JOINER_ENABLE;
if (!intel_crtc_is_joiner_secondary(crtc_state))
@@ -989,11 +997,15 @@ void intel_dsc_get_config(struct intel_crtc_state *crtc_state)
if (!crtc_state->dsc.compression_enable)
goto out;
- if ((dss_ctl1 & JOINER_ENABLE) &&
- (dss_ctl2 & VDSC1_ENABLE))
- crtc_state->dsc.dsc_split = DSC_SPLIT_2_STREAMS;
- else
+ if (dss_ctl1 & JOINER_ENABLE) {
+ if (dss_ctl2 & (VDSC2_ENABLE | SMALL_JOINER_CONFIG_3_ENGINES))
+ crtc_state->dsc.dsc_split = DSC_SPLIT_3_STREAMS;
+
+ else if (dss_ctl2 & VDSC1_ENABLE)
+ crtc_state->dsc.dsc_split = DSC_SPLIT_2_STREAMS;
+ } else {
crtc_state->dsc.dsc_split = DSC_SPLIT_DISABLED;
+ }
intel_dsc_get_pps_config(crtc_state);
out:
diff --git a/drivers/gpu/drm/i915/display/intel_vdsc_regs.h b/drivers/gpu/drm/i915/display/intel_vdsc_regs.h
index cb4375c98a12..79c443ae4a1c 100644
--- a/drivers/gpu/drm/i915/display/intel_vdsc_regs.h
+++ b/drivers/gpu/drm/i915/display/intel_vdsc_regs.h
@@ -22,6 +22,10 @@
#define DSS_CTL2 _MMIO(0x67404)
#define VDSC0_ENABLE REG_BIT(31)
+#define VDSC2_ENABLE REG_BIT(30)
+#define SMALL_JOINER_CONFIG_3_ENGINES REG_BIT(23)
+#define ODD_PIXEL_REMOVAL REG_BIT(18)
+#define ODD_PIXEL_REMOVAL_CONFIG_EOL REG_BIT(17)
#define VDSC1_ENABLE REG_BIT(15)
#define RIGHT_DL_BUF_TARGET_DEPTH_MASK (0xfff << 0)
#define RIGHT_DL_BUF_TARGET_DEPTH(pixels) ((pixels) << 0)
--
2.40.1
More information about the Intel-gfx-trybot
mailing list