The discard range codepath takes precedence, so if we get both
unsynchronized and discard_range, choose unsynchronized.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
usage &= ~PIPE_TRANSFER_DISCARD_RANGE;
/* Unsychronized buffer mappings don't have to synchronize the thread. */
- if (usage & PIPE_TRANSFER_UNSYNCHRONIZED)
+ if (usage & PIPE_TRANSFER_UNSYNCHRONIZED) {
+ usage &= ~PIPE_TRANSFER_DISCARD_RANGE;
usage |= TC_TRANSFER_MAP_THREADED_UNSYNC; /* notify the driver */
+ }
/* Never invalidate inside the driver and never infer "unsynchronized". */
return usage |