Synchronization with CRT refresh
Alan Cox
alan at lxorguk.ukuu.org.uk
Tue May 3 12:24:09 PDT 2005
On Maw, 2005-05-03 at 19:53, Jim Gettys wrote:
> > > the early 1990's. Alan Cox started on a kernel framework for this for
> > > Linux to plug into just before he went to graduate school; I don't know
> > > what happened to the code.
It sort of died - actually a lot of the code credits are Soreen's I
believe not mine. I half banged it into "Linux" shape and broke bits in
the process then ran out of time.
We do have agreement for a generic IRQ processing interface from l/k
discussions. Thats an interface of the form below, which can be done
fast and if need be trivially have the irq paths turned into native asm.
Just needs someone to write it.
struct device_irq_op_desc {
unsigned int op;
#define OP_READ 0 /* Read port */
#define OP_WRITE 1 /* Write port */
#define OP_REWRITE 2 /* Read and write port */
unsigned char type;
#define TYPE_U8 0
#define TYPE_U16 1
#define TYPE_U32 2
#define TYPE_U64 3
unsigned char addrtype;
#define ADDR_MMIO 0
#define ADDR_PIO 1
#define ADDR_PCICFG 2
unsigned char pcibar; /* PCI BAR for MMIO/PIO */
unsigned long pci_dev; /* domain:bus:devfn */
unsigned long address; /* Offset from BAR */
unsigned long mask; /* Writes are (input & mask) | bits */
unsigned long bits;
}
struct user_irq_handler {
struct device_irq_op_desc ack_irq;
struct device_irq_op_desc disable_irq;
struct device_irq_op_desc enable_irq;
struct device_irq_op_desc test_irq;
};
Where test_irq is run each IRQ, if it returns non zero (read & mask)
then ack_irq is run. enable/disable irq are run on open/close and for
power management suspend/resume.
More information about the xorg
mailing list