All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Sean Paul <seanpaul@chromium.org>, dri-devel@lists.freedesktop.org
Subject: [PATCH 0/4] drm: Make modeset locking easier
Date: Thu, 15 Jul 2021 21:49:50 +0300	[thread overview]
Message-ID: <20210715184954.7794-1-ville.syrjala@linux.intel.com> (raw)

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


WARNING: multiple messages have this Message-ID (diff)
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Sean Paul <seanpaul@chromium.org>, dri-devel@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 0/4] drm: Make modeset locking easier
Date: Thu, 15 Jul 2021 21:49:50 +0300	[thread overview]
Message-ID: <20210715184954.7794-1-ville.syrjala@linux.intel.com> (raw)

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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2021-07-15 18:50 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 18:49 Ville Syrjala [this message]
2021-07-15 18:49 ` [Intel-gfx] [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-15 18:49   ` [Intel-gfx] " Ville Syrjala
2021-07-20 13:44   ` Daniel Vetter
2021-07-20 13:44     ` [Intel-gfx] " Daniel Vetter
2021-10-04 11:15     ` Ville Syrjälä
2021-10-04 11:15       ` [Intel-gfx] " Ville Syrjälä
2021-10-13 11:59       ` Daniel Vetter
2021-10-13 11:59         ` [Intel-gfx] " Daniel Vetter
2021-10-13 12:06         ` Ville Syrjälä
2021-10-13 12:06           ` [Intel-gfx] " Ville Syrjälä
2021-10-13 21:00           ` Fernando Ramos
2021-10-13 21:00             ` [Intel-gfx] " Fernando Ramos
2021-10-14 13:23             ` Daniel Vetter
2021-10-14 13:23               ` [Intel-gfx] " 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   ` [Intel-gfx] " Ville Syrjala
2021-07-15 18:49 ` [PATCH 3/4] drm/i915: Extract intel_crtc_initial_commit() Ville Syrjala
2021-07-15 18:49   ` [Intel-gfx] " Ville Syrjala
2021-07-15 18:49 ` [PATCH 4/4] drm/i915: Use drm_modeset_lock_ctx_retry() & co Ville Syrjala
2021-07-15 18:49   ` [Intel-gfx] " Ville Syrjala
2021-07-16 22:21 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: Make modeset locking easier Patchwork
2021-07-16 22:24 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-07-16 22:27 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2021-07-16 22:50 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-07-17  7:20 ` [Intel-gfx] ✗ Fi.CI.IGT: 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=20210715184954.7794-1-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=seanpaul@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.