From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 0/9] drm/i915: Eliminate foo_state->state pointer usage
Date: Tue, 24 Nov 2026 01:03:03 +0200 [thread overview]
Message-ID: <awTGJ81kc4gvIk4s@intel.com> (raw)
In-Reply-To: <20261123225139.23087-1-ville.syrjala@linux.intel.com>
On Tue, Nov 24, 2026 at 12:51:30AM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The foo_state->state pointer is dangerous. Stop using it
> as much as possible. I think we're down to one use after
> this, but eliminating that one requires drm subsystem wide
> changes.
Actually there are a few more. Some also require drm core/driver
changes, one is in some broken PSR w/a code that probably just
needs to get axed, and a few are in the ILK watermark
intel_atomic_crtc_state_for_each_plane_state() macro that
definitely needs to get nuked.
>
> Ville Syrjälä (9):
> drm/i915/ddi: Pass the atomic state to
> intel_ddi_port_sync_transcoders()
> drm/i915/mst: Pass the full atomic state to
> intel_dp_mtp_tu_compute_config()
> drm/i915/hdmi: Pass the full atomic state to intel_hdmi_bpc_possible()
> drm/i915/fdi: Pass the full atomic state to ilk_check_fdi_lanes()
> drm/i915/hdcp: Pass the full atomic state to intel_hdcp_atomic_check()
> drm/i915/global_state: Pass the full atomic state into
> intel_atomic_{lock,serialize}_global_state()
> drm/i915/global_state: Store the display in the global object and use
> it
> drm/i915/global_state: Remove the obj_state->state footgun
> drm/i915/sdvo: Add a FIXME about the connector_state->state footgun
>
> drivers/gpu/drm/i915/display/g4x_hdmi.c | 2 +-
> drivers/gpu/drm/i915/display/intel_atomic.c | 2 +-
> drivers/gpu/drm/i915/display/intel_bw.c | 25 ++--
> drivers/gpu/drm/i915/display/intel_cdclk.c | 18 +--
> drivers/gpu/drm/i915/display/intel_dbuf_bw.c | 2 +-
> drivers/gpu/drm/i915/display/intel_ddi.c | 9 +-
> drivers/gpu/drm/i915/display/intel_dp.c | 109 +++++++++++-------
> drivers/gpu/drm/i915/display/intel_dp.h | 6 +-
> drivers/gpu/drm/i915/display/intel_dp_mst.c | 63 +++++-----
> drivers/gpu/drm/i915/display/intel_dp_mst.h | 3 +-
> drivers/gpu/drm/i915/display/intel_fdi.c | 22 ++--
> .../gpu/drm/i915/display/intel_global_state.c | 14 +--
> .../gpu/drm/i915/display/intel_global_state.h | 8 +-
> drivers/gpu/drm/i915/display/intel_hdcp.c | 6 +-
> drivers/gpu/drm/i915/display/intel_hdcp.h | 4 +-
> drivers/gpu/drm/i915/display/intel_hdmi.c | 56 +++++----
> drivers/gpu/drm/i915/display/intel_hdmi.h | 7 +-
> drivers/gpu/drm/i915/display/intel_pmdemand.c | 4 +-
> drivers/gpu/drm/i915/display/intel_sdvo.c | 4 +
> drivers/gpu/drm/i915/display/skl_watermark.c | 16 +--
> 20 files changed, 218 insertions(+), 162 deletions(-)
>
> --
> 2.56.1
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2026-11-23 23:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 22:51 [PATCH 0/9] drm/i915: Eliminate foo_state->state pointer usage Ville Syrjala
2026-11-23 22:51 ` [PATCH 1/9] drm/i915/ddi: Pass the atomic state to intel_ddi_port_sync_transcoders() Ville Syrjala
2026-11-23 22:51 ` [PATCH 2/9] drm/i915/mst: Pass the full atomic state to intel_dp_mtp_tu_compute_config() Ville Syrjala
2026-11-23 22:51 ` [PATCH 3/9] drm/i915/hdmi: Pass the full atomic state to intel_hdmi_bpc_possible() Ville Syrjala
2026-11-23 22:51 ` [PATCH 4/9] drm/i915/fdi: Pass the full atomic state to ilk_check_fdi_lanes() Ville Syrjala
2026-11-23 22:51 ` [PATCH 5/9] drm/i915/hdcp: Pass the full atomic state to intel_hdcp_atomic_check() Ville Syrjala
2026-11-23 22:51 ` [PATCH 6/9] drm/i915/global_state: Pass the full atomic state into intel_atomic_{lock, serialize}_global_state() Ville Syrjala
2026-11-23 22:51 ` [PATCH 7/9] drm/i915/global_state: Store the display in the global object and use it Ville Syrjala
2026-11-23 22:51 ` [PATCH 8/9] drm/i915/global_state: Remove the obj_state->state footgun Ville Syrjala
2026-11-23 22:51 ` [PATCH 9/9] drm/i915/sdvo: Add a FIXME about the connector_state->state footgun Ville Syrjala
2026-11-23 23:03 ` Ville Syrjälä [this message]
2026-11-24 1:29 ` ✓ i915.CI.BAT: success for drm/i915: Eliminate foo_state->state pointer usage Patchwork
2026-11-24 9:39 ` ✗ i915.CI.Full: failure " Patchwork
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=awTGJ81kc4gvIk4s@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
/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