Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] fix MGA DRM regression before 2.6.14

I've gotten a report on lkml, of a possible regression in the MGA DRM in
2.6.14-rc4 (since -rc1), I haven't been able to reproduce it here, but I've
figured out some possible issues in the mga code that were definitely
wrong, some of these are from DRM CVS, the main fix is the agp enable bit
on the old code path still used by everyone.....

Signed-off-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Dave Airlie and committed by
Linus Torvalds
11909d64 d1209d04

+19 -3
+19 -3
drivers/char/drm/mga_dma.c
··· 437 437 drm_mga_dma_bootstrap_t * dma_bs) 438 438 { 439 439 drm_mga_private_t * const dev_priv = (drm_mga_private_t *) dev->dev_private; 440 - const unsigned int warp_size = mga_warp_microcode_size(dev_priv); 440 + unsigned int warp_size = mga_warp_microcode_size(dev_priv); 441 441 int err; 442 442 unsigned offset; 443 443 const unsigned secondary_size = dma_bs->secondary_bin_count ··· 498 498 DRM_ERROR("Unable to bind AGP memory\n"); 499 499 return err; 500 500 } 501 + 502 + /* Make drm_addbufs happy by not trying to create a mapping for less 503 + * than a page. 504 + */ 505 + if (warp_size < PAGE_SIZE) 506 + warp_size = PAGE_SIZE; 501 507 502 508 offset = 0; 503 509 err = drm_addmap( dev, offset, warp_size, ··· 593 587 drm_mga_dma_bootstrap_t * dma_bs) 594 588 { 595 589 drm_mga_private_t * const dev_priv = (drm_mga_private_t *) dev->dev_private; 596 - const unsigned int warp_size = mga_warp_microcode_size(dev_priv); 590 + unsigned int warp_size = mga_warp_microcode_size(dev_priv); 597 591 unsigned int primary_size; 598 592 unsigned int bin_count; 599 593 int err; ··· 604 598 DRM_ERROR("dev->dma is NULL\n"); 605 599 return DRM_ERR(EFAULT); 606 600 } 601 + 602 + /* Make drm_addbufs happy by not trying to create a mapping for less 603 + * than a page. 604 + */ 605 + if (warp_size < PAGE_SIZE) 606 + warp_size = PAGE_SIZE; 607 607 608 608 /* The proper alignment is 0x100 for this mapping */ 609 609 err = drm_addmap(dev, 0, warp_size, _DRM_CONSISTENT, ··· 824 812 } 825 813 826 814 if (! dev_priv->used_new_dma_init) { 815 + 816 + dev_priv->dma_access = MGA_PAGPXFER; 817 + dev_priv->wagp_enable = MGA_WAGP_ENABLE; 818 + 827 819 dev_priv->status = drm_core_findmap(dev, init->status_offset); 828 820 if (!dev_priv->status) { 829 821 DRM_ERROR("failed to find status page!\n"); ··· 944 928 drm_mga_private_t *dev_priv = dev->dev_private; 945 929 946 930 if ((dev_priv->warp != NULL) 947 - && (dev_priv->mmio->type != _DRM_CONSISTENT)) 931 + && (dev_priv->warp->type != _DRM_CONSISTENT)) 948 932 drm_core_ioremapfree(dev_priv->warp, dev); 949 933 950 934 if ((dev_priv->primary != NULL)