Skip to contentSkip to conversation

drm/exynos: fix nested calls to lock mutex in drm resume

PATCH In review Rahul Sharma 3 participants 5 messages Apr 30, 2014 – May 23, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/exynos: fix nested calls to lock mutex in drm resume

From: Rahul Sharma <[email protected]>

While testing S2R on exynos board, system is hanging and rebooting due to nested mutex_lock calls in exynos drm resume callback. Changing the order of the calls is fixing the issue.

---
Based on exynos-drm-next branch in Inki Dae's tree.

 drivers/gpu/drm/exynos/exynos_drm_drv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/exynos/exynos_drm_drv.c +1 -1
index bb7dfee..2bb6233 100644
@@ -184,8 +184,8 @@ static int exynos_drm_resume(struct drm_device *dev)
 			connector->funcs->dpms(connector, connector->dpms);
 	}
 
-	drm_helper_resume_force_mode(dev);
 	drm_modeset_unlock_all(dev);
+	drm_helper_resume_force_mode(dev);
 
 	return 0;
 }
Signature · 1 line
1.7.9.5
#1 lore raw

Hi Inki,

This is another one which has not got reviewed. Please review.

Regards,
Rahul Sharma

Quoted 30 lines · Rahul Sharma

From: Rahul Sharma <[email protected]>

While testing S2R on exynos board, system is hanging and rebooting due to nested mutex_lock calls in exynos drm resume callback. Changing the order of the calls is fixing the issue.

---
Based on exynos-drm-next branch in Inki Dae's tree.

 drivers/gpu/drm/exynos/exynos_drm_drv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/exynos/exynos_drm_drv.c +1 -2
index bb7dfee..2bb6233 100644
@@ -184,8 +184,8 @@ static int exynos_drm_resume(struct drm_device *dev)
                        connector->funcs->dpms(connector, connector->dpms);
        }
 
-       drm_helper_resume_force_mode(dev);
        drm_modeset_unlock_all(dev);
+       drm_helper_resume_force_mode(dev);
 
        return 0;
 }
--

1.7.9.5

#2 lore raw

add Mr. Dae

Quoted 42 lines · Rahul Sharma

Hi Inki,

This is another one which has not got reviewed. Please review.

Regards,
Rahul Sharma

Quoted 28 lines · Rahul Sharma

From: Rahul Sharma <[email protected]>

While testing S2R on exynos board, system is hanging and rebooting due to nested mutex_lock calls in exynos drm resume callback. Changing the order of the calls is fixing the issue.

---
Based on exynos-drm-next branch in Inki Dae's tree.

 drivers/gpu/drm/exynos/exynos_drm_drv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/exynos/exynos_drm_drv.c +1 -2
index bb7dfee..2bb6233 100644
@@ -184,8 +184,8 @@ static int exynos_drm_resume(struct drm_device *dev)
                        connector->funcs->dpms(connector, connector->dpms);
        }
 
-       drm_helper_resume_force_mode(dev);
        drm_modeset_unlock_all(dev);
+       drm_helper_resume_force_mode(dev);
 
        return 0;
 }
--
Quoted 2 lines

1.7.9.5

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
Quoted 8 lines · Sachin Kamat

Hi Rahul,

Quoted 3 lines · Rahul Sharma

Hi Inki,

This is another one which has not got reviewed. Please review.

Inki has applied a similar patch from Takashi [1].

Thanks Sachin,

Good that solution is merged.

@ Inki, sorry for raising concern. It went unnoticed.

Regards,
Rahul Sharma.

Quoted 6 lines

[1] https://lkml.org/lkml/2014/5/9/24

--
With warm regards,
Sachin