Skip to content

Commit

Permalink
pbkit: Remove PTIMER calcuations
Browse files Browse the repository at this point in the history
  • Loading branch information
GXTX committed Jan 6, 2023
1 parent 22565f6 commit 5f4c262
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions lib/pbkit/pbkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -2806,30 +2806,12 @@ int pb_init(void)
odiv=1;
pdiv=(VIDEOREG(NV_PRAMDAC_NVPLL_COEFF)&NV_PRAMDAC_NVPLL_COEFF_PDIV)>>16;

if (mdiv)
{
//Xtal in Xbox is at 16.666 Mhz but we want 31.25Mhz for GPU...
if (((DW_XTAL_16MHZ*ndiv)/(odiv<<pdiv))/mdiv!=233333324)
{
//This PLL configuration doesn't create a 233.33 Mhz freq from Xtal
//Have this issure reported so we can update source for that case
debugPrint("PLL=%lu\n",((DW_XTAL_16MHZ*ndiv)/(odiv<<pdiv))/mdiv);
return -5;
}
}
else
if (!mdiv)
{
pb_kill();
return -5; //invalid GPU internal PLL (Phase Locked Loop=GPU freq generator)
}

//program GPU timer in order to obtain 31.25Mhz (we assume PLL creates 233.33Mhz)
VIDEOREG(NV_PTIMER_NUMERATOR)=56968; //233333324/56968*7629=31247365 (31.25Mhz)
VIDEOREG(NV_PTIMER_DENOMINATOR)=7629;

VIDEOREG(NV_PTIMER_ALARM_0)=0xFFFFFFFF;


//The Gpu instance memory is a special place in PRAMIN area (VRAM attached to RAM?)
//Essential Gpu data will be stored there, for, I guess, top speed access.

Expand Down

0 comments on commit 5f4c262

Please sign in to comment.