Re: Unichrome DRM ring buffer patch

2004-08-28 Thread Erdi Chen
Thomas Hellström wrote: Also, The irq enable IOCTL returns an error with your patch applied. Not before. The via specific IRQ setup routines are never called. Could you have a look into this? /Thomas You need to call drmVIAInitMAP/DRM_IOCTL_VIA_MAP_INIT to setup dev-dev_priv before you can

Re: Unichrome DRM ring buffer patch

2004-08-28 Thread Thomas Hellström
Thomas Hellström wrote: Also, The irq enable IOCTL returns an error with your patch applied. Not before. The via specific IRQ setup routines are never called. Could you have a look into this? /Thomas You need to call drmVIAInitMAP/DRM_IOCTL_VIA_MAP_INIT to setup dev-dev_priv before you

Re: Unichrome DRM ring buffer patch

2004-08-28 Thread Erdi Chen
Thomas Hellström wrote: Thomas Hellström wrote: Also, The irq enable IOCTL returns an error with your patch applied. Not before. The via specific IRQ setup routines are never called. Could you have a look into this? /Thomas You need to call drmVIAInitMAP/DRM_IOCTL_VIA_MAP_INIT to setup

Re: Unichrome DRM ring buffer patch

2004-08-28 Thread Thomas Hellström
Erdi Chen wrote: Thomas Hellström wrote: Thomas Hellström wrote: Also, The irq enable IOCTL returns an error with your patch applied. Not before. The via specific IRQ setup routines are never called. Could you have a look into this? /Thomas You need to call drmVIAInitMAP/DRM_IOCTL_VIA_MAP_INIT

Re: Unichrome DRM ring buffer patch

2004-08-27 Thread Thomas Hellström
Hi! Yes.. Works nice. :-). I'm able to program the blitter from the user space XvMC lib, but as expected not the video engine nor the mpeg player. I've requested info from VIA about this. Let's see what happens. What approx size of the ringbuffer would the 3d lib need? /Thomas

Re: Unichrome DRM ring buffer patch

2004-08-27 Thread Erdi Chen
Thomas Hellström wrote: Hi! Yes.. Works nice. :-). I'm able to program the blitter from the user space XvMC lib, but as expected not the video engine nor the mpeg player. I've requested info from VIA about this. Let's see what happens. What approx size of the ringbuffer would the 3d lib need?

Re: Unichrome DRM ring buffer patch

2004-08-27 Thread Thomas Hellström
Erdi Chen wrote: Thomas Hellström wrote: Hi! Yes.. Works nice. :-). I'm able to program the blitter from the user space XvMC lib, but as expected not the video engine nor the mpeg player. I've requested info from VIA about this. Let's see what happens. What approx size of the ringbuffer would

Re: Unichrome DRM ring buffer patch

2004-08-26 Thread Thomas Hellström
Hi, Erdi. Thomas Hellström wrote: I just noticed that you are using a 2d BITBLT to temporarily stall the command regulator for a moment. I believe the XAA implementation in all current via 2d X server drivers out there assume that they are reasonably alone in using the 2d engine and that

Re: Unichrome DRM ring buffer patch

2004-08-26 Thread Thomas Hellström
Also had a guy at the unichrome lists that reported a kernel panic within the via modules on a 2.4.20 kernel. I have checked on 2.6.3, and it seems OK. Have you checked 2.4? I just checked with 2.4.27 and it all seems OK. I will update the Unichrome project's DDX to initialize the ring buffer

Re: Unichrome DRM ring buffer patch

2004-08-26 Thread Erdi Chen
This is a code snippet that reg_pause_addr: VGAOUT8(0x3c4, 0x38); device_id = VGAIN8(0x3c5) 8; VGAOUT8(0x3c4, 0x37); device_id |= VGAIN8(0x3c5); switch (device_id) { case PCI_CHIP_CLE3122: case PCI_CHIP_CLE3022: pVia-Chipset = VIA_CLE266;

Re: Unichrome DRM ring buffer patch

2004-08-23 Thread Thomas Hellström
Hi, Erdi. This patch adds two new ioctl's to the VIA Unichrome/Pro DRM driver: DRM_IOCTL_VIA_DMA_INIT DRM_IOCTL_VIA_CMDBUFFER The first call sets up an area in AGP memory that will be used as the ring buffer. The second call copies a command buffer from user space memory to

Re: Unichrome DRM ring buffer patch

2004-08-23 Thread Erdi Chen
Thomas Hellström wrote: I just noticed that you are using a 2d BITBLT to temporarily stall the command regulator for a moment. I believe the XAA implementation in all current via 2d X server drivers out there assume that they are reasonably alone in using the 2d engine and that they expext that

Re: Unichrome DRM ring buffer patch

2004-08-23 Thread Thomas Hellström
Hi! Erdi Chen wrote: Thomas Hellström wrote: I just noticed that you are using a 2d BITBLT to temporarily stall the command regulator for a moment. I believe the XAA implementation in all current via 2d X server drivers out there assume that they are reasonably alone in using the 2d engine and

Re: Unichrome DRM ring buffer patch

2004-08-23 Thread Alan Cox
On Llu, 2004-08-23 at 18:46, Erdi Chen wrote: I plan to clean up the unichrome 2D driver with respect to this, but I'm not sure when this will happen. DRI code also uses the 2D engine. How does that work? The DRI layer wraps enough of the X driver code that the X server is part of the DRI

Re: Unichrome DRM ring buffer patch

2004-08-23 Thread Erdi Chen
Thomas Hellström wrote: I just noticed that you are using a 2d BITBLT to temporarily stall the command regulator for a moment. I believe the XAA implementation in all current via 2d X server drivers out there assume that they are reasonably alone in using the 2d engine and that they expext that

Re: Unichrome DRM ring buffer patch

2004-08-23 Thread Thomas Hellström
Erdi Chen wrote: Thomas Hellström wrote: I just noticed that you are using a 2d BITBLT to temporarily stall the command regulator for a moment. I believe the XAA implementation in all current via 2d X server drivers out there assume that they are reasonably alone in using the 2d engine and that

Re: Unichrome DRM ring buffer patch

2004-08-20 Thread Sam Ravnborg
On Thu, Aug 19, 2004 at 03:26:07PM -0700, Erdi Chen wrote: This patch adds two new ioctl's to the VIA Unichrome/Pro DRM driver: DRM_IOCTL_VIA_DMA_INIT DRM_IOCTL_VIA_CMDBUFFER The first call sets up an area in AGP memory that will be used as the ring buffer. The second call

Re: Unichrome DRM ring buffer patch

2004-08-20 Thread Erdi Chen
Thank you for your comments. This is exactly why I didn't rush to check the code into CVS. Sam Ravnborg wrote: On Thu, Aug 19, 2004 at 03:26:07PM -0700, Erdi Chen wrote: This patch adds two new ioctl's to the VIA Unichrome/Pro DRM driver: DRM_IOCTL_VIA_DMA_INIT

Re: Unichrome DRM ring buffer patch

2004-08-20 Thread Keith Whitwell
Sam Ravnborg wrote: On Thu, Aug 19, 2004 at 03:26:07PM -0700, Erdi Chen wrote: This patch adds two new ioctl's to the VIA Unichrome/Pro DRM driver: DRM_IOCTL_VIA_DMA_INIT DRM_IOCTL_VIA_CMDBUFFER The first call sets up an area in AGP memory that will be used as the ring buffer.

Re: Unichrome DRM ring buffer patch

2004-08-20 Thread Sam Ravnborg
On Fri, Aug 20, 2004 at 11:32:06AM -0700, Erdi Chen wrote: 3) What's the purpose of #define __NO_VERSION__ Came from the i915_dma.c that I've used as a template. I have no idea what it is for. It seems to exist in many drm source files. I was not sure but google confirmed. __NO_VERSION__ was

Re: Unichrome DRM ring buffer patch

2004-08-20 Thread Sam Ravnborg
On Fri, Aug 20, 2004 at 07:48:44PM +0100, Keith Whitwell wrote: Sam Ravnborg wrote: On Thu, Aug 19, 2004 at 03:26:07PM -0700, Erdi Chen wrote: This patch adds two new ioctl's to the VIA Unichrome/Pro DRM driver: DRM_IOCTL_VIA_DMA_INIT DRM_IOCTL_VIA_CMDBUFFER The first call sets

Unichrome DRM ring buffer patch

2004-08-19 Thread Erdi Chen
This patch adds two new ioctl's to the VIA Unichrome/Pro DRM driver: DRM_IOCTL_VIA_DMA_INIT DRM_IOCTL_VIA_CMDBUFFER The first call sets up an area in AGP memory that will be used as the ring buffer. The second call copies a command buffer from user space memory to the ring