mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
drm/radeon: agp_info->ai_aperture_size is in bytes, not Mbytes
This fixes radeon_agp_init() and gtt_size is now correct. However, this is not enough to make Radeon AGP cards work: ttm_agp_backend.c isn't implemented yet. Submitted by: tijl@
This commit is contained in:
parent
0514e96282
commit
a7c17730f4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=259101
@ -153,11 +153,11 @@ int radeon_agp_init(struct radeon_device *rdev)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rdev->ddev->agp->info.ai_aperture_size < 32) {
|
if ((rdev->ddev->agp->info.ai_aperture_size >> 20) < 32) {
|
||||||
drm_agp_release(rdev->ddev);
|
drm_agp_release(rdev->ddev);
|
||||||
dev_warn(rdev->dev, "AGP aperture too small (%zuM) "
|
dev_warn(rdev->dev, "AGP aperture too small (%zuM) "
|
||||||
"need at least 32M, disabling AGP\n",
|
"need at least 32M, disabling AGP\n",
|
||||||
rdev->ddev->agp->info.ai_aperture_size);
|
rdev->ddev->agp->info.ai_aperture_size >> 20);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ int radeon_agp_init(struct radeon_device *rdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
rdev->mc.agp_base = rdev->ddev->agp->info.ai_aperture_base;
|
rdev->mc.agp_base = rdev->ddev->agp->info.ai_aperture_base;
|
||||||
rdev->mc.gtt_size = rdev->ddev->agp->info.ai_aperture_size << 20;
|
rdev->mc.gtt_size = rdev->ddev->agp->info.ai_aperture_size;
|
||||||
rdev->mc.gtt_start = rdev->mc.agp_base;
|
rdev->mc.gtt_start = rdev->mc.agp_base;
|
||||||
rdev->mc.gtt_end = rdev->mc.gtt_start + rdev->mc.gtt_size - 1;
|
rdev->mc.gtt_end = rdev->mc.gtt_start + rdev->mc.gtt_size - 1;
|
||||||
dev_info(rdev->dev, "GTT: %juM 0x%08jX - 0x%08jX\n",
|
dev_info(rdev->dev, "GTT: %juM 0x%08jX - 0x%08jX\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user