linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* deferred IO
@ 2008-06-06  9:34 Christian Schoenebeck
  2008-06-06  9:40 ` Jaya Kumar
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Schoenebeck @ 2008-06-06  9:34 UTC (permalink / raw)
  To: linux-fbdev-devel

Hi!

Is it possible that the deferred IO implementation in kernel 2.6.22 is buggy? 
Or do I probably misunderstand the overall concept of the FB deferred IO 
mechanism?

I wrote a framebuffer driver for a LCD which is connected via USB. As the 
video memory of the LCD is not physically available to the system (thus not 
IO memory mapped) I registered a FB deferred IO calllback function which 
performs the job of sending the new screen information via USB to the LCD 
whenever someone modified the framebuffer memory.

Unfortunately this deferred IO callback function is only called once per 
process lifetime and not (as I expected it to be) each time the framebuffer 
is actually modified.

I implemented a proc file where I could actually see the framebuffer content 
at any time and placed a:

	printk(KERN_INFO "cuselcdfb_display_update %d\n", ++i);

line in the deferred io callback to see when and how often the deferred IO 
callback function is called. So I could check that a process actually wrote 
to the framebuffer, but the callback would only be triggered once.

Any clues?

Thanks for any comments!

CU
Christian

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: deferred IO
  2008-06-06  9:34 deferred IO Christian Schoenebeck
@ 2008-06-06  9:40 ` Jaya Kumar
  2008-06-06 10:51   ` Christian Schoenebeck
  0 siblings, 1 reply; 5+ messages in thread
From: Jaya Kumar @ 2008-06-06  9:40 UTC (permalink / raw)
  To: Christian Schoenebeck; +Cc: linux-fbdev-devel

On Fri, Jun 6, 2008 at 2:34 AM, Christian Schoenebeck
<cuse@users.sourceforge.net> wrote:
> Hi!
>
> Is it possible that the deferred IO implementation in kernel 2.6.22 is buggy?

Yes, that's possible. There was a key bug fixed in 2.6.25. You'll
probably want at least the following commit:

commit	de7c6d15e354bc94a846f03749819768c331280a
fbdev: defio and Metronomefb

Implement support for the E-Ink Metronome controller.  It provides an mmapable
interface to the controller using defio support.  It was tested with a gumstix
pxa255 with Vizplex media using Xfbdev and various X clients such as xeyes,
xpdf, xloadimage.

This patch also fixes the following bug: Defio would cause a hang on write
access to the framebuffer as the page fault would be called ad-infinitum.  It
fixes fb_defio by setting the mapping to be used by page_mkclean.

Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: deferred IO
  2008-06-06  9:40 ` Jaya Kumar
@ 2008-06-06 10:51   ` Christian Schoenebeck
  2008-06-06 10:55     ` Jaya Kumar
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Schoenebeck @ 2008-06-06 10:51 UTC (permalink / raw)
  To: Jaya Kumar; +Cc: linux-fbdev-devel

Es geschah am Friday 06 June 2008 als Jaya Kumar schrieb:
> On Fri, Jun 6, 2008 at 2:34 AM, Christian Schoenebeck
>
> <cuse@users.sourceforge.net> wrote:
> > Hi!
> >
> > Is it possible that the deferred IO implementation in kernel 2.6.22 is
> > buggy?
>
> Yes, that's possible. There was a key bug fixed in 2.6.25. You'll
> probably want at least the following commit:
>
> commit	de7c6d15e354bc94a846f03749819768c331280a
> fbdev: defio and Metronomefb

Very good, thanks a lot!
Is there an easy way to retrieve that specific patch?

CU
Christian

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: deferred IO
  2008-06-06 10:51   ` Christian Schoenebeck
@ 2008-06-06 10:55     ` Jaya Kumar
  2008-06-06 12:28       ` Christian Schoenebeck
  0 siblings, 1 reply; 5+ messages in thread
From: Jaya Kumar @ 2008-06-06 10:55 UTC (permalink / raw)
  To: Christian Schoenebeck; +Cc: linux-fbdev-devel

On Fri, Jun 6, 2008 at 3:51 AM, Christian Schoenebeck
<cuse@users.sourceforge.net> wrote:
> Es geschah am Friday 06 June 2008 als Jaya Kumar schrieb:
>> On Fri, Jun 6, 2008 at 2:34 AM, Christian Schoenebeck
>>
>> <cuse@users.sourceforge.net> wrote:
>> > Hi!
>> >
>> > Is it possible that the deferred IO implementation in kernel 2.6.22 is
>> > buggy?
>>
>> Yes, that's possible. There was a key bug fixed in 2.6.25. You'll
>> probably want at least the following commit:
>>
>> commit        de7c6d15e354bc94a846f03749819768c331280a
>> fbdev: defio and Metronomefb
>
> Very good, thanks a lot!
> Is there an easy way to retrieve that specific patch?
>

I think git cherry-pick should be possible. Alternatively, I think you
can download just the fb_defio.c changes from:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=de7c6d15e354bc94a846f03749819768c331280a

and apply it that way. Hope that helps.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: deferred IO
  2008-06-06 10:55     ` Jaya Kumar
@ 2008-06-06 12:28       ` Christian Schoenebeck
  0 siblings, 0 replies; 5+ messages in thread
From: Christian Schoenebeck @ 2008-06-06 12:28 UTC (permalink / raw)
  To: Jaya Kumar; +Cc: linux-fbdev-devel

Es geschah am Friday 06 June 2008 als Jaya Kumar schrieb:
> On Fri, Jun 6, 2008 at 3:51 AM, Christian Schoenebeck
>
> <cuse@users.sourceforge.net> wrote:
> > Es geschah am Friday 06 June 2008 als Jaya Kumar schrieb:
> >> On Fri, Jun 6, 2008 at 2:34 AM, Christian Schoenebeck
> >>
> >> <cuse@users.sourceforge.net> wrote:
> >> > Hi!
> >> >
> >> > Is it possible that the deferred IO implementation in kernel 2.6.22 is
> >> > buggy?
> >>
> >> Yes, that's possible. There was a key bug fixed in 2.6.25. You'll
> >> probably want at least the following commit:
> >>
> >> commit        de7c6d15e354bc94a846f03749819768c331280a
> >> fbdev: defio and Metronomefb
> >
> > Very good, thanks a lot!
> > Is there an easy way to retrieve that specific patch?
>
> I think git cherry-pick should be possible. Alternatively, I think you
> can download just the fb_defio.c changes from:
>
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h
>=de7c6d15e354bc94a846f03749819768c331280a
>
> and apply it that way. Hope that helps.

That did it! Works like a charme now!

Thanks Jaya!

CU
Christian

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-06-06 12:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-06  9:34 deferred IO Christian Schoenebeck
2008-06-06  9:40 ` Jaya Kumar
2008-06-06 10:51   ` Christian Schoenebeck
2008-06-06 10:55     ` Jaya Kumar
2008-06-06 12:28       ` Christian Schoenebeck

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).