I did it like this at startup time:

/* registers */
if ((ret = drm_initmap(dev, pci_resource_start(dev->pdev, 2),
     pci_resource_len(dev->pdev, 2), _DRM_REGISTERS,
     0)))
        return ret;

if (!(dev_priv->mmio = drm_core_findmap(dev, pci_resource_start(dev->pdev, 2))))
        return DRM_ERR(ENOMEM);

I haven't checked out the code enough to be sure that getting a map by
index number will always return the right map.



On Thu, 14 Oct 2004 16:50:31 +0200, Felix K�hling <[EMAIL PROTECTED]> wrote:
> In the savage driver I'm going to use permanent maps from the start. So
> there is no need for the Xserver to pass the permanent maps back to the
> kernel driver in the init ioctl. Instead I want to find the maps by
> index in the init ioctl. Therefore I added a drm_core_getmap inline
> function similar to drm_core_findmap. Jon, if you like this please apply
> to drm/linux-core.
> 
> Thanks,
>   Felix
> 
> --
> | Felix K�hling <[EMAIL PROTECTED]>                     http://fxk.de.vu |
> | PGP Fingerprint: 6A3C 9566 5B30 DDED 73C3  B152 151C 5CC1 D888 E595 |
> 
> 
> 


-- 
Jon Smirl
[EMAIL PROTECTED]


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to