Skip to contentSkip to conversation

drm/amd/display: Skip dpp1_dscl_set_scaler_filter if filter is null

PATCH New Ma Ke 1 participant 1 message Sep 14, 2024

Subsystems (4)
lore
Share & tools
lore

Ma Ke

author
#0 lore raw

PATCH 1/1 drm/amd/display: Skip dpp1_dscl_set_scaler_filter if filter is null

Callers can pass null in filter (i.e. from returned from the function dpp1_dscl_get_filter_coeffs_64p) and a null check is added to ensure that is not the case.

Fixes 5e9a81b2c465 ("drm/amd/display: separate scl functions out from dcn10_dpp")
---
 drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_dscl.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_dscl.c +3 -0
index 808bca9fb804..bcafeb7b5b79 100644
@@ -248,6 +248,9 @@ static void dpp1_dscl_set_scaler_filter(
 	int pair;
 	uint16_t odd_coef, even_coef;
 
+	if (!filter)
+		return;
+
 	REG_SET_3(SCL_COEF_RAM_TAP_SELECT, 0,
 		SCL_COEF_RAM_TAP_PAIR_IDX, 0,
 		SCL_COEF_RAM_PHASE, 0,
Signature · 1 line
2.25.1