diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-10 08:32:51 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-10 08:32:51 +0100 |
commit | c99d44d7f09fc92daf64eee1f6f3300e11e1cf01 (patch) | |
tree | 36d3bceae90e7a65f77ce3d2c35213a758c6ccd5 | |
parent | 97d809c26bec2c0120f2dc0bcfd840379bd996fa (diff) |
sna: Prevent changes in tiling/pitch of existing framebuffers
Reported-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/kgem.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 7da05dde..3dcc6142 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -3935,22 +3935,16 @@ struct kgem_bo *kgem_create_2d(struct kgem *kgem, if (size > num_pages(bo) || num_pages(bo) > 2*size) continue; + if (bo->tiling != tiling || bo->pitch != pitch) + /* No tiling/pitch without recreating fb */ + continue; + if (!check_scanout_size(kgem, bo, width, height)) { if (first == NULL) first = bo; continue; } - if (bo->tiling != tiling || - (tiling != I915_TILING_NONE && bo->pitch != pitch)) { - if (!gem_set_tiling(kgem->fd, bo->handle, - tiling, pitch)) - continue; - - bo->tiling = tiling; - bo->pitch = pitch; - } - if (flags & CREATE_INACTIVE && bo->rq) { last = bo; continue; |