Skip to contentSkip to conversation

drm: Initialize object type when using DRM_MODE() macro

PATCH New [email protected] 1 participant 1 message Aug 14, 2012

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

PATCH 1/1 drm: Initialize object type when using DRM_MODE() macro

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

DRM_MODE() macro doesn't initialize the type of the base drm object. When a copy is made of the mode, the object type is overwritten with zero, and the the object can no longer be found by drm_mode_object_find() due to the type check failing.

---
 include/drm/drm_crtc.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
include/drm/drm_crtc.h +2 -1
index a1a0386..8469ee0 100644
@@ -118,7 +118,8 @@ enum drm_mode_status {
 	.hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), \
 	.htotal = (ht), .hskew = (hsk), .vdisplay = (vd), \
 	.vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), \
-	.vscan = (vs), .flags = (f), .vrefresh = 0
+	.vscan = (vs), .flags = (f), .vrefresh = 0, \
+	.base.type = DRM_MODE_OBJECT_MODE
 
 #define CRTC_INTERLACE_HALVE_V 0x1 /* halve V values for interlacing */
 
Signature · 6 lines
1.7.8.6

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