From: Ville Syrjälä Date: Tue, 14 Aug 2012 10:53:38 +0000 (+0000) Subject: drm: Initialize object type when using DRM_MODE() macro X-Git-Tag: upstream/snapshot3+hdmi~6759^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=22f5d115a2b087c977128f84ee557ad71530330e;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git drm: Initialize object type when using DRM_MODE() macro 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. Signed-off-by: Ville Syrjälä Signed-off-by: Dave Airlie --- diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index ced3625..bfacf0d 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -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 */