From: Adrian M. <lkm...@gm...> - 2007-08-31 20:06:14
|
Apologies, sent this Bcc by mistake the first time ---------- Forwarded message ---------- From: Adrian McMenamin <lkm...@gm...> Date: 31 Aug 2007 21:00 Subject: [PATCH] Patch pvr2 driver to allow development of maple bus driver To: "Antonino A. Daplas" <ad...@gm...> This patch makes the PVR2 VBLANK interrupt on the SEGA Dreamcast shareable - a small but necessary change to enable ongoing efforts to develop a driver for the maple bus on the Dreamcast. (Maple is Sega's proprietary serial interface for the Dreamcast and can be set to synchronise dma transfers to the VBLANK). This has no impact on the performance of the PVR2. Signed-off by Adrian McMenamin <ad...@mc...> diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c index 7d6c298..13de07f 100644 --- a/drivers/video/pvr2fb.c +++ b/drivers/video/pvr2fb.c @@ -890,7 +890,7 @@ static int __init pvr2fb_dc_init(void) pvr2_fix.mmio_start = 0xa05f8000; /* registers start here */ pvr2_fix.mmio_len = 0x2000; - if (request_irq(HW_EVENT_VSYNC, pvr2fb_interrupt, 0, + if (request_irq(HW_EVENT_VSYNC, pvr2fb_interrupt, IRQF_SHARED, "pvr2 VBL handler", fb_info)) { return -EBUSY; } |
From: Adrian M. <lkm...@gm...> - 2007-08-31 20:14:38
|
On 31/08/2007, Mike Frysinger <vap...@gm...> wrote: > On 8/31/07, Adrian McMenamin <lkm...@gm...> wrote: > > This patch makes the PVR2 VBLANK interrupt on the SEGA Dreamcast > > shareable - a small but necessary change to enable ongoing efforts to > > develop a driver for the maple bus on the Dreamcast. (Maple is Sega's > > proprietary serial interface for the Dreamcast and can be set to > > synchronise dma transfers to the VBLANK). > > > > This has no impact on the performance of the PVR2. > > sharable implies the interrupt handler checks to see if it actually > caused the interrupt ... which it doesnt at the moment ... presumably, > you're making it shared because another device will be using that > interrupt as well ... so when that other device gets an interrupt, how > do you know it's for that device and not PVR2 ? If the interrupt occurs then it will be for both of them. The hardware cannot be removed and the maple bus driver is set for hardware sync. The question seems redundant to me. |
From: Mike F. <va...@ge...> - 2007-09-01 03:02:37
|
On Friday 31 August 2007, Adrian McMenamin wrote: > On 31/08/2007, Mike Frysinger <vap...@gm...> wrote: > > On 8/31/07, Adrian McMenamin <lkm...@gm...> wrote: > > > This patch makes the PVR2 VBLANK interrupt on the SEGA Dreamcast > > > shareable - a small but necessary change to enable ongoing efforts to > > > develop a driver for the maple bus on the Dreamcast. (Maple is Sega's > > > proprietary serial interface for the Dreamcast and can be set to > > > synchronise dma transfers to the VBLANK). > > > > > > This has no impact on the performance of the PVR2. > > > > sharable implies the interrupt handler checks to see if it actually > > caused the interrupt ... which it doesnt at the moment ... presumably, > > you're making it shared because another device will be using that > > interrupt as well ... so when that other device gets an interrupt, how > > do you know it's for that device and not PVR2 ? > > If the interrupt occurs then it will be for both of them. The hardware > cannot be removed and the maple bus driver is set for hardware sync. > > The question seems redundant to me. i really dont know how the maple bus works or what piece of hardware is wir= ed=20 up to the same interrupt line. my point is that if the other device fires = an=20 interrupt, the pvr interrupt handler may be executed and attempt to do work= =20 when in reality the pvr was not the source of the interrupt. =2Dmike |
From: Adrian M. <ad...@ne...> - 2007-09-01 09:36:10
|
On Fri, 2007-08-31 at 23:02 -0400, Mike Frysinger wrote: > i really dont know how the maple bus works or what piece of hardware is wired > up to the same interrupt line. my point is that if the other device fires an > interrupt, the pvr interrupt handler may be executed and attempt to do work > when in reality the pvr was not the source of the interrupt. > -mike The interrupt is *always* fired by the PVR - it is the VBLANK - ie essentially screen refresh. It is *never* generated by the maple bus. However, the maple bus is/can be hardware synced - which means once that setting is made then the hardware will *always* be polled on the VBLANK. In other words there is no need to check which device is interrupt is for, because it is *always* going to be for both of them. |