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.

Dependency Surface

Detected Declarations

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

Implementation Notes