linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bruno Prémont" <bonbons@linux-vserver.org>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: linux-input@vger.kernel.org,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Kristian Høgsberg" <hoegsberg@gmail.com>,
	"Hans de Goede" <hdegoede@redhat.com>
Subject: Re: [PATCH] Input: evdev - add EVIOCREVOKE ioctl
Date: Wed, 4 Feb 2015 15:55:22 +0100	[thread overview]
Message-ID: <20150204155522.2997477e@neptune.home> (raw)
In-Reply-To: <CANq1E4SRSJmFG27PXLC2SL4cjFoP9H_cYzsr0A-SLoPTCQqitw@mail.gmail.com>

Hi David,

On Wed, 04 February 2015 David Herrmann wrote:
> On Wed, Feb 4, 2015 at 2:12 PM, Bruno Prémont wrote:
> > Hi David,
> >
> > Sorry for reviving this old thread (I didn't find more recent patch series
> > at first glance or have not been using the proper keyword while searching).
> >
> > At FOSDEM 2015 last Sunday Hans presented libinput X input driver and mentioned
> > evdev FD revoking.
> >
> > A question I raise was how are input devices to be put in a reasonable
> > state on FD revoking?
> > The specific case of force-feedback game-pads/wheels and the like that libinput
> > is expected to pass through to games was the main trigger.
> >
> > Assume:
> > - Game triggers some force-feedback event like vibrating device
> > - Game looses focus and gets its evdev FD revoked
> > - Newly focused application does not care about the game-pad/wheel
> >
> > How should the force-feedback activity get stopped on that focus change
> > and thus FD revoking?
> > Is the game expected to react before the FD being revoked (how long to
> > wait?) or should the kernel somehow reset the device to a sane state on
> > revoke (and if so, under which conditions?).
> >
> > Should some other evdev devices also receive a special treatment to reset
> > them into a known/idle state (eventually LEDs on keyboards, beep, ...)?
> 
> We call input_device_flush() on EVIOCREVOKE, which stops any ongoing
> FF owned by this handle. Same should be done for any per-handle state.
> However, LEDs are not associated with a handle, so it will stay the
> same. Applications are expected to re-sync their LEDs after they
> revoked a file-descriptor of someone else.

Thanks for the explanation!
It answers my question.

So all that's needed should be there unless a specific kernel-side driver
does not properly have state associated to handles.

> Thanks
> David

Bruno
--
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:[~2015-02-04 14:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27 11:25 [PATCH] Input: evdev - add EVIOCREVOKE ioctl David Herrmann
2013-08-27 11:39 ` [PATCH v2] " David Herrmann
2013-08-27 22:17   ` Dmitry Torokhov
2013-08-27 22:35     ` David Herrmann
2013-09-01 14:07   ` [PATCH v3] " David Herrmann
2013-09-06 17:12     ` David Herrmann
2013-09-06 18:04       ` Kristian Høgsberg
2013-09-07 11:00     ` [PATCH v4] " David Herrmann
2013-09-07 17:16       ` Dmitry Torokhov
2013-09-07 17:41         ` David Herrmann
2015-02-04 13:12 ` [PATCH] " Bruno Prémont
2015-02-04 13:16   ` David Herrmann
2015-02-04 14:55     ` Bruno Prémont [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=20150204155522.2997477e@neptune.home \
    --to=bonbons@linux-vserver.org \
    --cc=dh.herrmann@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=hoegsberg@gmail.com \
    --cc=linux-input@vger.kernel.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 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).