W dniu 7 czerwca 2009 18:26 użytkownik Christian König
Am Sonntag, den 07.06.2009, 01:56 +0200 schrieb Rafał Miłecki:
Hm, I wonder if my patch shouldn't affect some smaller group of devices.
For what chipsets we actually use RV620PLL1Power? Is this used for example for RV630? Or maybe even for RV610? If so this patch would need additional condition. Take a look at rhd_pll.c line ~1284: if (rhdPtr->ChipSet < RHD_RV620) { PLL->Set = R500PLL1Set; PLL->Power = R500PLL1Power; PLL->Save = R500PLL1Save; PLL->Restore = R500PLL1Restore; } else { PLL->Set = RV620PLL1Set; PLL->Power = RV620PLL1Power; PLL->Save = RV620PLL1Save; PLL->Restore = RV620PLL1Restore; }
Hm, OK, that's the easy part. We use RV620PLL* for newer than RHD_RV620 (including RHD_RV620). The next question is when we stop using RV620PLL* and start using AtomBIOS. Browsing rhd_id.c I found: #define USE_ATOMBIOS RHD_RV770 #define USE_ATOM_CRTC USE_ATOMBIOS #define USE_ATOM_PLL USE_ATOMBIOS #define USE_ATOM_OUTPUT USE_ATOMBIOS Next I analyzed Bool RHDUseAtom(...) and found out we force using AtomBIOS for PLL (FromSys == TRUE) starting from USE_ATOM_PLL which is RV770. So to sum up RV620PLL* is used for: { RHD_RV620, "RV620" }, { RHD_RV635, "RV635" }, { RHD_RV670, "RV670" }, { RHD_R680, "R680" }, /* R700 Mobility */ { RHD_M82, "M82" }, { RHD_M88, "M88" }, { RHD_M86, "M86" }, /* R600 integrated */ { RHD_RS780, "RS780" }, { RHD_RS880, "RS880" }, /* R700 */ { RHD_R700, "R700" }, { RHD_RV710, "RV710" }, { RHD_RV730, "RV730" }, { RHD_RV740, "RV740" }, am I right? Can someone check this with me, please? Do we really use RV620PLL* for listed chipsets?
I'm also not sure about 0x2000 of P2PLL_CNTL. From rhd_pll.c I can read this comment: RHDRegMask(PLL, P1PLL_CNTL, 0x00002000, 0x00002000); /* reset anti-glitch */
My patch actually adds P1PLL_CNTL and 0x2000 (as that is what AtomBIOS does). Do we really need this? Should we "reset anti-glitch" (whatever it means) for powering down? Correct me if i am wrong, but if i understand that patch correctly all that the code from AtomBIOS does is checking if the PLL is still in use, before shutting it down.
So i have a lot simpler question: Why do we power down a used PLL in the first place?
For full explaination, please read http://bugs.freedesktop.org/show_bug.cgi?id=18016 Short explaination:
libv: ah, rv620/635. libv: this is where the beautifully separated hw blocks got mucked together on the pll side.
rv620/635 is tricky about PLL engines. These aren't 100% separated and it seems we can't really disable any on them at any time. It seems for example we have to keep PLL1 running if we use PLL2 for driving some output. -- Rafał Miłecki -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org