public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: "Jouni Högander" <jouni.hogander@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: [bug report] drm/i915/psr: Repeat Selective Update area alignment
Date: Fri, 10 Apr 2026 21:04:11 +0300	[thread overview]
Message-ID: <adk7m-Su-XddxdHo@stanley.mountain> (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

                 reply	other threads:[~2026-04-10 18:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=adk7m-Su-XddxdHo@stanley.mountain \
    --to=error27@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jouni.hogander@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox