arch/arm/mach-rpc/include/mach/acornfb.h
Source file repositories/reference/linux-study-clean/arch/arm/mach-rpc/include/mach/acornfb.h
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-rpc/include/mach/acornfb.h- Extension
.h- Size
- 3278 bytes
- Lines
- 138
- Domain
- Architecture Layer
- Bucket
- arch/arm
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
function Copyrightfunction acornfb_vidc20_find_pllfunction acornfb_vidc20_find_rates
Annotated Snippet
if (d < best_d) {
best_d = d;
best_v = v - 1;
best_r = r - 1;
}
if (d == 0)
break;
}
return best_v << 8 | best_r;
}
static inline void
acornfb_vidc20_find_rates(struct vidc_timing *vidc,
struct fb_var_screeninfo *var)
{
u_int div;
/* Select pixel-clock divisor to keep PLL in range */
div = var->pixclock / 9090; /*9921*/
/* Limit divisor */
if (div == 0)
div = 1;
if (div > 8)
div = 8;
/* Encode divisor to VIDC20 setting */
switch (div) {
case 1: vidc->control |= VIDC20_CTRL_PIX_CK; break;
case 2: vidc->control |= VIDC20_CTRL_PIX_CK2; break;
case 3: vidc->control |= VIDC20_CTRL_PIX_CK3; break;
case 4: vidc->control |= VIDC20_CTRL_PIX_CK4; break;
case 5: vidc->control |= VIDC20_CTRL_PIX_CK5; break;
case 6: vidc->control |= VIDC20_CTRL_PIX_CK6; break;
case 7: vidc->control |= VIDC20_CTRL_PIX_CK7; break;
case 8: vidc->control |= VIDC20_CTRL_PIX_CK8; break;
}
/*
* With VRAM, the FIFO can be set to the highest possible setting
* because there are no latency considerations for other memory
* accesses. However, in 64 bit bus mode the FIFO preload value
* must not be set to VIDC20_CTRL_FIFO_28 because this will let
* the FIFO overflow. See VIDC20 manual page 33 (6.0 Setting the
* FIFO preload value).
*/
if (current_par.using_vram) {
if (current_par.vram_half_sam == 2048)
vidc->control |= VIDC20_CTRL_FIFO_24;
else
vidc->control |= VIDC20_CTRL_FIFO_28;
} else {
unsigned long bandwidth = acornfb_bandwidth(var);
/* Encode bandwidth as VIDC20 setting */
if (bandwidth > 33334) /* < 30.0MB/s */
vidc->control |= VIDC20_CTRL_FIFO_16;
else if (bandwidth > 26666) /* < 37.5MB/s */
vidc->control |= VIDC20_CTRL_FIFO_20;
else if (bandwidth > 22222) /* < 45.0MB/s */
vidc->control |= VIDC20_CTRL_FIFO_24;
else /* > 45.0MB/s */
vidc->control |= VIDC20_CTRL_FIFO_28;
}
/* Find the PLL values */
vidc->pll_ctl = acornfb_vidc20_find_pll(var->pixclock / div);
}
#define acornfb_default_control() (VIDC20_CTRL_PIX_VCLK)
#define acornfb_default_econtrol() (VIDC20_ECTL_DAC | VIDC20_ECTL_REG(3))
Annotation
- Detected declarations: `function Copyright`, `function acornfb_vidc20_find_pll`, `function acornfb_vidc20_find_rates`.
- Atlas domain: Architecture Layer / arch/arm.
- 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.