drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h- Extension
.h- Size
- 20705 bytes
- Lines
- 715
- 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/display/drm_dp_helper.hdrm/drm_crtc.hdrm/drm_encoder.hdrm/drm_fixed.hdrm/drm_framebuffer.hdrm/drm_probe_helper.hlinux/i2c.hlinux/i2c-algo-bit.hamdgpu_irq.hdrm/display/drm_dp_mst_helper.hmodules/inc/mod_freesync.hamdgpu_dm_irq_params.hamdgpu_dm_ism.h
Detected Declarations
struct amdgpu_bostruct amdgpu_devicestruct amdgpu_encoderstruct amdgpu_routerstruct amdgpu_hpdstruct edidstruct drm_edidstruct amdgpu_i2c_bus_recstruct amdgpu_pllstruct amdgpu_i2c_chanstruct amdgpu_afmtstruct amdgpu_audio_pinstruct amdgpu_audiostruct amdgpu_display_funcsstruct amdgpu_framebufferstruct amdgpu_mode_infostruct amdgpu_backlight_privdatastruct amdgpu_atom_ssstruct amdgpu_crtcstruct amdgpu_encoder_atom_digstruct amdgpu_encoderstruct amdgpu_connector_atom_digstruct amdgpu_gpio_recstruct amdgpu_hpdstruct amdgpu_routerstruct amdgpu_dm_dp_auxstruct amdgpu_i2c_adapterstruct amdgpu_connectorstruct amdgpu_mst_connectorenum amdgpu_rmx_typeenum amdgpu_underscan_typeenum amdgpu_hpd_idenum amdgpu_crtc_irqenum amdgpu_pageflip_irqenum amdgpu_flip_statusenum amdgpu_connector_audioenum amdgpu_connector_dither
Annotated Snippet
struct amdgpu_i2c_bus_rec {
bool valid;
/* id used by atom */
uint8_t i2c_id;
/* id used by atom */
enum amdgpu_hpd_id hpd;
/* can be used with hw i2c engine */
bool hw_capable;
/* uses multi-media i2c engine */
bool mm_i2c;
/* regs and bits */
uint32_t mask_clk_reg;
uint32_t mask_data_reg;
uint32_t a_clk_reg;
uint32_t a_data_reg;
uint32_t en_clk_reg;
uint32_t en_data_reg;
uint32_t y_clk_reg;
uint32_t y_data_reg;
uint32_t mask_clk_mask;
uint32_t mask_data_mask;
uint32_t a_clk_mask;
uint32_t a_data_mask;
uint32_t en_clk_mask;
uint32_t en_data_mask;
uint32_t y_clk_mask;
uint32_t y_data_mask;
};
#define AMDGPU_MAX_BIOS_CONNECTOR 16
/* pll flags */
#define AMDGPU_PLL_USE_BIOS_DIVS (1 << 0)
#define AMDGPU_PLL_NO_ODD_POST_DIV (1 << 1)
#define AMDGPU_PLL_USE_REF_DIV (1 << 2)
#define AMDGPU_PLL_LEGACY (1 << 3)
#define AMDGPU_PLL_PREFER_LOW_REF_DIV (1 << 4)
#define AMDGPU_PLL_PREFER_HIGH_REF_DIV (1 << 5)
#define AMDGPU_PLL_PREFER_LOW_FB_DIV (1 << 6)
#define AMDGPU_PLL_PREFER_HIGH_FB_DIV (1 << 7)
#define AMDGPU_PLL_PREFER_LOW_POST_DIV (1 << 8)
#define AMDGPU_PLL_PREFER_HIGH_POST_DIV (1 << 9)
#define AMDGPU_PLL_USE_FRAC_FB_DIV (1 << 10)
#define AMDGPU_PLL_PREFER_CLOSEST_LOWER (1 << 11)
#define AMDGPU_PLL_USE_POST_DIV (1 << 12)
#define AMDGPU_PLL_IS_LCD (1 << 13)
#define AMDGPU_PLL_PREFER_MINM_OVER_MAXP (1 << 14)
struct amdgpu_pll {
/* reference frequency */
uint32_t reference_freq;
/* fixed dividers */
uint32_t reference_div;
uint32_t post_div;
/* pll in/out limits */
uint32_t pll_in_min;
uint32_t pll_in_max;
uint32_t pll_out_min;
uint32_t pll_out_max;
uint32_t lcd_pll_out_min;
uint32_t lcd_pll_out_max;
uint32_t best_vco;
/* divider limits */
uint32_t min_ref_div;
uint32_t max_ref_div;
uint32_t min_post_div;
uint32_t max_post_div;
uint32_t min_feedback_div;
uint32_t max_feedback_div;
uint32_t min_frac_feedback_div;
uint32_t max_frac_feedback_div;
/* flags for the current clock */
uint32_t flags;
/* pll id */
uint32_t id;
};
struct amdgpu_i2c_chan {
struct i2c_adapter adapter;
struct drm_device *dev;
struct i2c_algo_bit_data bit;
struct amdgpu_i2c_bus_rec rec;
struct drm_dp_aux aux;
bool has_aux;
struct mutex mutex;
Annotation
- Immediate include surface: `drm/display/drm_dp_helper.h`, `drm/drm_crtc.h`, `drm/drm_encoder.h`, `drm/drm_fixed.h`, `drm/drm_framebuffer.h`, `drm/drm_probe_helper.h`, `linux/i2c.h`, `linux/i2c-algo-bit.h`.
- Detected declarations: `struct amdgpu_bo`, `struct amdgpu_device`, `struct amdgpu_encoder`, `struct amdgpu_router`, `struct amdgpu_hpd`, `struct edid`, `struct drm_edid`, `struct amdgpu_i2c_bus_rec`, `struct amdgpu_pll`, `struct amdgpu_i2c_chan`.
- 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.