Re: pbuffers, extensions to DRM

Jon Smirl <jonsmirl-/[email protected]>
Newsgroups gmane.comp.freedesktop.xserver
Message-ID <[email protected]>
--- Keith Whitwell <keith-CdwZJljFklH+2FeEXyspIVaTQe2KTcn/@public.gmane.org> wrote:

> > A work-around would be to draw a filled polygon to implement the clear, 
> > but I'm wondering where else there might be similar assumptions to trip 
> > us up.
> 
> Why not just fix the ioctl?

Yes fix the ioctl. I think there are four cases of clear that need to be fixed.
It is pretty obvious looking at the code. From the last time I looked at this I
believe that clear is the only command that needs to be fixed.

> > The other thing we need is a mechanism to allocate the memory for 
> > pbuffers.  My first guess is that this would have to be allocated out of 
> > the space used for textures.  I think the DRI texture memory allocator 
> > could be adapted to do this.
> 
> Correct.  There's a memory manager there for AGP space, but it's not 
> integrated with the texture manager.  In the i830 driver, particularly the one
> 
> on the agp-i865-0-1-branch, I have a kernel memory manager which integrates 
> fairly smoothly with the client-driver's texture memory manager.  This is 
> probably a decent starting point.
> 
We need a unified memory manager strategy . Putting it the driver is a good
idea. The code could be a feature common to all DRM modules. 

I would also use this manager in my initialization code when I init the first
display buffer and allocate memory for the hardware cursor. After thinking about
this for a second I shouldn't allocate any framebuffers at init time, instead I
should wait for a higher layer to tell me to make one.


DRM also needs a couple of minor extensions. I've asked Eric to add these but I
haven't heard back yet.

--------------------------------------------------------------

Could you provide me with an offical API for getting these items? It's stupid to
overlay the stats function to conserve IOCTLs.

DRM_STAT_PCI_VENDOR].value = dev->pdev->vendor;
DRM_STAT_PCI_DEVICE].value = dev->pdev->device;
DRM_STAT_PCI_SUB_VENDOR].value = dev->pdev->subsystem_vendor;
DRM_STAT_PCI_SUB_DEVICE].value = dev->pdev->subsystem_device;
DRM_STAT_IRQ_NUMBER].value = dev->pdev->irq;
DRM_STAT_PCI_MMIO_START].value = 0;
DRM_STAT_PCI_MMIO_LENGTH].value = 0;
DRM_STAT_PCI_FB_START].value = 0;
DRM_STAT_PCI_FB_LENGTH].value = 0;

The driver also needs to do pci_enable_deivce and pci_disable_device. The
version in the kernel tree does this but the one in DRI doesn't. Linus must have
added it.

Last thing I need is a function for returning a copy of the ROM. This could be
done generically. The radeon has a bug where the RADEON_MPP_TB_CONFIG register
needs to be written. This only has to be done once when the driver is loaded. 

It's also not clear to me the X needs to know the IRQ number. Why doesn't the
DRM module just send a signal on retrace?

=====
Jon Smirl
jonsmirl-/[email protected]

__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
diff (application/octet-stream, 6 KB) - not displayed
rom (application/octet-stream, 9 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.