linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rick L. Vinyard, Jr." <rvinyard@cs.nmsu.edu>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Jaya Kumar <jayakumar.lkml@gmail.com>,
	Pavel Machek <pavel@ucw.cz>, Jiri Kosina <jkosina@suse.cz>,
	linux-kernel@vger.kernel.org, krzysztof.h1@wp.pl,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-usb@vger.kernel.org, Oliver Neukum <oliver@neukum.org>,
	linux-input@vger.kernel.org
Subject: Re: [PATCH] Logitech G13 driver (fixed cc list --- ignore others)
Date: Thu, 14 Jan 2010 14:48:41 -0700	[thread overview]
Message-ID: <044387d146c2f91cb7f593736fcce28f.squirrel@intranet.cs.nmsu.edu> (raw)
In-Reply-To: <ca2dc2821001141308s5a552447yb887f619231f449@mail.gmail.com>

Miguel Ojeda wrote:
> On Tue, Jan 5, 2010 at 1:14 AM, Jaya Kumar <jayakumar.lkml@gmail.com>
> wrote:
>> On Tue, Jan 5, 2010 at 6:48 AM, Pavel Machek <pavel@ucw.cz> wrote:
>>>
>>> Ok, but I guess you should cc auxdisplay people in future.
>>
>> Hi Pavel,
>>
>> I just looked at the drivers/auxdisplay directory and got a bit
>> confused. The reason I got confused is because auxdisplay is actually
>> an fbdev driver but it is outside of the drivers/video directory. It
>> looks like there has only been 1 commit and that was for the Samsung
>> KS0108 controller. It also sort of uses platform support but the way
>> it is abstracted is odd to my thinking. The controller is ks0108, so
>> in my mind that would be the code that would be platform independent,
>> and then that would use a board specific IO driver to push data (eg:
>> parport or gpio or usb). I think in the long term it would probably
>> make sense to write a cleaner approach with a drivers/video/ks0108.c
>> which is cleanly platform independent (and back within fbdev proper)
>> and then a board specific driver in the appropriate location that
>> handles the IO.
>
> I wrote long ago the driver(s) and people that reviewed it thought it
> was better to keep it outside. I think that if someone else is going
> to need ks0108, then I agree: we should write a independent driver.
>
> It should not be hard, it is an easy controller to play with and the
> code is already there. I would try to do it; however, I am not sure if
> I would be the most appropriate person to code such generic driver, as
> I know almost nothing about all drivers/video/* stuff and the ways of
> making it truly generic for future video/ users. Still, I will help
> gladly.
>

When I started to look at writing the G13 framebuffer the first code I
looked at was the cfag12864b, and started off trying to adapt it.

However, as I was digging through the video/* directory looking for
something (I forget now what) I came across the hecubafb and patterned the
G13 after it instead.

In moving between the two, the biggest difference was that I was able to
strip out alot of the workqueue code you had since all that was provided
by defio. Otherwise, the general structure was almost identical.

In particular, what would change is the lower half of cfag12864b.c and you
would be able to eliminate almost everything from the /* Update work */
and below comment with the exception of cfag12864b_update().

cfag12864b_update() would become almost analogous to the g13_fb_update() I
have in the G13 driver which is triggered by the deferred_io member of the
fb_deferred_io structure.

You would have something like:

/* Callback from deferred IO workqueue */
static void cfag12864b_deferred_io(struct fb_info *info, struct list_head
*pagelist)
{
	cfag12864b_update(info->par);
}

static struct fb_deferred_io cfag12864b_defio = {
	.delay = HZ / CFAG12864B_UPDATE_RATE_DEFAULT,
	.deferred_io = cfag12864b_deferred_io,
};


The other major change is that you could eliminate the periodic memcmp()
to see if the buffer has change since the deferred_io is only going to
trigger on a page write fault.

But, that isn't a major change in the code... only in performance.

---

Rick

  reply	other threads:[~2010-01-14 21:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-14 21:22 [PATCH] Logitech G13 driver (fixed cc list --- ignore others) Rick L. Vinyard Jr.
2009-12-14 21:26 ` Rick L. Vinyard, Jr.
2009-12-14 22:02 ` Felipe Balbi
2009-12-14 22:48   ` Rick L. Vinyard, Jr.
2009-12-16 10:34 ` Pavel Machek
2009-12-16 14:08   ` Jiri Kosina
2010-01-04 22:23     ` Rick L. Vinyard, Jr.
     [not found]       ` <7f9100aac5f9b06ec78efff25c7a5a71.squirrel-2xSMGd46i5akveL4JqN78fZ8FUJU4vz8@public.gmane.org>
2010-01-04 22:48         ` Pavel Machek
2010-01-05  0:14           ` Jaya Kumar
     [not found]             ` <45a44e481001041614i35ceef84q5f12a068e2f0b97b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-14 21:08               ` Miguel Ojeda
2010-01-14 21:48                 ` Rick L. Vinyard, Jr. [this message]
     [not found]                   ` <044387d146c2f91cb7f593736fcce28f.squirrel-2xSMGd46i5akveL4JqN78fZ8FUJU4vz8@public.gmane.org>
2010-01-14 22:34                     ` Miguel Ojeda
2010-01-14 23:03                       ` Rick L. Vinyard, Jr.
     [not found]                         ` <8f404284c29a6e7736de49ede9a44a2c.squirrel-2xSMGd46i5akveL4JqN78fZ8FUJU4vz8@public.gmane.org>
2010-01-14 23:34                           ` Miguel Ojeda
2010-01-05  9:52       ` Jiri Kosina
2010-01-04 23:57 ` Jaya Kumar
2010-01-07 15:59   ` Rick L. Vinyard, Jr.
2010-01-08 14:21     ` Giacomo A. Catenazzi
     [not found]       ` <4B473F64.2010203-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2010-01-08 16:45         ` Rick L. Vinyard, Jr.

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=044387d146c2f91cb7f593736fcce28f.squirrel@intranet.cs.nmsu.edu \
    --to=rvinyard@cs.nmsu.edu \
    --cc=akpm@linux-foundation.org \
    --cc=jayakumar.lkml@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=krzysztof.h1@wp.pl \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=oliver@neukum.org \
    --cc=pavel@ucw.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;
as well as URLs for NNTP newsgroup(s).