diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-28 01:54:47 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-29 14:47:12 +0000 |
commit | 65466f86263b3788b438fe021a12ade371190b01 (patch) | |
tree | 0496eda2bfd01ddce6ccfbd708f30e69ea7cd1d6 /src/sna/sna_video.c | |
parent | 03211f4b0b7e32b6d7dc28e60be72db204b8c8d4 (diff) |
sna: Allow ridiculously large bo, up to half the total GATT
Such large bo place extreme stress on the system, for example trying to
mmap a 1GiB into the CPU domain currently fails due to a kernel bug. :(
So if you can avoid the swap thrashing during the upload, the ddx can now
handle 16k x 16k images on gen4+ on the GPU. That is fine until you want
two such images...
The real complication comes in uploading (and downloading) from such
large textures as they are too large for a single operation with
automatic detiling via either the BLT or the RENDER ring. We could do
manual tiling/switching or, as this patch does, tile the transfer in
chunks small enough to fit into either pipeline.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_video.c')
-rw-r--r-- | src/sna/sna_video.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_video.c b/src/sna/sna_video.c index 7b759a7e..cec04733 100644 --- a/src/sna/sna_video.c +++ b/src/sna/sna_video.c @@ -100,7 +100,7 @@ sna_video_buffer(struct sna *sna, struct sna_video_frame *frame) { /* Free the current buffer if we're going to have to reallocate */ - if (video->buf && video->buf->size < frame->size) + if (video->buf && kgem_bo_size(video->buf) < frame->size) sna_video_free_buffers(sna, video); if (video->buf == NULL) |