Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Fernando Ramos <greenfoo@u92.eu>
Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	"Sean Paul" <seanpaul@chromium.org>
Subject: Re: [Intel-gfx] [PATCH 1/4] drm: Introduce drm_modeset_lock_ctx_retry()
Date: Thu, 14 Oct 2021 15:23:13 +0200	[thread overview]
Message-ID: <YWgvQXRCnKah8VKR@phenom.ffwll.local> (raw)
In-Reply-To: <YWdI82JKcncv3J71@zacax395.localdomain>

On Wed, Oct 13, 2021 at 11:00:35PM +0200, Fernando Ramos wrote:
> On 21/10/13 03:06PM, Ville Syrjälä wrote:
> > > And yes C is dangerous, but also C is verbose. I think one lesson from igt
> > > is that too many magic block constructs are bad, it's just not how C
> > > works. Definitely not in the kernel, where "oops I got it wrong because it
> > > was too clever" is bad.
> > > 
> > > > > Yes the macro we have is also not nice, but at least it's a screaming
> > > > > macro since it's all uppercase, so options are all a bit sucky. Which
> > > > > leads me to think we have a bit a https://xkcd.com/927/ situation going
> > > > > on.
> > > > > 
> > > > > I think minimally we should have one way to do this.
> > > > 
> > > > Well, there is no one way atm. All you can do is hand roll all the
> > > > boilerplate (and likely get it slightly wrong) if you don't want
> > > > lock_all.
> > > > 
> > > > The current macros only help with lock_all, and IMO the hidden gotos
> > > > are even uglier than a hidden for loop. Fernando already hit a case
> > > > where he couldn't use the macros twice due to conflicting goto
> > > > labels. With this for loop thing I think it would have just worked(tm).
> > > 
> > > I'm totally ok with repainting the shed, I just don't want some 80s
> > > multicolor flash show.
> > 
> > You have a better idea in mind?
> 
> Sorry, I completely forgot this discussion was going on and I just published V4
> of my patch set here:
> 
>     https://lore.kernel.org/dri-devel/20211013204846.90026-1-greenfoo@u92.eu/
> 
> Please, feel free to let me know (ideally, as a reply to the corresponding i915
> patch from that set) if you rather me not to modify i915 files for now.

My request is that we only have one way of doing this drm_modeset lock
retry business. So either this one here proposed by Ville, or the one Sean
Paul merged.

I honestly don't care which color we pick, as long as it's consistent
across the board. Please all you, figure this out.

Thanks, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  reply	other threads:[~2021-10-14 13:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 18:49 [Intel-gfx] [PATCH 0/4] drm: Make modeset locking easier Ville Syrjala
2021-07-15 18:49 ` [Intel-gfx] [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 [this message]
2021-07-15 18:49 ` [Intel-gfx] [PATCH 2/4] drm: Introduce drm_modeset_lock_all_ctx_retry() Ville Syrjala
2021-07-15 18:49 ` [Intel-gfx] [PATCH 3/4] drm/i915: Extract intel_crtc_initial_commit() Ville Syrjala
2021-07-15 18:49 ` [Intel-gfx] [PATCH 4/4] drm/i915: Use drm_modeset_lock_ctx_retry() & co 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=YWgvQXRCnKah8VKR@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=greenfoo@u92.eu \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=seanpaul@chromium.org \
    --cc=ville.syrjala@linux.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