From: Jaya Kumar <jayakumar.lkml@gmail.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 01/02] sh: Add wait for vsync
Date: Tue, 16 Feb 2010 01:30:58 +0000 [thread overview]
Message-ID: <45a44e481002151730l7e78837cn17889b16d34618f5@mail.gmail.com> (raw)
In-Reply-To: <AB12B32E73474741A2C5361C433A44DE0178367F@rte-ben-exch.RTE.ADWIN.RENESAS.COM>
On Fri, Feb 12, 2010 at 4:18 PM, Ian Armstrong <mail01@iarmst.co.uk> wrote:
>
> I would question the original definition for FBIO_WAITFORVSYNC. I get the
> impression that it originated with the matrox driver, but other drivers have
> since implemented the same ioctl and each has an identical define. Would the
> proper fix be to get the definition into fb.h and use it from there. It's
> already defined in multiple places (ps3fb.h, intelfb.h, atyfb_base.c,
> ivtvfb.h, matroxfb.h) and exported to userspace more than once.
>
Hi Ian, fbdev folks,
Yes, I think the fbdev and vsync concept needs an update. I have an
API I would like to propose. It is still early and I would like to
make it sufficiently generic so that it can meet the needs of at least
the following types of hardware:
A- those that expose a vertical retrace counter
B- those that support generating an interrupt at the start of the
vertical blanking period
C- those controllers for displays that do not have a concept of
vertical retrace (ie: non-volatile/bistable displays)
The api would look like (from userspace):
fb_wait_vsync(int div, int rem, unsigned int *count);
Internally, that would lead to an ioctl and drivers would be able to
provide an fbops for their specific implementation. The implementation
would do something along the following lines for each hardware type:
A- put the calling process to sleep until (retrace_counter % div =
rem). This will let vissim apps achieve their desired level of
granularity.
B- put the calling process to sleep until the vblank interrupt is
received plus calculated offset using timing and pixclock, returning
the calculated value for the count.
C- put the calling process to sleep until the most recent display
update is completed, returning 0 for the count and ignoring div, rem.
Let me know if this concept looks satisfactory.
Thanks,
jaya
prev parent reply other threads:[~2010-02-16 1:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-11 10:23 [PATCH 01/02] sh: Add wait for vsync Phil Edworthy
2010-02-12 3:18 ` Paul Mundt
2010-02-12 8:18 ` Ian Armstrong
2010-02-15 13:57 ` Phil Edworthy
2010-02-16 1:06 ` Paul Mundt
2010-02-16 1:30 ` Jaya Kumar [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=45a44e481002151730l7e78837cn17889b16d34618f5@mail.gmail.com \
--to=jayakumar.lkml@gmail.com \
--cc=linux-fbdev@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).