Skip to contentSkip to conversation

drm: Fix drm_crtc vs. drm_plane type bug in plane->reset() handling

PATCH In review [email protected] 2 participants 2 messages Aug 11, 2014

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

PATCH 1/1 drm: Fix drm_crtc vs. drm_plane type bug in plane->reset() handling

From: Ville Syrjälä <[email protected]>

s/struct drm_crtc/struct drm_plane/ in drm_mode_config_reset() so that we actually dereference the correct type of structure when calling the plane->reset() hook.

Imre mentioned that his VLV was crashing there on resume. I deciced to have a quick look at the code and immediately spotted the problem.

The problem was introduced when the plane->reset() hook was added here:
commit 2aaa4b6f6f6be8c23de8ae60ee30e5d6059c3c64
Author: Daniel Vetter <[email protected]>
Date: Tue Jul 29 15:32:37 2014 +0200

    drm: Add a plane->reset hook
---
 drivers/gpu/drm/drm_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_crtc.c +1 -1
index 23c9c9f..f09b752 100644
@@ -4664,7 +4664,7 @@ out:
 void drm_mode_config_reset(struct drm_device *dev)
 {
 	struct drm_crtc *crtc;
-	struct drm_crtc *plane;
+	struct drm_plane *plane;
 	struct drm_encoder *encoder;
 	struct drm_connector *connector;
 
Signature · 6 lines
1.8.5.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 14 lines · On Mon, Aug 11, 2014 at 03:12:34PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

s/struct drm_crtc/struct drm_plane/ in drm_mode_config_reset() so that we actually dereference the correct type of structure when calling the plane->reset() hook.

Imre mentioned that his VLV was crashing there on resume. I deciced to have a quick look at the code and immediately spotted the problem.

The problem was introduced when the plane->reset() hook was added here:
commit 2aaa4b6f6f6be8c23de8ae60ee30e5d6059c3c64
Author: Daniel Vetter <[email protected]>
Date: Tue Jul 29 15:32:37 2014 +0200

Quoted 4 lines
    drm: Add a plane->reset hook

Oops, thanks for tracking this down. Squashed into the relevant commit in topic/core-stuff.
-Daniel

Quoted 20 lines
---
 drivers/gpu/drm/drm_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_crtc.c +1 -1
index 23c9c9f..f09b752 100644
@@ -4664,7 +4664,7 @@ out:
 void drm_mode_config_reset(struct drm_device *dev)
 {
 	struct drm_crtc *crtc;
-	struct drm_crtc *plane;
+	struct drm_plane *plane;
 	struct drm_encoder *encoder;
 	struct drm_connector *connector;
 
Signature · 1 line
1.8.5.5
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch