summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_ttm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-03-18 19:12:31 +1000
committerDave Airlie <airlied@redhat.com>2014-03-18 19:12:31 +1000
commitbcc298bc924e0a990f853ba3e19f8b5a833cba7e (patch)
tree1c87c8f73dc41fd11ee3dacb1b91a7cc8b4798bb /drivers/gpu/drm/radeon/radeon_ttm.c
parent978c6050165bba52eab7ef3581d447eb215def77 (diff)
parentdcb99fd9b08cfe1afe426af4d8d3cbc429190f15 (diff)
downloadblackbird-op-linux-bcc298bc924e0a990f853ba3e19f8b5a833cba7e.tar.gz
blackbird-op-linux-bcc298bc924e0a990f853ba3e19f8b5a833cba7e.zip
Merge tag 'v3.14-rc7' into drm-next
Linux 3.14-rc7 Backmerge to help out Intel guys.
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_ttm.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_ttm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 60dfce889ecf..d46b33a1cbcd 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -720,6 +720,9 @@ int radeon_ttm_init(struct radeon_device *rdev)
DRM_ERROR("Failed initializing VRAM heap.\n");
return r;
}
+ /* Change the size here instead of the init above so only lpfn is affected */
+ radeon_ttm_set_active_vram_size(rdev, rdev->mc.visible_vram_size);
+
r = radeon_bo_create(rdev, 256 * 1024, PAGE_SIZE, true,
RADEON_GEM_DOMAIN_VRAM,
NULL, &rdev->stollen_vga_memory);
@@ -941,7 +944,7 @@ static ssize_t radeon_ttm_gtt_read(struct file *f, char __user *buf,
while (size) {
loff_t p = *pos / PAGE_SIZE;
unsigned off = *pos & ~PAGE_MASK;
- ssize_t cur_size = min(size, PAGE_SIZE - off);
+ size_t cur_size = min_t(size_t, size, PAGE_SIZE - off);
struct page *page;
void *ptr;
OpenPOWER on IntegriCloud