mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Patch pvr2 driver to allow development of maple bus driver
@ 2007-08-31 20:00 Adrian McMenamin
  2007-08-31 20:06 ` Fwd: " Adrian McMenamin
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian McMenamin @ 2007-08-31 20:00 UTC (permalink / raw)
  To: Antonino A. Daplas

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 <adrian@mcmen.demon.co.uk>

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;
 	}

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Fwd: [PATCH] Patch pvr2 driver to allow development of maple bus driver
  2007-08-31 20:00 [PATCH] Patch pvr2 driver to allow development of maple bus driver Adrian McMenamin
@ 2007-08-31 20:06 ` Adrian McMenamin
  2007-08-31 20:12   ` Mike Frysinger
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian McMenamin @ 2007-08-31 20:06 UTC (permalink / raw)
  To: linux-kernel, linuxsh-dev, Paul Mundt

Apologies, sent this Bcc by mistake the first time

---------- Forwarded message ----------
From: Adrian McMenamin <lkmladrian@gmail.com>
Date: 31 Aug 2007 21:00
Subject: [PATCH] Patch pvr2 driver to allow development of maple bus driver
To: "Antonino A. Daplas" <adaplas@gmail.com>


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 <adrian@mcmen.demon.co.uk>

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;
        }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Patch pvr2 driver to allow development of maple bus driver
  2007-08-31 20:06 ` Fwd: " Adrian McMenamin
@ 2007-08-31 20:12   ` Mike Frysinger
  2007-08-31 20:14     ` Adrian McMenamin
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2007-08-31 20:12 UTC (permalink / raw)
  To: Adrian McMenamin; +Cc: linux-kernel, linuxsh-dev, Paul Mundt

On 8/31/07, Adrian McMenamin <lkmladrian@gmail.com> 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 ?
-mike

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Patch pvr2 driver to allow development of maple bus driver
  2007-08-31 20:12   ` Mike Frysinger
@ 2007-08-31 20:14     ` Adrian McMenamin
  2007-09-01  3:02       ` Mike Frysinger
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian McMenamin @ 2007-08-31 20:14 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: linux-kernel, linuxsh-dev, Paul Mundt

On 31/08/2007, Mike Frysinger <vapier.adi@gmail.com> wrote:
> On 8/31/07, Adrian McMenamin <lkmladrian@gmail.com> 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Patch pvr2 driver to allow development of maple bus driver
  2007-08-31 20:14     ` Adrian McMenamin
@ 2007-09-01  3:02       ` Mike Frysinger
  2007-09-01  9:35         ` Adrian McMenamin
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2007-09-01  3:02 UTC (permalink / raw)
  To: linuxsh-dev; +Cc: Adrian McMenamin, Mike Frysinger, Paul Mundt, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1444 bytes --]

On Friday 31 August 2007, Adrian McMenamin wrote:
> On 31/08/2007, Mike Frysinger <vapier.adi@gmail.com> wrote:
> > On 8/31/07, Adrian McMenamin <lkmladrian@gmail.com> 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 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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Patch pvr2 driver to allow development of maple bus driver
  2007-09-01  3:02       ` Mike Frysinger
@ 2007-09-01  9:35         ` Adrian McMenamin
  0 siblings, 0 replies; 6+ messages in thread
From: Adrian McMenamin @ 2007-09-01  9:35 UTC (permalink / raw)
  To: Mike Frysinger
  Cc: linuxsh-dev, Adrian McMenamin, Paul Mundt, linux-kernel, Mike Frysinger

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-09-01  9:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-31 20:00 [PATCH] Patch pvr2 driver to allow development of maple bus driver Adrian McMenamin
2007-08-31 20:06 ` Fwd: " Adrian McMenamin
2007-08-31 20:12   ` Mike Frysinger
2007-08-31 20:14     ` Adrian McMenamin
2007-09-01  3:02       ` Mike Frysinger
2007-09-01  9:35         ` Adrian McMenamin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome