drivers/gpu/drm/gma500/psb_intel_sdvo.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/gma500/psb_intel_sdvo.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/gma500/psb_intel_sdvo.c
Extension
.c
Size
80383 bytes
Lines
2528
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct psb_intel_sdvo {
	struct gma_encoder base;

	struct i2c_adapter *i2c;
	u8 target_addr;

	struct i2c_adapter ddc;

	/* Register for the SDVO device: SDVOB or SDVOC */
	int sdvo_reg;

	/* Active outputs controlled by this SDVO output */
	uint16_t controlled_output;

	/*
	 * Capabilities of the SDVO device returned by
	 * i830_sdvo_get_capabilities()
	 */
	struct psb_intel_sdvo_caps caps;

	/* Pixel clock limitations reported by the SDVO device, in kHz */
	int pixel_clock_min, pixel_clock_max;

	/*
	* For multiple function SDVO device,
	* this is for current attached outputs.
	*/
	uint16_t attached_output;

	/**
	 * This is used to select the color range of RBG outputs in HDMI mode.
	 * It is only valid when using TMDS encoding and 8 bit per color mode.
	 */
	uint32_t color_range;

	/**
	 * This is set if we're going to treat the device as TV-out.
	 *
	 * While we have these nice friendly flags for output types that ought
	 * to decide this for us, the S-Video output on our HDMI+S-Video card
	 * shows up as RGB1 (VGA).
	 */
	bool is_tv;

	/* This is for current tv format name */
	int tv_format_index;

	/**
	 * This is set if we treat the device as HDMI, instead of DVI.
	 */
	bool is_hdmi;
	bool has_hdmi_monitor;
	bool has_hdmi_audio;

	/**
	 * This is set if we detect output of sdvo device as LVDS and
	 * have a valid fixed mode to use with the panel.
	 */
	bool is_lvds;

	/**
	 * This is sdvo fixed panel mode pointer
	 */
	struct drm_display_mode *sdvo_lvds_fixed_mode;

	/* DDC bus used by this SDVO encoder */
	uint8_t ddc_bus;

	u8 pixel_multiplier;

	/* Input timings for adjusted_mode */
	struct psb_intel_sdvo_dtd input_dtd;

	/* Saved SDVO output states */
	uint32_t saveSDVO; /* Can be SDVOB or SDVOC depending on sdvo_reg */
};

struct psb_intel_sdvo_connector {
	struct gma_connector base;

	/* Mark the type of connector */
	uint16_t output_flag;

	int force_audio;

	/* This contains all current supported TV format */
	u8 tv_format_supported[ARRAY_SIZE(tv_format_names)];
	int   format_supported_num;
	struct drm_property *tv_format;

Annotation

Implementation Notes