Lines Matching refs:pAC

83 static unsigned int GetCurrentSystemLoad(SK_AC *pAC);
84 static SK_U64 GetIsrCalls(SK_AC *pAC);
85 static SK_BOOL IsIntModEnabled(SK_AC *pAC);
86 static void SetCurrIntCtr(SK_AC *pAC);
87 static void EnableIntMod(SK_AC *pAC);
88 static void DisableIntMod(SK_AC *pAC);
89 static void ResizeDimTimerDuration(SK_AC *pAC);
90 static void DisplaySelectedModerationType(SK_AC *pAC);
91 static void DisplaySelectedModerationMask(SK_AC *pAC);
92 static void DisplayDescrRatio(SK_AC *pAC);
123 SkDimModerate(SK_AC *pAC) { in SkDimModerate() argument
129 #define M_DIMINFO pAC->DynIrqModInfo in SkDimModerate()
131 if (!IsIntModEnabled(pAC)) { in SkDimModerate()
133 CurrSysLoad = GetCurrentSystemLoad(pAC); in SkDimModerate()
139 EnableIntMod(pAC); in SkDimModerate()
150 EnableIntMod(pAC); in SkDimModerate()
166 IsrCallsPerSec = GetIsrCalls(pAC); in SkDimModerate()
173 DisableIntMod(pAC); in SkDimModerate()
184 ResizeDimTimerDuration(pAC); in SkDimModerate()
194 DisplaySelectedModerationType(pAC); in SkDimModerate()
195 DisplaySelectedModerationMask(pAC); in SkDimModerate()
196 DisplayDescrRatio(pAC); in SkDimModerate()
200 SetCurrIntCtr(pAC); in SkDimModerate()
213 SkDimStartModerationTimer(SK_AC *pAC) { in SkDimStartModerationTimer() argument
218 SkTimerStart(pAC, pAC->IoBase, &pAC->DynIrqModInfo.ModTimer, in SkDimStartModerationTimer()
235 SkDimEnableModerationIfNeeded(SK_AC *pAC) { in SkDimEnableModerationIfNeeded() argument
238 EnableIntMod(pAC); /* notification print in this function */ in SkDimEnableModerationIfNeeded()
240 SkDimStartModerationTimer(pAC); in SkDimEnableModerationIfNeeded()
261 SkDimDisplayModerationSettings(SK_AC *pAC) { in SkDimDisplayModerationSettings() argument
262 DisplaySelectedModerationType(pAC); in SkDimDisplayModerationSettings()
263 DisplaySelectedModerationMask(pAC); in SkDimDisplayModerationSettings()
286 GetCurrentSystemLoad(SK_AC *pAC) { in GetCurrentSystemLoad() argument
358 GetIsrCalls(SK_AC *pAC) { in GetIsrCalls() argument
364 if (pAC->DynIrqModInfo.MaskIrqModeration == IRQ_MASK_TX_ONLY) { in GetIsrCalls()
365 if (pAC->GIni.GIMacsFound == 2) { in GetIsrCalls()
366 TxPort1IntDiff = pAC->Pnmi.Port[1].TxIntrCts - in GetIsrCalls()
367 pAC->DynIrqModInfo.PrevPort1TxIntrCts; in GetIsrCalls()
369 TxPort0IntDiff = pAC->Pnmi.Port[0].TxIntrCts - in GetIsrCalls()
370 pAC->DynIrqModInfo.PrevPort0TxIntrCts; in GetIsrCalls()
371 } else if (pAC->DynIrqModInfo.MaskIrqModeration == IRQ_MASK_RX_ONLY) { in GetIsrCalls()
372 if (pAC->GIni.GIMacsFound == 2) { in GetIsrCalls()
373 RxPort1IntDiff = pAC->Pnmi.Port[1].RxIntrCts - in GetIsrCalls()
374 pAC->DynIrqModInfo.PrevPort1RxIntrCts; in GetIsrCalls()
376 RxPort0IntDiff = pAC->Pnmi.Port[0].RxIntrCts - in GetIsrCalls()
377 pAC->DynIrqModInfo.PrevPort0RxIntrCts; in GetIsrCalls()
379 if (pAC->GIni.GIMacsFound == 2) { in GetIsrCalls()
380 RxPort1IntDiff = pAC->Pnmi.Port[1].RxIntrCts - in GetIsrCalls()
381 pAC->DynIrqModInfo.PrevPort1RxIntrCts; in GetIsrCalls()
382 TxPort1IntDiff = pAC->Pnmi.Port[1].TxIntrCts - in GetIsrCalls()
383 pAC->DynIrqModInfo.PrevPort1TxIntrCts; in GetIsrCalls()
385 RxPort0IntDiff = pAC->Pnmi.Port[0].RxIntrCts - in GetIsrCalls()
386 pAC->DynIrqModInfo.PrevPort0RxIntrCts; in GetIsrCalls()
387 TxPort0IntDiff = pAC->Pnmi.Port[0].TxIntrCts - in GetIsrCalls()
388 pAC->DynIrqModInfo.PrevPort0TxIntrCts; in GetIsrCalls()
407 GetRxCalls(SK_AC *pAC) { in GetRxCalls() argument
411 if (pAC->GIni.GIMacsFound == 2) { in GetRxCalls()
412 RxPort1IntDiff = pAC->Pnmi.Port[1].RxIntrCts - in GetRxCalls()
413 pAC->DynIrqModInfo.PrevPort1RxIntrCts; in GetRxCalls()
415 RxPort0IntDiff = pAC->Pnmi.Port[0].RxIntrCts - in GetRxCalls()
416 pAC->DynIrqModInfo.PrevPort0RxIntrCts; in GetRxCalls()
433 SetCurrIntCtr(SK_AC *pAC) { in SetCurrIntCtr() argument
434 if (pAC->GIni.GIMacsFound == 2) { in SetCurrIntCtr()
435 pAC->DynIrqModInfo.PrevPort1RxIntrCts = pAC->Pnmi.Port[1].RxIntrCts; in SetCurrIntCtr()
436 pAC->DynIrqModInfo.PrevPort1TxIntrCts = pAC->Pnmi.Port[1].TxIntrCts; in SetCurrIntCtr()
438 pAC->DynIrqModInfo.PrevPort0RxIntrCts = pAC->Pnmi.Port[0].RxIntrCts; in SetCurrIntCtr()
439 pAC->DynIrqModInfo.PrevPort0TxIntrCts = pAC->Pnmi.Port[0].TxIntrCts; in SetCurrIntCtr()
455 IsIntModEnabled(SK_AC *pAC) { in IsIntModEnabled() argument
458 SK_IN32(pAC->IoBase, B2_IRQM_CTRL, &CtrCmd); in IsIntModEnabled()
477 EnableIntMod(SK_AC *pAC) { in EnableIntMod() argument
480 if (pAC->GIni.GIChipId == CHIP_ID_GENESIS) { in EnableIntMod()
481 ModBase = C_CLK_FREQ_GENESIS / pAC->DynIrqModInfo.MaxModIntsPerSec; in EnableIntMod()
483 ModBase = C_CLK_FREQ_YUKON / pAC->DynIrqModInfo.MaxModIntsPerSec; in EnableIntMod()
486 SK_OUT32(pAC->IoBase, B2_IRQM_INI, ModBase); in EnableIntMod()
487 SK_OUT32(pAC->IoBase, B2_IRQM_MSK, pAC->DynIrqModInfo.MaskIrqModeration); in EnableIntMod()
488 SK_OUT32(pAC->IoBase, B2_IRQM_CTRL, TIM_START); in EnableIntMod()
506 DisableIntMod(SK_AC *pAC) { in DisableIntMod() argument
508 SK_OUT32(pAC->IoBase, B2_IRQM_CTRL, TIM_STOP); in DisableIntMod()
527 ResizeDimTimerDuration(SK_AC *pAC) { in ResizeDimTimerDuration() argument
540 if (IsIntModEnabled(pAC)) { in ResizeDimTimerDuration()
555 TotalMaxNbrDescr = pAC->RxDescrPerRing * GetRxCalls(pAC); in ResizeDimTimerDuration()
615 if (pAC->GIni.GIChipId == CHIP_ID_GENESIS) { in ResizeDimTimerDuration()
616 ModBase = C_CLK_FREQ_GENESIS / pAC->DynIrqModInfo.MaxModIntsPerSec; in ResizeDimTimerDuration()
618 ModBase = C_CLK_FREQ_YUKON / pAC->DynIrqModInfo.MaxModIntsPerSec; in ResizeDimTimerDuration()
624 SK_OUT32(pAC->IoBase, B2_IRQM_INI, ModBase); in ResizeDimTimerDuration()
637 DisplaySelectedModerationType(SK_AC *pAC) { in DisplaySelectedModerationType() argument
639 if (pAC->DynIrqModInfo.DisplayStats) { in DisplaySelectedModerationType()
640 if (pAC->DynIrqModInfo.IntModTypeSelect == C_INT_MOD_STATIC) { in DisplaySelectedModerationType()
642 pAC->DynIrqModInfo.MaxModIntsPerSec); in DisplaySelectedModerationType()
643 } else if (pAC->DynIrqModInfo.IntModTypeSelect == C_INT_MOD_DYNAMIC) { in DisplaySelectedModerationType()
644 if (IsIntModEnabled(pAC)) { in DisplaySelectedModerationType()
646 pAC->DynIrqModInfo.MaxModIntsPerSec); in DisplaySelectedModerationType()
666 DisplaySelectedModerationMask(SK_AC *pAC) { in DisplaySelectedModerationMask() argument
668 if (pAC->DynIrqModInfo.DisplayStats) { in DisplaySelectedModerationMask()
669 if (pAC->DynIrqModInfo.IntModTypeSelect != C_INT_MOD_NONE) { in DisplaySelectedModerationMask()
670 switch (pAC->DynIrqModInfo.MaskIrqModeration) { in DisplaySelectedModerationMask()
712 DisplayDescrRatio(SK_AC *pAC) { in DisplayDescrRatio() argument
715 if (pAC->DynIrqModInfo.DisplayStats) { in DisplayDescrRatio()
716 TotalMaxNbrDescr = pAC->RxDescrPerRing * GetRxCalls(pAC); in DisplayDescrRatio()