Lines Matching +full:ati +full:- +full:mode
50 /* Intel 82865G/PE/P DRAM Controller/Host-Hub / Mobility 9800 Needs AGPMode 4 (deb #462590) */
52 …/* Intel 82865G/PE/P DRAM Controller/Host-Hub / RV280 [Radeon 9200 SE] Needs AGPMode 4 (lp #300304…
70 /* Intel 82855PM host bridge / Mobility M9+ / VaioPCG-V505DX Needs AGPMode 2 (fdo #17928) */
97 /* ASRock K7VT4A+ AGP 8x / ATI Radeon 9250 AGP Needs AGPMode 4 (lp #133192) */
121 /* VIA VT8377 Host Bridge / RV280 Needs AGPMode 4 (ati ML) */
124 /* ATI Host Bridge / RV280 [M9+] Needs AGPMode 1 (phoronix forum) */
132 struct pci_dev *pdev = to_pci_dev(dev->dev); in radeon_agp_head_init()
138 head->bridge = agp_find_bridge(pdev); in radeon_agp_head_init()
139 if (!head->bridge) { in radeon_agp_head_init()
140 head->bridge = agp_backend_acquire(pdev); in radeon_agp_head_init()
141 if (!head->bridge) { in radeon_agp_head_init()
145 agp_copy_info(head->bridge, &head->agp_info); in radeon_agp_head_init()
146 agp_backend_release(head->bridge); in radeon_agp_head_init()
148 agp_copy_info(head->bridge, &head->agp_info); in radeon_agp_head_init()
150 if (head->agp_info.chipset == NOT_SUPPORTED) { in radeon_agp_head_init()
154 INIT_LIST_HEAD(&head->memory); in radeon_agp_head_init()
155 head->cant_use_aperture = head->agp_info.cant_use_aperture; in radeon_agp_head_init()
156 head->page_mask = head->agp_info.page_mask; in radeon_agp_head_init()
157 head->base = head->agp_info.aper_base; in radeon_agp_head_init()
165 struct pci_dev *pdev = to_pci_dev(dev->dev); in radeon_agp_head_acquire()
167 if (!rdev->agp) in radeon_agp_head_acquire()
168 return -ENODEV; in radeon_agp_head_acquire()
169 if (rdev->agp->acquired) in radeon_agp_head_acquire()
170 return -EBUSY; in radeon_agp_head_acquire()
171 rdev->agp->bridge = agp_backend_acquire(pdev); in radeon_agp_head_acquire()
172 if (!rdev->agp->bridge) in radeon_agp_head_acquire()
173 return -ENODEV; in radeon_agp_head_acquire()
174 rdev->agp->acquired = 1; in radeon_agp_head_acquire()
180 if (!rdev->agp || !rdev->agp->acquired) in radeon_agp_head_release()
181 return -EINVAL; in radeon_agp_head_release()
182 agp_backend_release(rdev->agp->bridge); in radeon_agp_head_release()
183 rdev->agp->acquired = 0; in radeon_agp_head_release()
187 static int radeon_agp_head_enable(struct radeon_device *rdev, struct radeon_agp_mode mode) in radeon_agp_head_enable() argument
189 if (!rdev->agp || !rdev->agp->acquired) in radeon_agp_head_enable()
190 return -EINVAL; in radeon_agp_head_enable()
192 rdev->agp->mode = mode.mode; in radeon_agp_head_enable()
193 agp_enable(rdev->agp->bridge, mode.mode); in radeon_agp_head_enable()
194 rdev->agp->enabled = 1; in radeon_agp_head_enable()
202 if (!rdev->agp || !rdev->agp->acquired) in radeon_agp_head_info()
203 return -EINVAL; in radeon_agp_head_info()
205 kern = &rdev->agp->agp_info; in radeon_agp_head_info()
206 info->agp_version_major = kern->version.major; in radeon_agp_head_info()
207 info->agp_version_minor = kern->version.minor; in radeon_agp_head_info()
208 info->mode = kern->mode; in radeon_agp_head_info()
209 info->aperture_base = kern->aper_base; in radeon_agp_head_info()
210 info->aperture_size = kern->aper_size * 1024 * 1024; in radeon_agp_head_info()
211 info->memory_allowed = kern->max_memory << PAGE_SHIFT; in radeon_agp_head_info()
212 info->memory_used = kern->current_memory << PAGE_SHIFT; in radeon_agp_head_info()
213 info->id_vendor = kern->device->vendor; in radeon_agp_head_info()
214 info->id_device = kern->device->device; in radeon_agp_head_info()
224 struct radeon_agp_mode mode; in radeon_agp_init() local
245 if (rdev->agp->agp_info.aper_size < 32) { in radeon_agp_init()
247 dev_warn(rdev->dev, "AGP aperture too small (%zuM) " in radeon_agp_init()
249 rdev->agp->agp_info.aper_size); in radeon_agp_init()
250 return -EINVAL; in radeon_agp_init()
253 mode.mode = info.mode; in radeon_agp_init()
255 * Just use the whatever mode the host sets up. in radeon_agp_init()
257 if (rdev->family <= CHIP_RV350) in radeon_agp_init()
258 agp_status = (RREG32(RADEON_AGP_STATUS) | RADEON_AGPv3_MODE) & mode.mode; in radeon_agp_init()
260 agp_status = mode.mode; in radeon_agp_init()
276 while (p && p->chip_device != 0) { in radeon_agp_init()
277 if (info.id_vendor == p->hostbridge_vendor && in radeon_agp_init()
278 info.id_device == p->hostbridge_device && in radeon_agp_init()
279 rdev->pdev->vendor == p->chip_vendor && in radeon_agp_init()
280 rdev->pdev->device == p->chip_device && in radeon_agp_init()
281 rdev->pdev->subsystem_vendor == p->subsys_vendor && in radeon_agp_init()
282 rdev->pdev->subsystem_device == p->subsys_device) { in radeon_agp_init()
283 default_mode = p->default_mode; in radeon_agp_init()
291 (radeon_agpmode & (radeon_agpmode - 1))) { in radeon_agp_init()
292 DRM_ERROR("Illegal AGP Mode: %d (valid %s), leaving at %d\n", in radeon_agp_init()
297 DRM_INFO("AGP mode requested: %d\n", radeon_agpmode); in radeon_agp_init()
303 mode.mode &= ~RADEON_AGP_MODE_MASK; in radeon_agp_init()
307 mode.mode |= RADEON_AGPv3_8X_MODE; in radeon_agp_init()
311 mode.mode |= RADEON_AGPv3_4X_MODE; in radeon_agp_init()
317 mode.mode |= RADEON_AGP_4X_MODE; in radeon_agp_init()
320 mode.mode |= RADEON_AGP_2X_MODE; in radeon_agp_init()
324 mode.mode |= RADEON_AGP_1X_MODE; in radeon_agp_init()
329 mode.mode &= ~RADEON_AGP_FW_MODE; /* disable fw */ in radeon_agp_init()
330 ret = radeon_agp_head_enable(rdev, mode); in radeon_agp_init()
332 DRM_ERROR("Unable to enable AGP (mode = 0x%lx)\n", mode.mode); in radeon_agp_init()
337 rdev->mc.agp_base = rdev->agp->agp_info.aper_base; in radeon_agp_init()
338 rdev->mc.gtt_size = rdev->agp->agp_info.aper_size << 20; in radeon_agp_init()
339 rdev->mc.gtt_start = rdev->mc.agp_base; in radeon_agp_init()
340 rdev->mc.gtt_end = rdev->mc.gtt_start + rdev->mc.gtt_size - 1; in radeon_agp_init()
341 dev_info(rdev->dev, "GTT: %lluM 0x%08llX - 0x%08llX\n", in radeon_agp_init()
342 rdev->mc.gtt_size >> 20, rdev->mc.gtt_start, rdev->mc.gtt_end); in radeon_agp_init()
345 if (rdev->family < CHIP_R200) { in radeon_agp_init()
358 if (rdev->flags & RADEON_IS_AGP) { in radeon_agp_resume()
361 dev_warn(rdev->dev, "radeon AGP reinit failed\n"); in radeon_agp_resume()
369 if (rdev->agp && rdev->agp->acquired) { in radeon_agp_fini()