Re: [patch] drm_core_getmap

2004-10-14 Thread Jon Smirl
> What about the getmap ioctl? You may be right though, that one might get > unexpected results. AFAICT maps are added at the head of the list. So > the order is reversed and maps added by the Xserver mess up the indices. GetMap ioctl returns them all and you have to search through them. -- Jon

Re: [patch] drm_core_getmap

2004-10-14 Thread Felix Kühling
Am Do, den 14.10.2004 schrieb Jon Smirl um 18:38: > 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_fi

Re: [patch] drm_core_getmap

2004-10-14 Thread Jon Smirl
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_

[patch] drm_core_getmap

2004-10-14 Thread Felix Kühling
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