Skip to content

Commit 5f4c262

Browse files
committed
pbkit: Remove PTIMER calcuations
1 parent 22565f6 commit 5f4c262

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

lib/pbkit/pbkit.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2806,30 +2806,12 @@ int pb_init(void)
28062806
odiv=1;
28072807
pdiv=(VIDEOREG(NV_PRAMDAC_NVPLL_COEFF)&NV_PRAMDAC_NVPLL_COEFF_PDIV)>>16;
28082808

2809-
if (mdiv)
2810-
{
2811-
//Xtal in Xbox is at 16.666 Mhz but we want 31.25Mhz for GPU...
2812-
if (((DW_XTAL_16MHZ*ndiv)/(odiv<<pdiv))/mdiv!=233333324)
2813-
{
2814-
//This PLL configuration doesn't create a 233.33 Mhz freq from Xtal
2815-
//Have this issure reported so we can update source for that case
2816-
debugPrint("PLL=%lu\n",((DW_XTAL_16MHZ*ndiv)/(odiv<<pdiv))/mdiv);
2817-
return -5;
2818-
}
2819-
}
2820-
else
2809+
if (!mdiv)
28212810
{
28222811
pb_kill();
28232812
return -5; //invalid GPU internal PLL (Phase Locked Loop=GPU freq generator)
28242813
}
28252814

2826-
//program GPU timer in order to obtain 31.25Mhz (we assume PLL creates 233.33Mhz)
2827-
VIDEOREG(NV_PTIMER_NUMERATOR)=56968; //233333324/56968*7629=31247365 (31.25Mhz)
2828-
VIDEOREG(NV_PTIMER_DENOMINATOR)=7629;
2829-
2830-
VIDEOREG(NV_PTIMER_ALARM_0)=0xFFFFFFFF;
2831-
2832-
28332815
//The Gpu instance memory is a special place in PRAMIN area (VRAM attached to RAM?)
28342816
//Essential Gpu data will be stored there, for, I guess, top speed access.
28352817

0 commit comments

Comments
 (0)