Skip to contentSkip to conversation

drm/i915/psr: Repeat Selective Update area alignment

bug report Dan Carpenter 1 participant 1 message Apr 10

lore
Share & tools
lore
#0 lore raw

Hello Jouni Högander,

Commit 681e12440d8b ("drm/i915/psr: Repeat Selective Update area alignment") from Mar 4, 2026 (linux-next), leads to the following Smatch static checker warning:

	drivers/gpu/drm/i915/display/intel_psr.c:3028 intel_psr2_sel_fetch_update()
	error: uninitialized symbol 'cursor_in_su_area'.

drivers/gpu/drm/i915/display/intel_psr.c

    2995         if (full_update)
    2996                 goto skip_sel_fetch_set_loop;
    2997 
    2998         intel_psr_apply_su_area_workarounds(crtc_state);
    2999 
    3000         ret = drm_atomic_add_affected_planes(&state->base, &crtc->base);
    3001         if (ret)
    3002                 return ret;
    3003 
    3004         do {
    3005                 bool cursor_in_su_area;

Nothing ever sets cursor_in_su_area to false.

3006
3007 /*
3008 * Adjust su area to cover cursor fully as necessary
3009 * (early transport). This needs to be done after
3010 * drm_atomic_add_affected_planes to ensure visible
3011 * cursor is added into affected planes even when
3012 * cursor is not updated by itself.
3013 */
3014 intel_psr2_sel_fetch_et_alignment(state, crtc, &display_area,
3015 &cursor_in_su_area);
3016
3017 su_area_changed = intel_psr2_sel_fetch_pipe_alignment(crtc_state);
3018
3019 /*
3020 * If the cursor was outside the SU area before
3021 * alignment, the alignment step (which only expands
3022 * SU) may pull the cursor partially inside, so we
3023 * must run ET alignment again to fully cover it. But
3024 * if the cursor was already fully inside before
3025 * alignment, expanding the SU area won't change that,
3026 * so no further work is needed.
3027 */
--> 3028 if (cursor_in_su_area)

cursor_in_su_area is either true or uninitialized

    3029                         break;
    3030         } while (su_area_changed);
    3031 

This email is a free service from the Smatch-CI project [smatch.sf.net].

regards,
dan carpenter