From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Stéphane Chatty" <chatty@enac.fr>
Cc: ynezz@true.cz, linux-input@vger.kernel.org
Subject: Re: [PATCH] Support for 3M multitouch panel
Date: Tue, 22 Dec 2009 10:56:29 -0800 [thread overview]
Message-ID: <20091222185628.GA28392@core.coreip.homeip.net> (raw)
In-Reply-To: <694242AB-D4DC-470D-916D-9ADB2B798FBA@enac.fr>
Hi Stéphane,
On Tue, Dec 22, 2009 at 07:00:49PM +0100, Stéphane Chatty wrote:
> Hi Dmitry,
>
> I am working on the 3M driver and taking your comments into account (and
> applying them to the Stantum driver as well) but I have an question on
> the comment below:
>
>>
>>> +struct mmm_finger {
>>> + __s32 x, y;
>>> + __u8 rank;
>>> + int touch:1, valid:1;
>>> +};
>>
>> Does it make sense to turn access to touch and valid into
>> read-modify-write sequence? Just change them to be 'bool's, it won't
>> cause your structures to grow in size.
>>
>>> +struct mmm_data {
>>> + struct mmm_finger f[10];
>>> + __u8 curid, num;
>>> + int touch:1, valid:1;
>>
>> Same as above.
>
> Why do you think a read-modify-write sequence would be better? in my
> mind these were just cached values, just like x and y.
I meant "read-modify-write" is worse.
To modify a bitfiled the processor has to fetch data from memory (or
cache if it is in cache) perform a logical operation on it, and store
it back in teh memory. With boolean occupying 1 byte, on most
architectures (older alphas is one exception I know of) var=true can be
done by simple store, no need for "read-modify" part.
--
Dmitry
--
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
next prev parent reply other threads:[~2009-12-22 18:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-11 10:12 [PATCH] Support for 3M multitouch panel Stephane Chatty
2009-12-11 12:42 ` Petr Štetiar
2009-12-11 14:10 ` Fwd: " Stephane Chatty
2009-12-11 22:36 ` Dmitry Torokhov
2009-12-12 8:13 ` Stéphane Chatty
2009-12-12 8:30 ` Dmitry Torokhov
2009-12-22 18:00 ` Stéphane Chatty
2009-12-22 18:56 ` Dmitry Torokhov [this message]
2009-12-22 19:27 ` Stéphane Chatty
2009-12-22 22:04 ` Stephane Chatty
2009-12-23 0:22 ` Jiri Kosina
2009-12-23 0:33 ` Jiri Kosina
2009-12-23 9:47 ` Stéphane Chatty
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=20091222185628.GA28392@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=chatty@enac.fr \
--cc=linux-input@vger.kernel.org \
--cc=ynezz@true.cz \
/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