sna/dri2: Avoid trying to flip between bo with different pitches
It could happen that we create front/back buffers with different pitches. The kernel refuses to flip between such buffers, and so we will hit some fallback paths that try to fix up the failed flips. Circumvent such by avoiding the flip. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
16574754a9
commit
8901a99afb
|
|
@ -1459,6 +1459,14 @@ can_flip(struct sna * sna,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (get_private(front)->bo->pitch != get_private(back)->bo->pitch) {
|
||||
DBG(("%s -- no, pitch mismatch: front %d, back=%d\n",
|
||||
__FUNCTION__,
|
||||
get_private(front)->bo->pitch,
|
||||
get_private(back)->bo->pitch));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sna_pixmap(pixmap)->pinned & ~(PIN_DRI2 | PIN_SCANOUT)) {
|
||||
DBG(("%s -- no, pinned: front %x\n",
|
||||
__FUNCTION__, sna_pixmap(pixmap)->pinned));
|
||||
|
|
|
|||
Loading…
Reference in New Issue