On Thu, 2010-08-05 at 12:16 -0400, Matt Turner wrote: > Hi, > I've hit a snag and I'm not really sure how to debug it. > > Both xf86-video-glint/src/pm3_dac.c:Permedia3Init and > kernel/drivers/video/pm3fb.c:pm3fb_write_mode set the mode in > virtually identical ways. I'm trying to do the same, but I think some > of what I'm passing in from drm_display_mode is wrong, specifically > > WREG32(PM3HTotal, glint_shift_bpp(bpp, mode->htotal - 1)); > WREG32(PM3HsEnd, glint_shift_bpp(bpp, mode->hsync_end - mode->hdisplay)); > WREG32(PM3HsStart, glint_shift_bpp(bpp, mode->hsync_start - mode->hdisplay)); > WREG32(PM3HbEnd, glint_shift_bpp(bpp, mode->htotal - mode->hdisplay)); > WREG32(PM3HgEnd, glint_shift_bpp(bpp, mode->htotal - mode->hdisplay)); > WREG32(PM3ScreenStride, glint_shift_bpp(bpp, crtc->fb->width)); > WREG32(PM3VTotal, glint_shift_bpp(bpp, mode->vtotal - 1)); > WREG32(PM3VsEnd, glint_shift_bpp(bpp, mode->vsync_end - 1)); > WREG32(PM3VsStart, glint_shift_bpp(bpp, mode->vsync_start - 1)); > WREG32(PM3VbEnd, glint_shift_bpp(bpp, mode->vtotal - mode->vdisplay)); > > I printed the values that xf86-video-glint passes through here, and of > course they don't match with anything my driver has. I imagine guess > it's because they're all resolution-dependent? They are. What does the X driver print, and what mode are you trying to set? This though: WREG32(PM3VsStart, glint_shift_bpp(bpp, mode->vsync_start - 1)); Versus in the X driver: temp2 = mode->CrtcVSyncStart - mode->CrtcVDisplay; ... STOREREG(PMVsStart, temp2 - 1); For a mode like 1920x1200R, the former is going to be 1202, but the latter is going to be (1203 - 1200) - 1 == 2. So assuming the X driver is right, the hardware is looking for the distance in clocks between the various sync steps, and not their absolute offset from the beginning of the line/frame. - ajax
Attachment:
signature.asc
Description: This is a digitally signed message part
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel