From: Imre Deak <imre.deak@nokia.com>
To: ext Mathias Agopian <mathias@google.com>
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH] omapfb vsync support
Date: Tue, 28 Feb 2006 12:47:42 +0200 [thread overview]
Message-ID: <1141123662.783.36.camel@mammoth.research.nokia.com> (raw)
In-Reply-To: <6D300222-0883-4013-9E7D-8A827BB0D446@google.com>
On Mon, 2006-02-27 at 15:27 -0800, ext Mathias Agopian wrote:
> Hello,
>
> I'm the one to blame for the omapfb vsync patch :-)
>
> > ["Woodruff, Richard" <r-woodruff2@ti.com>]
> >> How come there is no disable of the interrupt?
> >>
> >> Seems like at ioctrl the caller needs to be tracked so when he does a
> >> close the interrupt can be disabled.
>
> I decided not to bother too much about tracking the clients because
> the omapfb driver is not thread-safe in a lot of ways, which means it
> cannot really support more than one client anyway (or in very basic
> situations). In other words, I assumed there would only always be one
> client.
Please be more specific. Then we could fix those places.
>
> Nevertheless, we wouldn't really need to track the clients because I
> think it would be fine to turn the IRQ off when any client closes the
> driver (provided that no other client is currently waiting on it),
> since it is re-enabled when a client calls the FBIO_WAITFORSYNC ioctl.
>
> >> This will cause a VST enabled kernel to wake up for no good reason if
> >> there is no application requesting it anymore. Someone pointed
> >> out this
> >> fact to me recently while doing power measurements. If you have a
> >> low
> >> power screen saver mode this can mess up expected power savings.
> >
> > Hmm. I wonder if there's some happy medium between disabling the
> > interrupt every time the ioctl returns and having to close and reopen
> > the driver when going into and returning from low power mode.
> >
> > Brian
>
> Maybe we could simply disable the IRQ from the IRQ handler after a
> second or so if no client has requested a FBIO_WAITFORSYNC ioctl?
>
> That, combined with disabling the interrupt when a client closes the
> driver should take care of most cases.
>
> Alternatively, we could disable the IRQ each time, if it's not a too
> heavy operation?
How about taking the lock for the IOCTL and handling the vsync
completely in the controller:
static int omapfb_wait_for_vsync(struct omapfb_device *fbdev)
{
omapfb_rqueue_lock(fbdev);
ctrl->vsync();
omapfb_rqueue_unlock(fbdev);
}
And the controller could enable the IRQ wait for it then disable the
IRQ.
--Imre
>
> On Feb 27, 2006, at 3:10 PM, Woodruff, Richard wrote:
>
> > Two bits, one is I don't see the disable being called in the code when
> > you wake the process up. I see you have the function, at interrupt
> > wake
> > up time it should likely be disabled.
>
> Yes, I added the function for completeness, I thought it might be
> useful at some point (I thought the issue of not disabling it each
> time would come up ;-) ).
>
>
> Mathias
>
>
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
next prev parent reply other threads:[~2006-02-28 10:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-27 22:24 [PATCH] omapfb vsync support Woodruff, Richard
2006-02-27 22:30 ` Brian Swetland
2006-02-27 23:27 ` Mathias Agopian
2006-02-28 10:47 ` Imre Deak [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-02-28 12:54 Woodruff, Richard
2006-02-27 23:43 Woodruff, Richard
2006-02-27 23:10 Woodruff, Richard
2006-02-27 21:59 Brian Swetland
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=1141123662.783.36.camel@mammoth.research.nokia.com \
--to=imre.deak@nokia.com \
--cc=linux-omap-open-source@linux.omap.com \
--cc=mathias@google.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