Subversion Repositories Kolibri OS

Rev

Rev 3031 | Rev 4075 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3031 Rev 3480
Line 109... Line 109...
109
	if (crtc->hwmode.flags & DRM_MODE_FLAG_INTERLACE)
109
	if (crtc->hwmode.flags & DRM_MODE_FLAG_INTERLACE)
110
		dotclock *= 2;
110
		dotclock *= 2;
Line 111... Line 111...
111
 
111
 
112
	/* Valid dotclock? */
112
	/* Valid dotclock? */
-
 
113
	if (dotclock > 0) {
113
	if (dotclock > 0) {
114
		int frame_size;
114
		/* Convert scanline length in pixels and video dot clock to
115
		/* Convert scanline length in pixels and video dot clock to
115
		 * line duration, frame duration and pixel duration in
116
		 * line duration, frame duration and pixel duration in
116
		 * nanoseconds:
117
		 * nanoseconds:
117
		 */
118
		 */
118
		pixeldur_ns = (s64) div64_u64(1000000000, dotclock);
119
		pixeldur_ns = (s64) div64_u64(1000000000, dotclock);
119
		linedur_ns  = (s64) div64_u64(((u64) crtc->hwmode.crtc_htotal *
120
		linedur_ns  = (s64) div64_u64(((u64) crtc->hwmode.crtc_htotal *
120
					      1000000000), dotclock);
121
					      1000000000), dotclock);
-
 
122
		frame_size = crtc->hwmode.crtc_htotal *
-
 
123
				crtc->hwmode.crtc_vtotal;
-
 
124
		framedur_ns = (s64) div64_u64((u64) frame_size * 1000000000,
121
		framedur_ns = (s64) crtc->hwmode.crtc_vtotal * linedur_ns;
125
					      dotclock);
122
	} else
126
	} else
123
		DRM_ERROR("crtc %d: Can't calculate constants, dotclock = 0!\n",
127
		DRM_ERROR("crtc %d: Can't calculate constants, dotclock = 0!\n",
Line 124... Line 128...
124
			  crtc->base.id);
128
			  crtc->base.id);