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/display: Set and get the casf config

Set the configuration for CASF and capture it
in crtc_state and get the configuration by
reading back. Add the support to compare the
software and hardware state of CASF.

v2: Update subject[Ankit]
v3: Add the state compare[Ankit]

Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patch.msgid.link/20251028120747.3027332-9-ankit.k.nautiyal@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

authored by

Nemesa Garg and committed by
Jani Nikula
5f331b24 0672cf98

+20 -6
+7
drivers/gpu/drm/i915/display/intel_display.c
··· 4228 4228 return ret; 4229 4229 } 4230 4230 4231 + ret = intel_casf_compute_config(crtc_state); 4232 + if (ret) 4233 + return ret; 4234 + 4231 4235 if (DISPLAY_VER(display) >= 9) { 4232 4236 if (intel_crtc_needs_modeset(crtc_state) || 4233 4237 intel_crtc_needs_fastset(crtc_state) || ··· 5298 5294 5299 5295 PIPE_CONF_CHECK_I(scaler_state.scaler_id); 5300 5296 PIPE_CONF_CHECK_I(pixel_rate); 5297 + PIPE_CONF_CHECK_BOOL(hw.casf_params.casf_enable); 5298 + PIPE_CONF_CHECK_I(hw.casf_params.win_size); 5299 + PIPE_CONF_CHECK_I(hw.casf_params.strength); 5301 5300 5302 5301 PIPE_CONF_CHECK_X(gamma_mode); 5303 5302 if (display->platform.cherryview)
+13 -6
drivers/gpu/drm/i915/display/skl_scaler.c
··· 981 981 continue; 982 982 983 983 id = i; 984 - crtc_state->pch_pfit.enabled = true; 984 + 985 + /* Read CASF regs for second scaler */ 986 + if (HAS_CASF(display) && id == 1) 987 + intel_casf_sharpness_get_config(crtc_state); 988 + 989 + if (!crtc_state->hw.casf_params.casf_enable) 990 + crtc_state->pch_pfit.enabled = true; 985 991 986 992 pos = intel_de_read(display, SKL_PS_WIN_POS(crtc->pipe, i)); 987 993 size = intel_de_read(display, SKL_PS_WIN_SZ(crtc->pipe, i)); 988 994 989 - drm_rect_init(&crtc_state->pch_pfit.dst, 990 - REG_FIELD_GET(PS_WIN_XPOS_MASK, pos), 991 - REG_FIELD_GET(PS_WIN_YPOS_MASK, pos), 992 - REG_FIELD_GET(PS_WIN_XSIZE_MASK, size), 993 - REG_FIELD_GET(PS_WIN_YSIZE_MASK, size)); 995 + if (!crtc_state->hw.casf_params.casf_enable) 996 + drm_rect_init(&crtc_state->pch_pfit.dst, 997 + REG_FIELD_GET(PS_WIN_XPOS_MASK, pos), 998 + REG_FIELD_GET(PS_WIN_YPOS_MASK, pos), 999 + REG_FIELD_GET(PS_WIN_XSIZE_MASK, size), 1000 + REG_FIELD_GET(PS_WIN_YSIZE_MASK, size)); 994 1001 995 1002 scaler_state->scalers[i].in_use = true; 996 1003 break;