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

drm/i915/display: force qgv check after the hw state readout

The current intel_bw_atomic_check do not check the possbility
of a sagv configuration change after the hw state readout.
Hence cannot update the sagv configuration until some other
relevant changes like data rates, number of planes etc. happen.
Introduce a flag to force qgv check in such cases.

Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240405113533.338553-7-vinod.govindapillai@intel.com

+12 -2
+6 -2
drivers/gpu/drm/i915/display/intel_bw.c
··· 755 755 intel_bw_crtc_data_rate(crtc_state); 756 756 bw_state->num_active_planes[crtc->pipe] = 757 757 intel_bw_crtc_num_active_planes(crtc_state); 758 + bw_state->force_check_qgv = true; 758 759 759 760 drm_dbg_kms(&i915->drm, "pipe %c data rate %u num active planes %u\n", 760 761 pipe_name(crtc->pipe), ··· 1340 1339 new_bw_state = intel_atomic_get_new_bw_state(state); 1341 1340 1342 1341 if (new_bw_state && 1343 - intel_can_enable_sagv(i915, old_bw_state) != 1344 - intel_can_enable_sagv(i915, new_bw_state)) 1342 + (intel_can_enable_sagv(i915, old_bw_state) != 1343 + intel_can_enable_sagv(i915, new_bw_state) || 1344 + new_bw_state->force_check_qgv)) 1345 1345 changed = true; 1346 1346 1347 1347 /* ··· 1355 1353 ret = intel_bw_check_qgv_points(i915, old_bw_state, new_bw_state); 1356 1354 if (ret) 1357 1355 return ret; 1356 + 1357 + new_bw_state->force_check_qgv = false; 1358 1358 1359 1359 return 0; 1360 1360 }
+6
drivers/gpu/drm/i915/display/intel_bw.h
··· 47 47 */ 48 48 u16 qgv_points_mask; 49 49 50 + /* 51 + * Flag to force the QGV comparison in atomic check right after the 52 + * hw state readout 53 + */ 54 + bool force_check_qgv; 55 + 50 56 int min_cdclk[I915_MAX_PIPES]; 51 57 unsigned int data_rate[I915_MAX_PIPES]; 52 58 u8 num_active_planes[I915_MAX_PIPES];