111,6 → 111,7 |
|
/* Valid dotclock? */ |
if (dotclock > 0) { |
int frame_size; |
/* Convert scanline length in pixels and video dot clock to |
* line duration, frame duration and pixel duration in |
* nanoseconds: |
118,7 → 119,10 |
pixeldur_ns = (s64) div64_u64(1000000000, dotclock); |
linedur_ns = (s64) div64_u64(((u64) crtc->hwmode.crtc_htotal * |
1000000000), dotclock); |
framedur_ns = (s64) crtc->hwmode.crtc_vtotal * linedur_ns; |
frame_size = crtc->hwmode.crtc_htotal * |
crtc->hwmode.crtc_vtotal; |
framedur_ns = (s64) div64_u64((u64) frame_size * 1000000000, |
dotclock); |
} else |
DRM_ERROR("crtc %d: Can't calculate constants, dotclock = 0!\n", |
crtc->base.id); |