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/cdclk: Implement Wa_13012396614

A new workaround was defined for Xe3_LPD, which requires a tweak on how
we handle MDCLK selection. Implement it.

Reviewed-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
Link: https://patch.msgid.link/20251222-display-wa-13012396614-timing-of-mdclk-source-selection-v1-2-a2f7e9447f7a@intel.com
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>

+31 -3
+28 -3
drivers/gpu/drm/i915/display/intel_cdclk.c
··· 39 39 #include "intel_display_regs.h" 40 40 #include "intel_display_types.h" 41 41 #include "intel_display_utils.h" 42 + #include "intel_display_wa.h" 42 43 #include "intel_dram.h" 43 44 #include "intel_mchbar_regs.h" 44 45 #include "intel_pci_config.h" ··· 1859 1858 1860 1859 static void icl_cdclk_pll_disable(struct intel_display *display) 1861 1860 { 1861 + /* 1862 + * Wa_13012396614: 1863 + * Fixes: A sporadic race condition between MDCLK selection and PLL 1864 + * enabling. 1865 + * Workaround: 1866 + * Change programming of MDCLK source selection in CDCLK_CTL: 1867 + * - When disabling the CDCLK PLL, first set MDCLK source to be CD2XCLK. 1868 + * - When enabling the CDCLK PLL, update MDCLK source selection only 1869 + * after the PLL is enabled (which is already done as part of the 1870 + * normal flow of _bxt_set_cdclk()). 1871 + */ 1872 + if (intel_display_wa(display, 13012396614)) 1873 + intel_de_rmw(display, CDCLK_CTL, MDCLK_SOURCE_SEL_MASK, MDCLK_SOURCE_SEL_CD2XCLK); 1874 + 1862 1875 intel_de_rmw(display, BXT_DE_PLL_ENABLE, 1863 1876 BXT_DE_PLL_PLL_ENABLE, 0); 1864 1877 ··· 2162 2147 cdclk >= 500000) 2163 2148 val |= BXT_CDCLK_SSA_PRECHARGE_ENABLE; 2164 2149 2165 - if (DISPLAY_VER(display) >= 20) 2166 - val |= xe2lpd_mdclk_source_sel(display); 2167 - else 2150 + if (DISPLAY_VER(display) >= 20) { 2151 + /* 2152 + * Wa_13012396614 requires selecting CD2XCLK as MDCLK source 2153 + * prior to disabling the PLL, which is already handled by 2154 + * icl_cdclk_pll_disable(). Here we are just making sure 2155 + * we keep the expected value. 2156 + */ 2157 + if (intel_display_wa(display, 13012396614) && vco == 0) 2158 + val |= MDCLK_SOURCE_SEL_CD2XCLK; 2159 + else 2160 + val |= xe2lpd_mdclk_source_sel(display); 2161 + } else { 2168 2162 val |= skl_cdclk_decimal(cdclk); 2163 + } 2169 2164 2170 2165 return val; 2171 2166 }
+2
drivers/gpu/drm/i915/display/intel_display_wa.c
··· 62 62 bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa, const char *name) 63 63 { 64 64 switch (wa) { 65 + case INTEL_DISPLAY_WA_13012396614: 66 + return DISPLAY_VERx100(display) == 3000; 65 67 case INTEL_DISPLAY_WA_14011503117: 66 68 return DISPLAY_VER(display) == 13; 67 69 case INTEL_DISPLAY_WA_14025769978:
+1
drivers/gpu/drm/i915/display/intel_display_wa.h
··· 27 27 * number. 28 28 */ 29 29 enum intel_display_wa { 30 + INTEL_DISPLAY_WA_13012396614, 30 31 INTEL_DISPLAY_WA_14011503117, 31 32 INTEL_DISPLAY_WA_14025769978, 32 33 INTEL_DISPLAY_WA_15018326506,