After window disable DECON can access its DMA buffer in current and next
scanout. To avoid possible page fault driver should ensure that two scanouts
passed before freeing framebuffer.
Change-Id: I5508f6686ff51d555eb1497b7a6d21b990fd6003
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
if (ctx->suspended)
return;
- atomic_set(&ctx->wait_vsync_event, 1);
+ atomic_set(&ctx->wait_vsync_event, 2);
/*
* wait for FIMD to signal VSYNC interrupt or return after
decon_update(ctx);
- atomic_set(&ctx->wait_vsync_event, 1);
+ atomic_set(&ctx->wait_vsync_event, 2);
/*
* wait for FIMD to signal VSYNC interrupt or return after
out:
if (atomic_read(&ctx->wait_vsync_event)) {
- atomic_set(&ctx->wait_vsync_event, 0);
+ atomic_dec_if_positive(&ctx->wait_vsync_event);
wake_up(&ctx->wait_vsync_queue);
}