sna: Check for a request to create an inactive scanout

The combination is just about valid and used along some odd paths, so
replace the assertion with a regular checks.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-06-23 23:41:57 +01:00
parent b459ab9eeb
commit 6ca4ae441c
1 changed files with 1 additions and 2 deletions

View File

@ -3665,8 +3665,7 @@ struct kgem_bo *kgem_create_2d(struct kgem *kgem,
size /= PAGE_SIZE;
bucket = cache_bucket(size);
if (flags & CREATE_SCANOUT) {
assert((flags & CREATE_INACTIVE) == 0);
if ((flags & (CREATE_SCANOUT | CREATE_INACTIVE)) == CREATE_SCANOUT) {
list_for_each_entry_reverse(bo, &kgem->scanout, list) {
assert(bo->scanout);
assert(bo->delta);