drivers/gpu/drm/i915/i915_freq.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/i915_freq.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/i915_freq.c- Extension
.c- Size
- 2252 bytes
- Lines
- 112
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
drm/drm_print.hdrm/intel/mchbar_regs.hi915_drv.hi915_freq.h
Detected Declarations
function i9xx_fsb_freqfunction ilk_fsb_freqfunction ilk_mem_freq
Annotated Snippet
switch (fsb) {
case CLKCFG_FSB_400:
return 400000;
case CLKCFG_FSB_533:
return 533333;
case CLKCFG_FSB_667:
return 666667;
case CLKCFG_FSB_800:
return 800000;
case CLKCFG_FSB_1067:
return 1066667;
case CLKCFG_FSB_1333:
return 1333333;
default:
MISSING_CASE(fsb);
return 1333333;
}
} else {
switch (fsb) {
case CLKCFG_FSB_400_ALT:
return 400000;
case CLKCFG_FSB_533:
return 533333;
case CLKCFG_FSB_667:
return 666667;
case CLKCFG_FSB_800:
return 800000;
case CLKCFG_FSB_1067_ALT:
return 1066667;
case CLKCFG_FSB_1333_ALT:
return 1333333;
case CLKCFG_FSB_1600_ALT:
return 1600000;
default:
MISSING_CASE(fsb);
return 1333333;
}
}
}
unsigned int ilk_fsb_freq(struct drm_i915_private *i915)
{
u16 fsb;
fsb = intel_uncore_read16(&i915->uncore, CSIPLL0) & 0x3ff;
switch (fsb) {
case 0x00c:
return 3200000;
case 0x00e:
return 3733333;
case 0x010:
return 4266667;
case 0x012:
return 4800000;
case 0x014:
return 5333333;
case 0x016:
return 5866667;
case 0x018:
return 6400000;
default:
drm_dbg(&i915->drm, "unknown fsb frequency 0x%04x\n", fsb);
return 0;
}
}
unsigned int ilk_mem_freq(struct drm_i915_private *i915)
{
u16 ddrpll;
ddrpll = intel_uncore_read16(&i915->uncore, DDRMPLL1);
switch (ddrpll & 0xff) {
case 0xc:
return 800000;
case 0x10:
return 1066667;
case 0x14:
return 1333333;
case 0x18:
return 1600000;
default:
drm_dbg(&i915->drm, "unknown memory frequency 0x%02x\n",
ddrpll & 0xff);
return 0;
}
}
Annotation
- Immediate include surface: `drm/drm_print.h`, `drm/intel/mchbar_regs.h`, `i915_drv.h`, `i915_freq.h`.
- Detected declarations: `function i9xx_fsb_freq`, `function ilk_fsb_freq`, `function ilk_mem_freq`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.