Skip to content

Commit d961eb2

Browse files
animesh-mannamattrope
authored andcommitted
drm/i915/bigjoiner: atomic commit changes for uncompressed joiner
Respective bit for master or slave to be set for uncompressed bigjoiner in dss_ctl1 register. Cc: Manasi Navare <[email protected]> Signed-off-by: Animesh Manna <[email protected]> Signed-off-by: Clinton Taylor <[email protected]> Signed-off-by: Matt Roper <[email protected]> Reviewed-by: Manasi Navare <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent e6f9bb6 commit d961eb2

File tree

4 files changed

+49
-1
lines changed

4 files changed

+49
-1
lines changed

drivers/gpu/drm/i915/display/intel_display.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3411,6 +3411,7 @@ static void icl_ddi_bigjoiner_pre_enable(struct intel_atomic_state *state,
34113411
const struct intel_crtc_state *crtc_state)
34123412
{
34133413
struct intel_crtc *master = to_intel_crtc(crtc_state->uapi.crtc);
3414+
struct drm_i915_private *dev_priv = to_i915(master->base.dev);
34143415
struct intel_crtc_state *master_crtc_state;
34153416
struct drm_connector_state *conn_state;
34163417
struct drm_connector *conn;
@@ -3444,6 +3445,9 @@ static void icl_ddi_bigjoiner_pre_enable(struct intel_atomic_state *state,
34443445
/* and DSC on slave */
34453446
intel_dsc_enable(NULL, crtc_state);
34463447
}
3448+
3449+
if (DISPLAY_VER(dev_priv) >= 13)
3450+
intel_uncompressed_joiner_enable(crtc_state);
34473451
}
34483452

34493453
static void hsw_crtc_enable(struct intel_atomic_state *state,
@@ -6250,6 +6254,8 @@ static bool hsw_get_pipe_config(struct intel_crtc *crtc,
62506254
}
62516255

62526256
intel_dsc_get_config(pipe_config);
6257+
if (DISPLAY_VER(dev_priv) >= 13 && !pipe_config->dsc.compression_enable)
6258+
intel_uncompressed_joiner_get_config(pipe_config);
62536259

62546260
if (!active) {
62556261
/* bigjoiner slave doesn't enable transcoder */

drivers/gpu/drm/i915/display/intel_vdsc.c

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,22 @@ static i915_reg_t dss_ctl2_reg(const struct intel_crtc_state *crtc_state)
10211021
return is_pipe_dsc(crtc_state) ? ICL_PIPE_DSS_CTL2(pipe) : DSS_CTL2;
10221022
}
10231023

1024+
void intel_uncompressed_joiner_enable(const struct intel_crtc_state *crtc_state)
1025+
{
1026+
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
1027+
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
1028+
u32 dss_ctl1_val = 0;
1029+
1030+
if (crtc_state->bigjoiner && !crtc_state->dsc.compression_enable) {
1031+
if (crtc_state->bigjoiner_slave)
1032+
dss_ctl1_val |= UNCOMPRESSED_JOINER_SLAVE;
1033+
else
1034+
dss_ctl1_val |= UNCOMPRESSED_JOINER_MASTER;
1035+
1036+
intel_de_write(dev_priv, dss_ctl1_reg(crtc_state), dss_ctl1_val);
1037+
}
1038+
}
1039+
10241040
void intel_dsc_enable(struct intel_encoder *encoder,
10251041
const struct intel_crtc_state *crtc_state)
10261042
{
@@ -1060,13 +1076,35 @@ void intel_dsc_disable(const struct intel_crtc_state *old_crtc_state)
10601076
struct intel_crtc *crtc = to_intel_crtc(old_crtc_state->uapi.crtc);
10611077
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
10621078

1063-
if (!old_crtc_state->dsc.compression_enable)
1079+
if (!(old_crtc_state->dsc.compression_enable &&
1080+
old_crtc_state->bigjoiner))
10641081
return;
10651082

10661083
intel_de_write(dev_priv, dss_ctl1_reg(old_crtc_state), 0);
10671084
intel_de_write(dev_priv, dss_ctl2_reg(old_crtc_state), 0);
10681085
}
10691086

1087+
void intel_uncompressed_joiner_get_config(struct intel_crtc_state *crtc_state)
1088+
{
1089+
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
1090+
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
1091+
u32 dss_ctl1;
1092+
1093+
dss_ctl1 = intel_de_read(dev_priv, dss_ctl1_reg(crtc_state));
1094+
if (dss_ctl1 & UNCOMPRESSED_JOINER_MASTER) {
1095+
crtc_state->bigjoiner = true;
1096+
if (!WARN_ON(INTEL_NUM_PIPES(dev_priv) == crtc->pipe + 1))
1097+
crtc_state->bigjoiner_linked_crtc =
1098+
intel_get_crtc_for_pipe(dev_priv, crtc->pipe + 1);
1099+
} else if (dss_ctl1 & UNCOMPRESSED_JOINER_SLAVE) {
1100+
crtc_state->bigjoiner = true;
1101+
crtc_state->bigjoiner_slave = true;
1102+
if (!WARN_ON(crtc->pipe == PIPE_A))
1103+
crtc_state->bigjoiner_linked_crtc =
1104+
intel_get_crtc_for_pipe(dev_priv, crtc->pipe - 1);
1105+
}
1106+
}
1107+
10701108
void intel_dsc_get_config(struct intel_crtc_state *crtc_state)
10711109
{
10721110
struct drm_dsc_config *vdsc_cfg = &crtc_state->dsc.config;

drivers/gpu/drm/i915/display/intel_vdsc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ struct intel_encoder;
1212
struct intel_crtc_state;
1313

1414
bool intel_dsc_source_support(const struct intel_crtc_state *crtc_state);
15+
void intel_uncompressed_joiner_enable(const struct intel_crtc_state *crtc_state);
1516
void intel_dsc_enable(struct intel_encoder *encoder,
1617
const struct intel_crtc_state *crtc_state);
1718
void intel_dsc_disable(const struct intel_crtc_state *crtc_state);
1819
int intel_dsc_compute_params(struct intel_encoder *encoder,
1920
struct intel_crtc_state *pipe_config);
21+
void intel_uncompressed_joiner_get_config(struct intel_crtc_state *crtc_state);
2022
void intel_dsc_get_config(struct intel_crtc_state *crtc_state);
2123
enum intel_display_power_domain
2224
intel_dsc_power_domain(const struct intel_crtc_state *crtc_state);

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11487,6 +11487,8 @@ enum skl_power_gate {
1148711487
#define SPLITTER_CONFIGURATION_MASK REG_GENMASK(26, 25)
1148811488
#define SPLITTER_CONFIGURATION_2_SEGMENT REG_FIELD_PREP(SPLITTER_CONFIGURATION_MASK, 0)
1148911489
#define SPLITTER_CONFIGURATION_4_SEGMENT REG_FIELD_PREP(SPLITTER_CONFIGURATION_MASK, 1)
11490+
#define UNCOMPRESSED_JOINER_MASTER (1 << 21)
11491+
#define UNCOMPRESSED_JOINER_SLAVE (1 << 20)
1149011492

1149111493
#define _ICL_PIPE_DSS_CTL2_PB 0x78204
1149211494
#define _ICL_PIPE_DSS_CTL2_PC 0x78404

0 commit comments

Comments
 (0)