getMNP_single calculations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]<

 



Hello,

I am trying to understand the clock calculations found inside the function
getMNP_single at [1].

Before the loop, there's a check made to see if applying the maximum possible
post-divider (P) to the minimum possible VCO-output-frequency (minvco) still
gives an output resultant frequency that is larger than the required frequency
(clk). If so, the minimum VCO-output-frequency being considered is set to
clk * log2(max-post-divider).

The relevant piece of code:

P = 1 << maxP;
if ((clk * P) < minvco) {
        minvco = clk * maxP;
        maxvco = minvco * 2;
}

Would it not be proper to set minvco to clk * max-post-divider? That is,
minvco = clk * P, or minvco = clk << maxP? That should keep the
VCO-output-frequency closer to the original minvco, whereas
clk * log2(max-post-divider) brings it further down.

Thanks,
Amol

[1] https://lxr.missinglinkelectronics.com/linux+v5.14/drivers/gpu/drm/nouveau/nvkm/subdev/clk/pllnv04.c#L29



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux