linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antonino Daplas <adaplas@pol.net>
To: James Simmons <jsimmons@infradead.org>
Cc: Fredrik Noring <noring@nocrew.org>,
	Linux Fbdev development list
	<linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: Vertical retrace interrupts?
Date: 30 Jan 2003 10:34:55 +0800	[thread overview]
Message-ID: <1043893384.1052.127.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.44.0301281920520.12076-100000@phoenix.infradead.org>

On Wed, 2003-01-29 at 03:21, James Simmons wrote:
> 
> > Are there any plans on merging DirectFB features? Stuff like vertical
> > retrace interrupts etc.?
> 

I wholeheartedly agree with this.  There are a lot of applications out
there (especially video players) where vtrace signal delivery is
critical for optimum operation.  Polling for VGA registers is not
totally correct for newer cards and is too inefficient, so this has to
be done at a per driver level.

> Thats already supported. Just add a poll function to fb_ops. To date no 
> one has used this feature.
> 

It's because there is no .poll entry in the struct file_operations in
fbmem.c  Something like this:

static struct file_operations fb_fops = {
	.owner =	THIS_MODULE,
	.read =		fb_read,
	.write =	fb_write,
	.ioctl =	fb_ioctl,
	.mmap =		fb_mmap,
	.open =		fb_open,
	.release =	fb_release,
#ifdef HAVE_ARCH_FB_UNMAPPED_AREA
	.get_unmapped_area = get_fb_unmapped_area,
#endif
	.poll =         fb_poll,
};

static unsigned int fb_poll(struct file *file, poll_table *wait)
{
	if (info->fbops->fb_poll)
		return (info->fbops->fb_poll(file, wait));
	return -EINVAL;
}

Also, poll is blocking.  You might want to include an .fasync entry too
for asynchronous I/O.

Finally, is the poll function too generic? I'm not sure about this but
basically we can only wait for events like 'there is data to read, it's
now okay to write', etc.  Is this too ambiguous?   Is it okay to define
a private event flag?  Or do we just agree that fb_poll means wait for
vretrace?

I know that there's already an overuse of ioctls, but for something
specific and important as this, we might not have a choice.

Tony

BTW:  It's not too difficult to add generic vsync interrupt handlers for
most VGA cards via register CR11. 




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com

  reply	other threads:[~2003-01-30  2:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-26  1:51 Vertical retrace interrupts? Fredrik Noring
2003-01-28 19:21 ` James Simmons
2003-01-30  2:34   ` Antonino Daplas [this message]
2003-01-30 11:45     ` Michel Dänzer
2003-01-30 23:22       ` Antonino Daplas
2003-01-31  0:16         ` Fredrik Noring
2003-01-31  1:35           ` Antonino Daplas
2003-01-31 11:24         ` Michel Dänzer
2003-01-31 11:55           ` Ville Syrjälä
2003-01-31 18:35           ` Antonino Daplas
2003-01-31 19:12             ` Michel Dänzer
2003-01-31 21:32               ` Sven Luther
2003-01-31 23:34                 ` Antonino Daplas
2003-02-01 15:45                   ` Michel Dänzer
2003-02-01 16:50                     ` Antonino Daplas
2003-02-12 20:21                       ` James Simmons
2003-02-12 20:08       ` James Simmons

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=1043893384.1052.127.camel@localhost.localdomain \
    --to=adaplas@pol.net \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=noring@nocrew.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).