dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] drm: Make modeset locking easier
@ 2021-07-15 18:49 Ville Syrjala
  2021-07-15 18:49 ` [PATCH 1/4] drm: Introduce drm_modeset_lock_ctx_retry() Ville Syrjala
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Ville Syrjala @ 2021-07-15 18:49 UTC (permalink / raw)
  To: intel-gfx; +Cc: Sean Paul, dri-devel

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

While staring at some DRM_MODESET_LOCK_ALL_{BEGIN,END}() conversions
I decided I don't really like what those macros do.

The main problems that I see:
- the magic goto inside limits their usefulness to baically
  a single statement, unless you're willing to look inside and
  find out the name of the magic label
- can't help at all in the "we don't want to lock everything"
  cases, which are quite numerous
- not at all obvious that there's a loop in there

So I figured I'd try to come up with something more universally useful.

Cc: Sean Paul <seanpaul@chromium.org>
Cc: Daniel Vetter <daniel@ffwll.ch>

Ville Syrjälä (4):
  drm: Introduce drm_modeset_lock_ctx_retry()
  drm: Introduce drm_modeset_lock_all_ctx_retry()
  drm/i915: Extract intel_crtc_initial_commit()
  drm/i915: Use drm_modeset_lock_ctx_retry() & co.

 drivers/gpu/drm/drm_modeset_lock.c            |  44 ++++
 drivers/gpu/drm/i915/display/g4x_dp.c         |  17 +-
 drivers/gpu/drm/i915/display/intel_audio.c    |  17 +-
 drivers/gpu/drm/i915/display/intel_ddi.c      |  16 +-
 drivers/gpu/drm/i915/display/intel_display.c  | 192 ++++++++----------
 .../drm/i915/display/intel_display_debugfs.c  |  45 ++--
 drivers/gpu/drm/i915/display/intel_pipe_crc.c |  38 ++--
 include/drm/drm_modeset_lock.h                |  26 +++
 8 files changed, 188 insertions(+), 207 deletions(-)

-- 
2.31.1


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

end of thread, other threads:[~2021-10-14 13:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-15 18:49 [PATCH 0/4] drm: Make modeset locking easier Ville Syrjala
2021-07-15 18:49 ` [PATCH 1/4] drm: Introduce drm_modeset_lock_ctx_retry() Ville Syrjala
2021-07-20 13:44   ` Daniel Vetter
2021-10-04 11:15     ` Ville Syrjälä
2021-10-13 11:59       ` Daniel Vetter
2021-10-13 12:06         ` Ville Syrjälä
2021-10-13 21:00           ` Fernando Ramos
2021-10-14 13:23             ` Daniel Vetter
2021-07-15 18:49 ` [PATCH 2/4] drm: Introduce drm_modeset_lock_all_ctx_retry() Ville Syrjala
2021-07-15 18:49 ` [PATCH 3/4] drm/i915: Extract intel_crtc_initial_commit() Ville Syrjala
2021-07-15 18:49 ` [PATCH 4/4] drm/i915: Use drm_modeset_lock_ctx_retry() & co Ville Syrjala

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