Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915/lt_phy: Add xe3plpd .dump_hw_state hook

Add .dump_hw_state function pointer for xe3plpd platform
to support dpll framework. While at it, switch to use
drm_printer structure to print hw state information.

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260312080657.2648265-12-mika.kahola@intel.com

+19 -12
+2 -3
drivers/gpu/drm/i915/display/intel_display.c
··· 5070 5070 const struct intel_lt_phy_pll_state *a, 5071 5071 const struct intel_lt_phy_pll_state *b) 5072 5072 { 5073 - struct intel_display *display = to_intel_display(crtc); 5074 5073 char *chipname = "LTPHY"; 5075 5074 5076 5075 pipe_config_mismatch(p, fastset, crtc, name, chipname); 5077 5076 5078 5077 drm_printf(p, "expected:\n"); 5079 - intel_lt_phy_dump_hw_state(display, a); 5078 + intel_lt_phy_dump_hw_state(p, a); 5080 5079 drm_printf(p, "found:\n"); 5081 - intel_lt_phy_dump_hw_state(display, b); 5080 + intel_lt_phy_dump_hw_state(p, b); 5082 5081 } 5083 5082 5084 5083 bool
+7
drivers/gpu/drm/i915/display/intel_dpll_mgr.c
··· 4649 4649 return xe3plpd_compute_non_tc_phy_dpll(state, crtc, encoder); 4650 4650 } 4651 4651 4652 + static void xe3plpd_dump_hw_state(struct drm_printer *p, 4653 + const struct intel_dpll_hw_state *dpll_hw_state) 4654 + { 4655 + intel_lt_phy_dump_hw_state(p, &dpll_hw_state->ltpll); 4656 + } 4657 + 4652 4658 __maybe_unused 4653 4659 static const struct intel_dpll_mgr xe3plpd_pll_mgr = { 4654 4660 .dpll_info = xe3plpd_plls, ··· 4663 4657 .put_dplls = icl_put_dplls, 4664 4658 .update_active_dpll = icl_update_active_dpll, 4665 4659 .update_ref_clks = icl_update_dpll_ref_clks, 4660 + .dump_hw_state = xe3plpd_dump_hw_state, 4666 4661 }; 4667 4662 4668 4663 /**
+8 -8
drivers/gpu/drm/i915/display/intel_lt_phy.c
··· 2165 2165 intel_lt_phy_transaction_end(encoder, wakeref); 2166 2166 } 2167 2167 2168 - void intel_lt_phy_dump_hw_state(struct intel_display *display, 2168 + void intel_lt_phy_dump_hw_state(struct drm_printer *p, 2169 2169 const struct intel_lt_phy_pll_state *hw_state) 2170 2170 { 2171 2171 int i, j; 2172 2172 2173 - drm_dbg_kms(display->drm, "lt_phy_pll_hw_state: ssc enabled: %d, tbt mode: %d\n", 2174 - hw_state->ssc_enabled, hw_state->tbt_mode); 2173 + drm_printf(p, "lt_phy_pll_hw_state: ssc enabled: %d, tbt mode: %d\n", 2174 + hw_state->ssc_enabled, hw_state->tbt_mode); 2175 2175 2176 2176 for (i = 0; i < 3; i++) { 2177 - drm_dbg_kms(display->drm, "config[%d] = 0x%.4x,\n", 2178 - i, hw_state->config[i]); 2177 + drm_printf(p, "config[%d] = 0x%.4x,\n", 2178 + i, hw_state->config[i]); 2179 2179 } 2180 2180 2181 2181 for (i = 0; i <= 12; i++) 2182 2182 for (j = 3; j >= 0; j--) 2183 - drm_dbg_kms(display->drm, "vdr_data[%d][%d] = 0x%.4x,\n", 2184 - i, j, hw_state->data[i][j]); 2183 + drm_printf(p, "vdr_data[%d][%d] = 0x%.4x,\n", 2184 + i, j, hw_state->data[i][j]); 2185 2185 } 2186 2186 2187 2187 bool ··· 2336 2336 drm_printf(&p, "PLL state %s (%s):\n", 2337 2337 pll_state_name, 2338 2338 is_precomputed_state ? "precomputed" : "computed"); 2339 - intel_lt_phy_dump_hw_state(display, pll_state); 2339 + intel_lt_phy_dump_hw_state(&p, pll_state); 2340 2340 } 2341 2341 2342 2342 static void intel_lt_phy_pll_verify_params(struct intel_display *display,
+2 -1
drivers/gpu/drm/i915/display/intel_lt_phy.h
··· 8 8 9 9 #include <linux/types.h> 10 10 11 + struct drm_printer; 11 12 struct intel_atomic_state; 12 13 struct intel_display; 13 14 struct intel_encoder; ··· 27 26 const struct intel_lt_phy_pll_state *lt_state); 28 27 void intel_lt_phy_set_signal_levels(struct intel_encoder *encoder, 29 28 const struct intel_crtc_state *crtc_state); 30 - void intel_lt_phy_dump_hw_state(struct intel_display *display, 29 + void intel_lt_phy_dump_hw_state(struct drm_printer *p, 31 30 const struct intel_lt_phy_pll_state *hw_state); 32 31 bool 33 32 intel_lt_phy_pll_compare_hw_state(const struct intel_lt_phy_pll_state *a,