sna: Allow reallocation of larger framebuffers

Since we can assign larger framebuffer to a smaller CRTC, we can reuse
a bo even if it was last used for a bigger framebuffer (without
discarding that framebuffer or bo).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2017-08-31 14:01:10 +01:00
parent 88db4f1dc1
commit 54a1f6337e
1 changed files with 2 additions and 2 deletions

View File

@ -2737,7 +2737,7 @@ static bool check_scanout_size(struct kgem *kgem,
gem_close(kgem->fd, info.handle);
if (width != info.width || height != info.height) {
if (width > info.width || height > info.height) {
DBG(("%s: not using scanout %d (%dx%d), want (%dx%d)\n",
__FUNCTION__,
info.fb_id, info.width, info.height,
@ -5411,7 +5411,7 @@ struct kgem_bo *kgem_create_2d(struct kgem *kgem,
continue;
if (bo->delta && !check_scanout_size(kgem, bo, width, height))
continue;
kgem_bo_rmfb(kgem, bo);
if (flags & CREATE_INACTIVE && bo->rq) {
last = bo;