diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-31 10:51:02 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-31 11:21:42 +0000 |
commit | 0a748fc49d60dc2bc9494f95c4934592b111831a (patch) | |
tree | e6ae3a636cbc41c1fc64eaa73ed112deb30f5cde /src/sna/sna_io.c | |
parent | 9c1f8a768ca1f762c722f63bab2747e4ff1fd773 (diff) |
sna: Split the tiling limits between upload and copying
The kernel has a bug that prevents pwriting buffers large than the
aperture. Whilst waiting for the fix, limit the upload where possible to
fit within that constraint.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_io.c')
-rw-r--r-- | src/sna/sna_io.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c index f4278bed..eb5df9d4 100644 --- a/src/sna/sna_io.c +++ b/src/sna/sna_io.c @@ -61,7 +61,7 @@ box_intersect(BoxPtr a, const BoxRec *b) static inline bool upload_too_large(struct sna *sna, int width, int height) { - return width * height * 4 > sna->kgem.max_tile_size; + return width * height * 4 > sna->kgem.max_upload_tile_size; } static inline bool must_tile(struct sna *sna, int width, int height) @@ -209,7 +209,7 @@ fallback: step = MIN(sna->render.max_3d_size, 8*(MAXSHORT&~63) / dst->drawable.bitsPerPixel); - while (step * step * 4 > sna->kgem.max_tile_size) + while (step * step * 4 > sna->kgem.max_upload_tile_size) step /= 2; DBG(("%s: tiling download, using %dx%d tiles\n", @@ -595,7 +595,7 @@ fallback: tile: step = MIN(sna->render.max_3d_size, 8*(MAXSHORT&~63) / dst->drawable.bitsPerPixel); - while (step * step * 4 > sna->kgem.max_tile_size) + while (step * step * 4 > sna->kgem.max_upload_tile_size) step /= 2; DBG(("%s: tiling upload, using %dx%d tiles\n", |