linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David Härdeman" <david@hardeman.nu>
To: Jarod Wilson <jarod@redhat.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>,
	linux-media@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH 3/4] ir-core: move decoding state to ir_raw_event_ctrl
Date: Tue, 8 Jun 2010 19:50:17 +0200	[thread overview]
Message-ID: <20100608175017.GC5181@hardeman.nu> (raw)
In-Reply-To: <20100607201530.GG16638@redhat.com>

On Mon, Jun 07, 2010 at 04:15:30PM -0400, Jarod Wilson wrote:
> On Mon, Jun 07, 2010 at 09:00:03PM +0200, David Härdeman wrote:
> > On Mon, May 03, 2010 at 05:00:05PM -0300, Mauro Carvalho Chehab wrote:
> > > David Härdeman wrote:
> > > > This patch moves the state from each raw decoder into the
> > > > ir_raw_event_ctrl struct.
> > > > 
> > > > This allows the removal of code like this:
> > > > 
> > > >         spin_lock(&decoder_lock);
> > > >         list_for_each_entry(data, &decoder_list, list) {
> > > >                 if (data->ir_dev == ir_dev)
> > > >                         break;
> > > >         }
> > > >         spin_unlock(&decoder_lock);
> > > >         return data;
> > > > 
> > > > which is currently run for each decoder on each event in order
> > > > to get the client-specific decoding state data.
> > > > 
> > > > In addition, ir decoding modules and ir driver module load
> > > > order is now independent. Centralizing the data also allows
> > > > for a nice code reduction of about 30% per raw decoder as
> > > > client lists and client registration callbacks are no longer
> > > > necessary.
> > > 
> > > The registration callbacks will likely still be needed by lirc,
> > > as you need to create/delete lirc_dev interfaces, when the module
> > > is registered, but I might be wrong. It would be interesting to
> > > add lirc_dev first, in order to be sure about the better interfaces
> > > for it.
> > 
> > Or the lirc_dev patch can add whatever interfaces it needs. Anyway, the 
> > current interfaces are not good enough since it'll break if lirc_dev is 
> > loaded after the hardware modules.
> 
> This is something I've been meaning to mention myself. On system boot, if
> an mceusb device is connected, it pretty regularly only has the NEC
> decoder available to use. I have to reload mceusb, or make sure ir-core is
> explicitly loaded, wait a bit, then load mceusb, if I want to have all of
> the protocol handlers available -- which includes the needed-by-default
> rc6 one. I've only briefly tinkered with trying to fix it, sounds like you
> may already have fixage within this patchset.

The problem is that without the patchset, each decoder is expected to 
carry it's own list of datastructures for each hardware receiver.  
Hardware receiver addition/removal is signalled through a callback to 
the decoder, but the callback will (naturally) not be invoked if the 
hardware driver is already loaded when the decoder is. So loading a 
decoder "late" or reloading a decoder will mean that it doesn't know 
about pre-existing hardware.

> > In addition, random module load order is currently broken (try loading 
> > decoders first and hardware later and you'll see).  With this patch, it 
> > works again.
> 
> Want.

Then please help me with two things:

a) Test the patches I just sent (especially 6/8 and 7/8, they should
   be independent from the rest)

b) Mauro mentioned in <4BDF28C0.4060102@redhat.com> that:

	I liked the idea of your redesign, but I didn't like the removal
	of a per-decoder sysfs entry. As already discussed, there are
	cases where we'll need a per-decoder sysfs entry (lirc_dev is
	probably one of those cases - also Jarod's imon driver is
	currently implementing a modprobe parameter that needs to be
	moved to the driver).

   could you please confirm if your lirc and/or imon drivers would be
   negatively affected by the proposed patches?


-- 
David Härdeman
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2010-06-08 17:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-24 21:13 [PATCH 0/4] ir-core sysfs protocol selection simplification David Härdeman
2010-04-24 21:14 ` [PATCH 1/4] ir-core: remove IR_TYPE_PD David Härdeman
2010-04-24 21:14 ` [PATCH 2/4] ir-core: centralize sysfs raw decoder enabling/disabling David Härdeman
2010-05-03 19:49   ` Mauro Carvalho Chehab
2010-06-07 18:48     ` David Härdeman
2010-04-24 21:14 ` [PATCH 3/4] ir-core: move decoding state to ir_raw_event_ctrl David Härdeman
2010-05-03 20:00   ` Mauro Carvalho Chehab
2010-06-07 19:00     ` David Härdeman
2010-06-07 20:15       ` Jarod Wilson
2010-06-08 17:50         ` David Härdeman [this message]
2010-06-09  3:46           ` Jarod Wilson
2010-06-09 13:29             ` Jarod Wilson
2010-06-09 17:56               ` David Härdeman
2010-06-09 18:15                 ` Jarod Wilson
2010-06-10  1:25                   ` Jarod Wilson
2010-06-13 20:29                     ` David Härdeman
2010-06-16 20:04                       ` Jarod Wilson
2010-06-16 20:41                         ` Jarod Wilson
2010-06-17 12:14                           ` Andy Walls
2010-06-17 15:11                             ` Jarod Wilson
2010-06-21  0:47                               ` Andy Walls
2010-06-21  3:51                                 ` Jarod Wilson
2010-06-21 11:04                                   ` Andy Walls
2010-07-06 17:12                                     ` Jarod Wilson
2010-04-24 21:14 ` [PATCH 4/4] ir-core: remove ir-functions usage from cx231xx David Härdeman

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=20100608175017.GC5181@hardeman.nu \
    --to=david@hardeman.nu \
    --cc=jarod@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.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).