Patch pvr2 driver to allow development of maple bus driver
PATCH 1/1 Patch pvr2 driver to allow development of maple bus driver
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 <[email protected]>
drivers/video/pvr2fb.c +1 -1
@@ -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 ; }
PATCH 1/1 Patch pvr2 driver to allow development of maple bus driver
Apologies, sent this Bcc by mistake the first time
---------- Forwarded message ----------
From: Adrian McMenamin <[email protected]>
Date: 31 Aug 2007 21:00
Subject: [PATCH] Patch pvr2 driver to allow development of maple bus driver
To: "Antonino A. Daplas" <[email protected]>
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 <[email protected]>
drivers/video/pvr2fb.c +1 -1
@@ -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 ; }
Quoted 7 lines · Adrian McMenamin
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 ?
-mike
Quoted 7 lines · Mike Frysinger
Quoted 6 lines · Adrian McMenamin
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).
Quoted 7 lines
Quoted 1 line
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.
Quoted 16 lines · Adrian McMenamin
Quoted 7 lines · Mike Frysinger
Quoted 6 lines · Adrian McMenamin
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).
Quoted 7 lines
Quoted 1 line
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 ?
Quoted 4 lines
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 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
Quoted 5 lines · Mike Frysinger
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.