Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] drm/i915: Support DRM_MODE_ATOMIC_RESET
@ 2026-11-24 10:59 Maxime Ripard
  2026-11-24 10:59 ` [PATCH 1/6] drm/atomic-state-helper: Provide more STATE_CHECK_* variants Maxime Ripard
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Maxime Ripard @ 2026-11-24 10:59 UTC (permalink / raw)
  To: Maxime Ripard, Jani Nikula, Thomas Zimmermann, Maarten Lankhorst,
	Tvrtko Ursulin, David Airlie, Simona Vetter, Joonas Lahtinen,
	Rodrigo Vivi
  Cc: intel-xe, intel-gfx, dri-devel

Hi,

i915 objects didn't implement the reset callback, allocating their state
when they are registered instead, so the atomic_create_state conversion
had nothing to convert and left i915 out. The new DRM_MODE_ATOMIC_RESET
flag builds its commits out of states created through that hook, and is
only reported and accepted when every plane, CRTC and connector of the
device implements it: i915 therefore rejects the reset with -EOPNOTSUPP
and doesn't report DRM_CAP_ATOMIC_RESET.

This series implements atomic_create_state for the i915 CRTCs, planes
and connectors, and carries the current state over the created ones,
like other drivers had to: a CRTC that stays enabled across a reset
takes the nomodeset path of intel_atomic_check(), which relies on the
state a duplicate carries over.

The pipe configuration comparison is also moved to the STATE_CHECK_*
macros, with the u8, u16 hexadecimal and enum variants the i915 state
needs fed back into the framework, giving every compared field
compile-time type checking to start consolidating with the new atomic
SRO infrastructure.

Built with LLVM=1 and checkpatch'd, the new macros come with kunit
tests, IGT runs are still to be done.

Let me know what you think,
Maxime

Test-with: 20261112162147.766264-1-mripard@kernel.org

Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Maxime Ripard (6):
      drm/atomic-state-helper: Provide more STATE_CHECK_* variants
      drm/i915: Use the STATE_CHECK_* macros in the pipe config comparison
      drm/i915: Implement CRTC atomic_create_state
      drm/i915: Implement plane atomic_create_state
      drm/i915: Implement connector atomic_create_state
      drm/i915: Carry the current state over created states

 drivers/gpu/drm/i915/display/i9xx_plane.c          |   2 +
 drivers/gpu/drm/i915/display/icl_dsi.c             |   1 +
 drivers/gpu/drm/i915/display/intel_atomic.c        |  23 +
 drivers/gpu/drm/i915/display/intel_atomic.h        |   2 +
 drivers/gpu/drm/i915/display/intel_connector.c     |  23 +-
 drivers/gpu/drm/i915/display/intel_crt.c           |   1 +
 drivers/gpu/drm/i915/display/intel_crtc.c          |  12 +
 drivers/gpu/drm/i915/display/intel_cursor.c        |   1 +
 drivers/gpu/drm/i915/display/intel_display.c       | 607 ++++++++++++---------
 drivers/gpu/drm/i915/display/intel_dp.c            |   1 +
 drivers/gpu/drm/i915/display/intel_dp_mst.c        |   1 +
 drivers/gpu/drm/i915/display/intel_dvo.c           |   1 +
 drivers/gpu/drm/i915/display/intel_hdmi.c          |   1 +
 drivers/gpu/drm/i915/display/intel_lvds.c          |   1 +
 drivers/gpu/drm/i915/display/intel_plane.c         |  25 +-
 drivers/gpu/drm/i915/display/intel_plane.h         |   1 +
 drivers/gpu/drm/i915/display/intel_sdvo.c          |  26 +-
 drivers/gpu/drm/i915/display/intel_sprite.c        |   3 +
 drivers/gpu/drm/i915/display/intel_tv.c            |  15 +
 drivers/gpu/drm/i915/display/skl_universal_plane.c |   3 +
 drivers/gpu/drm/i915/display/vlv_dsi.c             |   1 +
 .../gpu/drm/tests/drm_atomic_state_readout_test.c  |  99 ++++
 include/drm/drm_atomic_state_readout_helper.h      |  66 +++
 23 files changed, 638 insertions(+), 278 deletions(-)
---
base-commit: e6e635c4407e5bb8ddc6017a2e9825c17240e799
change-id: 20261124-drm-i915-conversion-state-readout-3086a6aa1265
prerequisite-change-id: 20260708-drm-reset-state-flag-2fb2b5711f97:v12
prerequisite-patch-id: eb7ef1bbf930a321d43086788e29a61899cabea9
prerequisite-patch-id: 69cb59e0e1800c71f284adf63ca98641df772975
prerequisite-patch-id: 794b3f9689e1eb474d90535b43d8c8de58ec5e48
prerequisite-patch-id: af7dfeb5128254a2368b8c3abd54c778caeea1fe
prerequisite-patch-id: d7baa4aaf5b686cef8a7762f6ec46e517505a7d2
prerequisite-patch-id: 3e4d1a009d6a944b20b2675d87436fb2acec2750
prerequisite-patch-id: cac360557a737dffdfec293c4c08608e327fd6fd
prerequisite-patch-id: 8e64689f12166016a371aaa15ec0e6691546c794
prerequisite-patch-id: 118c8beb0d45f5476c8814f82b79c90a4ea48e05
prerequisite-change-id: 20250730-drm-state-readout-108f089c1c30:v9
prerequisite-patch-id: f8c3385d46e2be7cba68c715e31f1b3ea80a45eb
prerequisite-patch-id: f04cf40e8c62005a0b5a928a68d394be2079a202
prerequisite-patch-id: cd09f9e502efc35aa22ede9d3c3b46e064466d22
prerequisite-patch-id: eb0a00c943fd93a555c0ef044d4008f5f83edd08
prerequisite-patch-id: a277ed9151f84539ec40ecfe630c18ff482e022c
prerequisite-patch-id: ae6b7f40f2b9002bf0eea54b1c41281db2adcde7
prerequisite-patch-id: e755bcd2e58f79d14e246446864ff204699d1a87
prerequisite-patch-id: 90687ec829c655bcfe4d81b12e24bccca7bd4833
prerequisite-patch-id: ef67b1cd0911021331844861ae0f2fad84b270fc
prerequisite-patch-id: e92f85eb974b4f507692da4fd0909cf272366b23
prerequisite-patch-id: dfe3ca8ddf643420beb99e613492ac319b2266b0
prerequisite-patch-id: fd825bcbb5b262926dca7139f759e9ad19a057de
prerequisite-patch-id: ad586d955ee4d48bc8bb935041602dfbe0fa0a8a
prerequisite-patch-id: 92a1b99d84487fc35457542f408cf3ceb40f2200
prerequisite-patch-id: f1605fb5ed653b35443647422bc348bdc3f03060
prerequisite-patch-id: aa65022cdfedaad2cedf6b5be5bf7a403d23a0cc
prerequisite-patch-id: 3f9fc15f5d3ef94c1026b020ffe08e0ff1504243
prerequisite-patch-id: 3d1e451d302dd742bec53cb1aa50643aa71ebf4c
prerequisite-patch-id: ba5c149130eb1a23094d507281bfadc444bd0b2f
prerequisite-patch-id: c89f59e3aa7165d77d1a616ab87d2ab4207ccae4
prerequisite-patch-id: 94873fa437500fc6a377875fca01ab35cb545382
prerequisite-patch-id: 66ff18129c8f0e1df1c4b899513a70f591c51eb4
prerequisite-patch-id: 08da79b7e93e614f918d0c65d3e015d7d62e0a2a
prerequisite-patch-id: 81e5473c19b1df4d76e0854305295277722b84a0
prerequisite-patch-id: 9ad81f0921c7ff7121244dfa81e8625eef2872ef
prerequisite-patch-id: 91b87c9dfd4f94ea8612d35ba0a59e734ea13478
prerequisite-patch-id: 25fbe2804e1a162e75cc083e8cb45fc01efca01b
prerequisite-patch-id: 9ef0dc76a9b0f998ea8e568849568648d4d859ea
prerequisite-patch-id: dd1b97b1854cfa5dbf7b794732e6fd7fdbab8e74
prerequisite-patch-id: a2c2d019cc44d5a7c5c64aa13039ca0502150dfe
prerequisite-patch-id: 8adda3ba9ca95ad041acfd258a31e4fe03d0c0e0
prerequisite-patch-id: 7b38fa633f4dec44d54037f1754f9d1e1c003e4d
prerequisite-patch-id: f8ff07c5ff81332c3e131c6e98532a83eab77304
prerequisite-patch-id: 3c12b1bf7245bb8ca3d98854a69c4e3eb3cc6c4e
prerequisite-patch-id: 28f453e6b4a60111c4f452bf1f470c965940df2d
prerequisite-patch-id: 5af22c10f16b8ba0920a4c9a942016982557df52
prerequisite-patch-id: f2667f1c8010b2147be6cbccdc7b4e8c8c90ca78
prerequisite-patch-id: 4b5c8d9aaa88af62ee71cdbf7581115ae8d2108e
prerequisite-patch-id: c13d82cab1c523a7589723b12a9d9c674d1b548c
prerequisite-patch-id: dc3f630e2f48e07c4287920da256f81fde29afbd
prerequisite-patch-id: e94aa17d17ba8fdbd935c455fd2ae52df3bb4d68
prerequisite-patch-id: a4f0694c3c6da19f47e160e6bed1b8b8b42c8180
prerequisite-patch-id: 732d43e26eff2f092a61d52950377bbee8d05186

Best regards,
-- 
Maxime Ripard <mripard@kernel.org>


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-11-24 11:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 10:59 [PATCH 0/6] drm/i915: Support DRM_MODE_ATOMIC_RESET Maxime Ripard
2026-11-24 10:59 ` [PATCH 1/6] drm/atomic-state-helper: Provide more STATE_CHECK_* variants Maxime Ripard
2026-11-24 10:59 ` [PATCH 2/6] drm/i915: Use the STATE_CHECK_* macros in the pipe config comparison Maxime Ripard
2026-11-24 11:23   ` Jani Nikula
2026-11-24 10:59 ` [PATCH 3/6] drm/i915: Implement CRTC atomic_create_state Maxime Ripard
2026-11-24 11:26   ` sashiko-bot
2026-11-24 10:59 ` [PATCH 4/6] drm/i915: Implement plane atomic_create_state Maxime Ripard
2026-11-24 11:19   ` sashiko-bot
2026-11-24 10:59 ` [PATCH 5/6] drm/i915: Implement connector atomic_create_state Maxime Ripard
2026-11-24 11:21   ` sashiko-bot
2026-11-24 10:59 ` [PATCH 6/6] drm/i915: Carry the current state over created states Maxime Ripard
2026-11-24 11:40   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox