tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: nouveau: NVIDIA GeForce 6800 works well in DVI but not in VGA



Can you show the glitch as a picture? thanks!


On Sat, Dec 29, 2018 at 10:49:49PM +0100, Frédéric Fauberteau wrote:
> Le 2018-12-29 17:23, Frédéric Fauberteau a écrit :
> [   1.0072953] nouveau0: info: DRM: MM: using M2MF for buffer copies
> [   1.0072953] nouveau0: info: DRM: Setting dpms mode 3 on TV encoder
> (output 3)
> [   1.0072953] nouveaufb0 at nouveau0
> [   1.0072953] nouveaufb0: framebuffer at 0xdd454000, size 1680x1050, depth
> 32, stride 6912
> [   1.0072953] wsdisplay0 at nouveaufb0 kbdmux 1: console (default, vt100
> emulation)

Last time I had visual glitch it was because nvidia hw needs a high
alignment (256 bytes).

It looked like: http://i.imgur.com/4f6rFVs.jpg
(It was PR 51181)

The logic for it was:

nouveau_fbcon_create

        mode_cmd.pitches[0] = mode_cmd.width * (sizes->surface_bpp >> 3);
        mode_cmd.pitches[0] = roundup(mode_cmd.pitches[0], 256);

Pick resolution with 256 byte alignment
(you'll see some more attempts at rounding to fit hw:
        size = mode_cmd.pitches[0] * mode_cmd.height;
	size = roundup(size, PAGE_SIZE);

I don't think we use this rounding result, so perhaps we should, and I
got lucky that the resolution doesn't cause problems)



        nfa.nfa_fb_linebytes = mode_cmd.pitches[0];

Pass it around..

nouveaufb_attach_task

                .da_fb_linebytes = nfa->nfa_fb_linebytes,

        error = drmfb_attach(&sc->sc_drmfb, &da);


netbsd code now, make proplib dictionary for genfb
drmfb_attach

        prop_dictionary_set_uint16(dict, "linebytes", da->da_fb_linebytes);

        genfb_init(&sc->sc_genfb);


Home | Main Index | Thread Index | Old Index