linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
To: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cc: Alan <alan@linux.intel.com>,
	vincent.hervieux@gmail.com, sakari.ailus@linux.intel.com,
	linux-media@vger.kernel.org
Subject: Re: [PATCH 1/3] atomisp: Fix up the open v load race
Date: Tue, 12 Dec 2017 15:55:25 +0000	[thread overview]
Message-ID: <20171212155525.7ab67f2a@alans-desktop> (raw)
In-Reply-To: <20171212090350.0b57dbbb@vento.lan>

On Tue, 12 Dec 2017 09:03:50 -0200
Mauro Carvalho Chehab <mchehab@s-opensource.com> wrote:

> Em Mon, 06 Nov 2017 23:36:36 +0000
> Alan <alan@linux.intel.com> escreveu:
> 
> > This isn't the ideal final solution but it stops the main problem for now
> > where an open (often from udev) races the device initialization and we try
> > and load the firmware twice at the same time. This needless to say doesn't
> > usually end well.  
> 
> What we do on most drivers is that video_register_device() is called
> only after all hardware init.
> 
> That's usually enough to avoid race conditions with udev, although
> a mutex is also common in order to avoid some other race conditions
> between open/close - with can happen with multiple opens.

There are a whole bunch of other ordering issues to deal with in the
atomisp case beyond this - another one is that the camera probe can race
the ISP probe.

Quite a lot of the registration code needs fixing, but I'm prioritizing
stabilizing the code first, and trying to get the Cherrytrail version
going.

Alan

      reply	other threads:[~2017-12-12 15:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-06 23:36 [PATCH 1/3] atomisp: Fix up the open v load race Alan
2017-11-06 23:36 ` [PATCH 2/3] atomisp: fix vfree of bogus data on unload Alan
2017-11-13 22:05   ` Sakari Ailus
2017-11-14  0:16     ` Alan Cox
2017-11-14 14:10       ` Sakari Ailus
2017-11-06 23:37 ` [PATCH 3/3] atomisp: hmm gives a bogus warning " Alan
2017-12-12 11:03 ` [PATCH 1/3] atomisp: Fix up the open v load race Mauro Carvalho Chehab
2017-12-12 15:55   ` Alan Cox [this message]

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=20171212155525.7ab67f2a@alans-desktop \
    --to=gnomes@lxorguk.ukuu.org.uk \
    --cc=alan@linux.intel.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@s-opensource.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=vincent.hervieux@gmail.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;
as well as URLs for NNTP newsgroup(s).