Add the DP link layer (LL) symbol based timing generator parameters to the crtc state. Dump them in the crtc state dump and compare them in the pipe config checker.
Bspec: 68922 Signed-off-by: Arun R Murthy <[email protected]> Reviewed-by: Suraj Kandpal <[email protected]> --- .../gpu/drm/i915/display/intel_crtc_state_dump.c | 11 +++++++++++ drivers/gpu/drm/i915/display/intel_display.c | 11 +++++++++++ drivers/gpu/drm/i915/display/intel_display_types.h | 22 ++++++++++++++++++++++ 3 files changed, 44 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c b/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c index c51b21222dc6e7c0e6621b903fa0c04cb7508b60..2e10c9a5bba63b026d1ce02e4e1580fb5aeecb02 100644 --- a/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c +++ b/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c @@ -262,6 +262,17 @@ void intel_crtc_state_dump(const struct intel_crtc_state *pipe_config, pipe_config->dip.pps_sdp_tl, pipe_config->dip.vsc_sdp_tl, pipe_config->dip.vsc_ext_sdp_tl); + + drm_printf(&p, + "dp symbol tg: %s, hactive: %d, htotal: %d, chunk size: %d, data m: 0x%016llx%016llx, data n: 0x%016llx%016llx\n", + str_enabled_disabled(pipe_config->dp_symbol_tg.enable), + pipe_config->dp_symbol_tg.hactive, + pipe_config->dp_symbol_tg.htotal, + pipe_config->dp_symbol_tg.chunk_size, + pipe_config->dp_symbol_tg.data_m[1], + pipe_config->dp_symbol_tg.data_m[0], + pipe_config->dp_symbol_tg.data_n[1], + pipe_config->dp_symbol_tg.data_n[0]); } drm_printf(&p, "audio: %i, infoframes: %i, infoframes enabled: 0x%x\n", diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index afe70e9ce34739b67e4d87754f9c361ff77f37a6..7caf5bee8718729667376b487b0584b47891f05a 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -5515,6 +5515,17 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config, PIPE_CONF_CHECK_I(min_hblank); + PIPE_CONF_CHECK_BOOL(dp_symbol_tg.enable); + if (pipe_config->dp_symbol_tg.enable) { + PIPE_CONF_CHECK_I(dp_symbol_tg.hactive); + PIPE_CONF_CHECK_I(dp_symbol_tg.htotal); + PIPE_CONF_CHECK_I(dp_symbol_tg.chunk_size); + PIPE_CONF_CHECK_LLI(dp_symbol_tg.data_m[0]); + PIPE_CONF_CHECK_LLI(dp_symbol_tg.data_m[1]); + PIPE_CONF_CHECK_LLI(dp_symbol_tg.data_n[0]); + PIPE_CONF_CHECK_LLI(dp_symbol_tg.data_n[1]); + } + if (HAS_DOUBLE_BUFFERED_M_N(display)) { if (!fastset || !pipe_config->update_m_n) PIPE_CONF_CHECK_M_N(dp_m_n); diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index d0748837ce97ce6291b36adeb0014686f7d699f9..ee4152afb86dbe1ad041d4d99c058bdb97932350 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -1196,6 +1196,28 @@ struct intel_crtc_state { int max_pipe_bpp; /* in 1 bpp units */ int pipe_bpp; /* in 1 bpp units */ int min_hblank; + + /* DP link layer (LL) symbol based timing generator, 8b/10b MST and 128b/132b SST/MST */ + struct intel_dp_symbol_tg { + bool enable; + /* in LL symbol cycles, as opposed to the zero based register values */ + u16 hactive; + u16 htotal; + u16 chunk_size; + /* 128 bit Data M/N as {low 64 bits, high 64 bits}, the one for the active PLL */ + u64 data_m[2]; + u64 data_n[2]; + /* + * The Data M/N depends on if the PLL uses SSC, which is known only + * once the active PLL is selected. These are the computed values, + * for the SSC disabled (0) and SSC enabled (1) case. + */ + struct intel_dp_symbol_tg_mn { + u64 data_m[2]; + u64 data_n[2]; + } mn[2]; + } dp_symbol_tg; + struct intel_link_m_n dp_m_n; /* m2_n2 for eDP downclock */ -- 2.25.1
