mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 17:59:32 +00:00
[PATCH] Fix more radeon GART start calculation cases
As reported by Jules Villard <jvillard@ens-lyon.fr> and some others, the recent GART aperture start reconfiguration causes problems on some setups. What I _think_ might be happening is that the X server is also trying to muck around with the card memory map and is forcing it back into a wrong setting that also happens to no longer match what the DRM wants to do and blows up. There are bugs all over the place in that code (and still some bugs in the DRM as well anyway). This patch attempts to avoid that by using the largest of the 2 values, which I think will cause it to behave as it used to for you and will still fix the problem with machines that have an aperture size smaller than the video memory. Acked-by: Jules Villard <jvillard@ens-lyon.fr> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
5ab4a6c81e
commit
67dbb4ea33
1 changed files with 4 additions and 2 deletions
|
@ -1312,7 +1312,7 @@ static void radeon_set_pcigart(drm_radeon_private_t * dev_priv, int on)
|
|||
static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
|
||||
{
|
||||
drm_radeon_private_t *dev_priv = dev->dev_private;
|
||||
unsigned int mem_size;
|
||||
unsigned int mem_size, aper_size;
|
||||
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
|
@ -1527,7 +1527,9 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
|
|||
mem_size = RADEON_READ(RADEON_CONFIG_MEMSIZE);
|
||||
if (mem_size == 0)
|
||||
mem_size = 0x800000;
|
||||
dev_priv->gart_vm_start = dev_priv->fb_location + mem_size;
|
||||
aper_size = max(RADEON_READ(RADEON_CONFIG_APER_SIZE), mem_size);
|
||||
|
||||
dev_priv->gart_vm_start = dev_priv->fb_location + aper_size;
|
||||
|
||||
#if __OS_HAS_AGP
|
||||
if (!dev_priv->is_pci)
|
||||
|
|
Loading…
Reference in a new issue