drivers/gpu/drm/bridge/ite-it6505.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/bridge/ite-it6505.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/bridge/ite-it6505.c- Extension
.c- Size
- 96679 bytes
- Lines
- 3684
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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
linux/bits.hlinux/debugfs.hlinux/delay.hlinux/device.hlinux/err.hlinux/extcon.hlinux/fs.hlinux/gpio/consumer.hlinux/i2c.hlinux/interrupt.hlinux/kernel.hlinux/module.hlinux/pm_runtime.hlinux/regmap.hlinux/regulator/consumer.hlinux/types.hlinux/wait.hlinux/bitfield.hcrypto/sha1.hdrm/display/drm_dp_helper.hdrm/display/drm_hdcp_helper.hdrm/drm_atomic_helper.hdrm/drm_bridge.hdrm/drm_crtc.hdrm/drm_edid.hdrm/drm_print.hdrm/drm_probe_helper.hsound/hdmi-codec.h
Detected Declarations
struct it6505_platform_datastruct it6505_audio_datastruct it6505_audio_sample_rate_mapstruct it6505_drm_dp_linkstruct debugfs_entriesstruct it6505struct it6505_step_train_paraenum aux_cmd_typeenum aux_cmd_replyenum link_train_statusenum hdcp_stateenum it6505_audio_selectenum it6505_audio_sample_rateenum it6505_audio_typefunction it6505_readfunction it6505_writefunction it6505_set_bitsfunction it6505_debug_printfunction it6505_dpcd_readfunction it6505_dpcd_writefunction it6505_get_dpcdfunction it6505_dumpfunction it6505_get_sink_hpd_statusfunction it6505_read_wordfunction it6505_calc_video_infofunction it6505_clear_intfunction it6505_int_mask_enablefunction it6505_int_mask_disablefunction it6505_lane_termination_onfunction it6505_lane_termination_offfunction it6505_lane_power_onfunction it6505_lane_power_offfunction it6505_lane_offfunction it6505_aux_termination_onfunction it6505_aux_power_onfunction it6505_aux_onfunction it6505_aux_resetfunction it6505_reset_logicfunction it6505_aux_op_finishedfunction it6505_aux_waitfunction it6505_aux_operationfunction it6505_aux_do_transferfunction it6505_aux_i2c_reply_deferfunction it6505_aux_i2c_reply_nackfunction it6505_aux_i2c_waitfunction it6505_aux_i2c_readbfunction it6505_aux_i2c_writebfunction it6505_aux_i2c_operation
Annotated Snippet
const struct file_operations *fops;
};
struct it6505 {
struct drm_dp_aux aux;
struct drm_bridge bridge;
struct device *dev;
struct it6505_drm_dp_link link;
struct it6505_platform_data pdata;
/*
* Mutex protects extcon and interrupt functions from interfering
* each other.
*/
struct mutex extcon_lock;
struct mutex mode_lock; /* used to bridge_detect */
struct mutex aux_lock; /* used to aux data transfers */
struct regmap *regmap;
struct drm_display_mode source_output_mode;
struct drm_display_mode video_info;
struct notifier_block event_nb;
struct extcon_dev *extcon;
struct work_struct extcon_wq;
int extcon_state;
enum drm_connector_status connector_status;
enum link_train_status link_state;
struct work_struct link_works;
u8 dpcd[DP_RECEIVER_CAP_SIZE];
u8 lane_count;
u8 link_rate_bw_code;
u8 sink_count;
bool step_train;
bool branch_device;
bool enable_ssc;
bool lane_swap_disabled;
bool lane_swap;
bool powered;
bool hpd_state;
u32 afe_setting;
u32 max_dpi_pixel_clock;
u32 max_lane_count;
enum hdcp_state hdcp_status;
struct delayed_work hdcp_work;
struct work_struct hdcp_wait_ksv_list;
struct completion extcon_completion;
u8 auto_train_retry;
bool hdcp_desired;
bool is_repeater;
u8 hdcp_down_stream_count;
u8 bksvs[DRM_HDCP_KSV_LEN];
u8 sha1_input[HDCP_SHA1_FIFO_LEN];
bool enable_enhanced_frame;
hdmi_codec_plugged_cb plugged_cb;
struct device *codec_dev;
struct delayed_work delayed_audio;
struct it6505_audio_data audio;
struct dentry *debugfs;
/* it6505 driver hold option */
bool enable_drv_hold;
const struct drm_edid *cached_edid;
int irq;
};
struct it6505_step_train_para {
u8 voltage_swing[MAX_LANE_COUNT];
u8 pre_emphasis[MAX_LANE_COUNT];
};
/*
* Vendor option afe settings for different platforms
* 0: without FPC cable
* 1: with FPC cable
*/
static const u8 afe_setting_table[][3] = {
{0x82, 0x00, 0x45},
{0x93, 0x2A, 0x85}
};
static const struct it6505_audio_sample_rate_map audio_sample_rate_map[] = {
{SAMPLE_RATE_24K, 24000},
{SAMPLE_RATE_32K, 32000},
{SAMPLE_RATE_48K, 48000},
{SAMPLE_RATE_96K, 96000},
{SAMPLE_RATE_192K, 192000},
{SAMPLE_RATE_44_1K, 44100},
{SAMPLE_RATE_88_2K, 88200},
{SAMPLE_RATE_176_4K, 176400},
Annotation
- Immediate include surface: `linux/bits.h`, `linux/debugfs.h`, `linux/delay.h`, `linux/device.h`, `linux/err.h`, `linux/extcon.h`, `linux/fs.h`, `linux/gpio/consumer.h`.
- Detected declarations: `struct it6505_platform_data`, `struct it6505_audio_data`, `struct it6505_audio_sample_rate_map`, `struct it6505_drm_dp_link`, `struct debugfs_entries`, `struct it6505`, `struct it6505_step_train_para`, `enum aux_cmd_type`, `enum aux_cmd_reply`, `enum link_train_status`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- 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.