提交 8ade2b82 编写于 作者: M Maarten Lankhorst 提交者: Dave Airlie

drm/ast: do not attempt to acquire a reservation while in an interrupt handler

Mutexes should not be acquired in interrupt context. While the trylock
fastpath is arguably safe on all implementations, the slowpath
unlock path definitely isn't.
Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 a06b9a74
......@@ -51,7 +51,7 @@ static void ast_dirty_update(struct ast_fbdev *afbdev,
struct ast_bo *bo;
int src_offset, dst_offset;
int bpp = (afbdev->afb.base.bits_per_pixel + 7)/8;
int ret;
int ret = -EBUSY;
bool unmap = false;
bool store_for_later = false;
int x2, y2;
......@@ -65,7 +65,8 @@ static void ast_dirty_update(struct ast_fbdev *afbdev,
* then the BO is being moved and we should
* store up the damage until later.
*/
ret = ast_bo_reserve(bo, true);
if (!in_interrupt())
ret = ast_bo_reserve(bo, true);
if (ret) {
if (ret != -EBUSY)
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册