xf86-video-ati: Branch 'master' - 9 commits

Michel Dänzer michel at tungstengraphics.com
Thu Aug 23 07:43:42 PDT 2007


On Thu, 2007-08-23 at 09:49 -0400, Alex Deucher wrote:
> On 8/23/07, Michel Dänzer <michel at tungstengraphics.com> wrote:
> >
> > radeon_crtc.c: In function 'radeon_crtc_mode_set':
> > radeon_crtc.c:762: warning: 'output' may be used uninitialized in this function
> >
> > I don't understand the logic of that function so I'm not sure how to fix
> > it.
> 
> We need to get the output type connected to the crtc in question in
> order to do some fix ups to the crtc regs for tv-out and in order to
> avoid odd dividers in the plls for DFPs.

Here's what I don't understand:

    for (i = 0; i < xf86_config->num_output; i++) {
	output = xf86_config->output[i];
	radeon_output = output->driver_private;

	if (output->crtc == crtc) {
	    montype = radeon_output->MonType;
	}
    }

At the end of this loop, 'output' will be the last output, and 'montype'
will be the monitor type of the last output assigned to the crtc in
question.

    if (montype == MT_STV || montype == MT_CTV) {
	switch (radeon_crtc->crtc_id) {
	case 0:
	    RADEONAdjustCrtcRegistersForTV(pScrn, &info->ModeReg, adjusted_mode, output);
	    RADEONAdjustPLLRegistersForTV(pScrn, &info->ModeReg, adjusted_mode, output);

So AFAICT, 'montype' and 'output' here don't necessarily correspond to
the same output, in fact 'output' may not even correspond to the crtc in
question.

Am I missing something?


-- 
Earthling Michel Dänzer           |          http://tungstengraphics.com
Libre software enthusiast         |          Debian, X and DRI developer



More information about the xorg-driver-ati mailing list