drivers/video/fbdev/aty/radeon_pm.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/aty/radeon_pm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/aty/radeon_pm.c- Extension
.c- Size
- 89955 bytes
- Lines
- 2928
- Domain
- Driver Families
- Bucket
- drivers/video
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
radeonfb.hlinux/console.hlinux/agp_backend.hasm/machdep.hasm/pmac_feature.hati_ids.h
Detected Declarations
struct radeon_device_idfunction radeon_apply_workaroundsfunction radeon_apply_workaroundsfunction radeon_pm_disable_dynamic_modefunction radeon_pm_enable_dynamic_modefunction OUTMCfunction INMCfunction radeon_pm_save_regsfunction radeon_pm_restore_regsfunction radeon_pm_disable_iopadfunction radeon_pm_program_v2clkfunction radeon_pm_low_currentfunction radeon_pm_setup_for_suspendfunction nowfunction radeon_pm_yclk_mclk_syncfunction radeon_pm_yclk_mclk_sync_m10function radeon_pm_program_mode_regfunction radeon_pm_m10_program_mode_waitfunction radeon_pm_enable_dllfunction radeon_pm_enable_dll_m10function radeon_pm_full_reset_sdramfunction radeon_pm_reset_pad_ctlr_strengthfunction radeon_pm_all_ppls_offfunction radeon_pm_start_mclk_sclkfunction radeon_pm_m10_disable_spread_spectrumfunction radeon_pm_m10_enable_lvds_spread_spectrumfunction radeon_pm_restore_pixel_pllfunction radeon_pm_m10_reconfigure_mcfunction radeon_reinitialize_M10function radeon_pm_m9p_reconfigure_mcfunction radeon_reinitialize_M9Pfunction radeon_reinitialize_QWfunction radeonfb_whack_power_statefunction radeon_set_suspendfunction radeonfb_pci_suspend_latefunction radeonfb_pci_suspendfunction radeonfb_pci_hibernatefunction radeonfb_pci_freezefunction radeon_check_power_lossfunction radeonfb_pci_resumefunction radeonfb_early_resumefunction radeonfb_pm_initfunction Snowyfunction radeonfb_pm_exit
Annotated Snippet
struct radeon_device_id {
const char *ident; /* (arbitrary) Name */
const unsigned short subsystem_vendor; /* Subsystem Vendor ID */
const unsigned short subsystem_device; /* Subsystem Device ID */
const enum radeon_pm_mode pm_mode_modifier; /* modify pm_mode */
const reinit_function_ptr new_reinit_func; /* changed reinit_func */
};
#define BUGFIX(model, sv, sd, pm, fn) { \
.ident = model, \
.subsystem_vendor = sv, \
.subsystem_device = sd, \
.pm_mode_modifier = pm, \
.new_reinit_func = fn \
}
static struct radeon_device_id radeon_workaround_list[] = {
BUGFIX("IBM Thinkpad R32",
PCI_VENDOR_ID_IBM, 0x1905,
radeon_pm_d2, NULL),
BUGFIX("IBM Thinkpad R40",
PCI_VENDOR_ID_IBM, 0x0526,
radeon_pm_d2, NULL),
BUGFIX("IBM Thinkpad R40",
PCI_VENDOR_ID_IBM, 0x0527,
radeon_pm_d2, NULL),
BUGFIX("IBM Thinkpad R50/R51/T40/T41",
PCI_VENDOR_ID_IBM, 0x0531,
radeon_pm_d2, NULL),
BUGFIX("IBM Thinkpad R51/T40/T41/T42",
PCI_VENDOR_ID_IBM, 0x0530,
radeon_pm_d2, NULL),
BUGFIX("IBM Thinkpad T30",
PCI_VENDOR_ID_IBM, 0x0517,
radeon_pm_d2, NULL),
BUGFIX("IBM Thinkpad T40p",
PCI_VENDOR_ID_IBM, 0x054d,
radeon_pm_d2, NULL),
BUGFIX("IBM Thinkpad T42",
PCI_VENDOR_ID_IBM, 0x0550,
radeon_pm_d2, NULL),
BUGFIX("IBM Thinkpad X31/X32",
PCI_VENDOR_ID_IBM, 0x052f,
radeon_pm_d2, NULL),
BUGFIX("Samsung P35",
PCI_VENDOR_ID_SAMSUNG, 0xc00c,
radeon_pm_off, radeon_reinitialize_M10),
BUGFIX("Acer Aspire 2010",
PCI_VENDOR_ID_AI, 0x0061,
radeon_pm_off, radeon_reinitialize_M10),
BUGFIX("Acer Travelmate 290D/292LMi",
PCI_VENDOR_ID_AI, 0x005a,
radeon_pm_off, radeon_reinitialize_M10),
{ .ident = NULL }
};
static int radeon_apply_workarounds(struct radeonfb_info *rinfo)
{
struct radeon_device_id *id;
for (id = radeon_workaround_list; id->ident != NULL; id++ )
if ((id->subsystem_vendor == rinfo->pdev->subsystem_vendor ) &&
(id->subsystem_device == rinfo->pdev->subsystem_device )) {
/* we found a device that requires workaround */
printk(KERN_DEBUG "radeonfb: %s detected"
", enabling workaround\n", id->ident);
rinfo->pm_mode |= id->pm_mode_modifier;
if (id->new_reinit_func != NULL)
rinfo->reinit_func = id->new_reinit_func;
return 1;
}
return 0; /* not found */
}
#else /* defined(CONFIG_PM) && defined(CONFIG_X86) */
static inline int radeon_apply_workarounds(struct radeonfb_info *rinfo)
{
return 0;
}
#endif /* defined(CONFIG_PM) && defined(CONFIG_X86) */
static void radeon_pm_disable_dynamic_mode(struct radeonfb_info *rinfo)
{
u32 tmp;
Annotation
- Immediate include surface: `radeonfb.h`, `linux/console.h`, `linux/agp_backend.h`, `asm/machdep.h`, `asm/pmac_feature.h`, `ati_ids.h`.
- Detected declarations: `struct radeon_device_id`, `function radeon_apply_workarounds`, `function radeon_apply_workarounds`, `function radeon_pm_disable_dynamic_mode`, `function radeon_pm_enable_dynamic_mode`, `function OUTMC`, `function INMC`, `function radeon_pm_save_regs`, `function radeon_pm_restore_regs`, `function radeon_pm_disable_iopad`.
- Atlas domain: Driver Families / drivers/video.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.