drivers/gpu/drm/amd/display/modules/inc/mod_freesync.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/modules/inc/mod_freesync.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/modules/inc/mod_freesync.h- Extension
.h- Size
- 4394 bytes
- Lines
- 150
- 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
mod_shared.h
Detected Declarations
struct mod_freesyncstruct mod_freesync_capsstruct mod_freesync_configstruct mod_vrr_params_btrstruct mod_vrr_params_fixed_refreshstruct mod_vrr_params_flip_intervalstruct mod_vrr_paramsenum mod_vrr_state
Annotated Snippet
struct mod_freesync {
int dummy;
};
// TODO: References to this should be removed
struct mod_freesync_caps {
bool supported;
unsigned int min_refresh_in_micro_hz;
unsigned int max_refresh_in_micro_hz;
};
enum mod_vrr_state {
VRR_STATE_UNSUPPORTED = 0,
VRR_STATE_DISABLED,
VRR_STATE_INACTIVE,
VRR_STATE_ACTIVE_VARIABLE,
VRR_STATE_ACTIVE_FIXED
};
struct mod_freesync_config {
enum mod_vrr_state state;
bool vsif_supported;
bool ramping;
bool btr;
unsigned int min_refresh_in_uhz;
unsigned int max_refresh_in_uhz;
unsigned int fixed_refresh_in_uhz;
};
struct mod_vrr_params_btr {
bool btr_enabled;
bool btr_active;
uint32_t mid_point_in_us;
uint32_t inserted_duration_in_us;
uint32_t frames_to_insert;
uint32_t frame_counter;
uint32_t margin_in_us;
};
struct mod_vrr_params_fixed_refresh {
bool fixed_active;
bool ramping_active;
bool ramping_done;
uint32_t target_refresh_in_uhz;
uint32_t frame_counter;
};
struct mod_vrr_params_flip_interval {
bool flip_interval_workaround_active;
bool program_flip_interval_workaround;
bool do_flip_interval_workaround_cleanup;
uint32_t flip_interval_detect_counter;
uint32_t vsyncs_between_flip;
uint32_t vsync_to_flip_in_us;
uint32_t v_update_timestamp_in_us;
};
struct mod_vrr_params {
bool supported;
bool send_info_frame;
bool m_const_engaged; // this is used when m_const is set up in OPTC so no overriding happens from FreeSync Module
enum mod_vrr_state state;
uint32_t min_refresh_in_uhz;
uint32_t max_duration_in_us;
uint32_t max_refresh_in_uhz;
uint32_t min_duration_in_us;
uint32_t fixed_refresh_in_uhz;
uint32_t m_const;
struct dc_crtc_timing_adjust adjust;
struct mod_vrr_params_fixed_refresh fixed;
struct mod_vrr_params_btr btr;
struct mod_vrr_params_flip_interval flip_interval;
};
struct mod_freesync *mod_freesync_create(struct dc *dc);
void mod_freesync_destroy(struct mod_freesync *mod_freesync);
void mod_freesync_build_vrr_infopacket(struct mod_freesync *mod_freesync,
const struct dc_stream_state *stream,
const struct mod_vrr_params *vrr,
enum vrr_packet_type packet_type,
enum color_transfer_func app_tf,
struct dc_info_packet *infopacket,
Annotation
- Immediate include surface: `mod_shared.h`.
- Detected declarations: `struct mod_freesync`, `struct mod_freesync_caps`, `struct mod_freesync_config`, `struct mod_vrr_params_btr`, `struct mod_vrr_params_fixed_refresh`, `struct mod_vrr_params_flip_interval`, `struct mod_vrr_params`, `enum mod_vrr_state`.
- 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.