aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-01-23 18:50:18 -0500
committerDave Airlie <airlied@redhat.com>2014-01-28 19:51:52 -0500
commitf4b4718b61d1d5a7442a4fd6863ea80c3a10e508 (patch)
tree315751b7a57c6b2e953b1013a58c1104fb2e6ca2 /drivers/gpu
parent821b4db3b62139d51cf14090dfab07fb09cb3a6b (diff)
drm: ast,cirrus,mgag200: use drm_can_sleep
these 3 were checking in_interrupt but we have situations where calling vunmap under this could cause a BUG to be hit in smp_call_function_many. Use the drm_can_sleep macro instead, which should stop this path from been taken in this case. Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/ast/ast_fb.c2
-rw-r--r--drivers/gpu/drm/cirrus/cirrus_fbdev.c2
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_fb.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c
index 7b33e14e44aa..3f65dd6676b2 100644
--- a/drivers/gpu/drm/ast/ast_fb.c
+++ b/drivers/gpu/drm/ast/ast_fb.c
@@ -65,7 +65,7 @@ static void ast_dirty_update(struct ast_fbdev *afbdev,
65 * then the BO is being moved and we should 65 * then the BO is being moved and we should
66 * store up the damage until later. 66 * store up the damage until later.
67 */ 67 */
68 if (!in_interrupt()) 68 if (!drm_can_sleep())
69 ret = ast_bo_reserve(bo, true); 69 ret = ast_bo_reserve(bo, true);
70 if (ret) { 70 if (ret) {
71 if (ret != -EBUSY) 71 if (ret != -EBUSY)
diff --git a/drivers/gpu/drm/cirrus/cirrus_fbdev.c b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
index e63a7533f849..2fd4a92162cb 100644
--- a/drivers/gpu/drm/cirrus/cirrus_fbdev.c
+++ b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
@@ -39,7 +39,7 @@ static void cirrus_dirty_update(struct cirrus_fbdev *afbdev,
39 * then the BO is being moved and we should 39 * then the BO is being moved and we should
40 * store up the damage until later. 40 * store up the damage until later.
41 */ 41 */
42 if (!in_interrupt()) 42 if (!drm_can_sleep())
43 ret = cirrus_bo_reserve(bo, true); 43 ret = cirrus_bo_reserve(bo, true);
44 if (ret) { 44 if (ret) {
45 if (ret != -EBUSY) 45 if (ret != -EBUSY)
diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c
index 005b60aa2a00..f9adc27ef32a 100644
--- a/drivers/gpu/drm/mgag200/mgag200_fb.c
+++ b/drivers/gpu/drm/mgag200/mgag200_fb.c
@@ -41,7 +41,7 @@ static void mga_dirty_update(struct mga_fbdev *mfbdev,
41 * then the BO is being moved and we should 41 * then the BO is being moved and we should
42 * store up the damage until later. 42 * store up the damage until later.
43 */ 43 */
44 if (!in_interrupt()) 44 if (!drm_can_sleep())
45 ret = mgag200_bo_reserve(bo, true); 45 ret = mgag200_bo_reserve(bo, true);
46 if (ret) { 46 if (ret) {
47 if (ret != -EBUSY) 47 if (ret != -EBUSY)