/Linux-v5.10/drivers/gpu/drm/mediatek/ |
D | mtk_hdmi_ddc.c | 62 static inline void sif_set_bit(struct mtk_hdmi_ddc *ddc, unsigned int offset, in sif_set_bit() argument 65 writel(readl(ddc->regs + offset) | val, ddc->regs + offset); in sif_set_bit() 68 static inline void sif_clr_bit(struct mtk_hdmi_ddc *ddc, unsigned int offset, in sif_clr_bit() argument 71 writel(readl(ddc->regs + offset) & ~val, ddc->regs + offset); in sif_clr_bit() 74 static inline bool sif_bit_is_set(struct mtk_hdmi_ddc *ddc, unsigned int offset, in sif_bit_is_set() argument 77 return (readl(ddc->regs + offset) & val) == val; in sif_bit_is_set() 80 static inline void sif_write_mask(struct mtk_hdmi_ddc *ddc, unsigned int offset, in sif_write_mask() argument 86 tmp = readl(ddc->regs + offset); in sif_write_mask() 89 writel(tmp, ddc->regs + offset); in sif_write_mask() 92 static inline unsigned int sif_read_mask(struct mtk_hdmi_ddc *ddc, in sif_read_mask() argument [all …]
|
/Linux-v5.10/drivers/gpu/drm/amd/display/dc/gpio/ |
D | gpio_service.c | 468 struct ddc *dal_gpio_create_ddc( in dal_gpio_create_ddc() 476 struct ddc *ddc; in dal_gpio_create_ddc() local 481 ddc = kzalloc(sizeof(struct ddc), GFP_KERNEL); in dal_gpio_create_ddc() 483 if (!ddc) { in dal_gpio_create_ddc() 488 ddc->pin_data = dal_gpio_create( in dal_gpio_create_ddc() 491 if (!ddc->pin_data) { in dal_gpio_create_ddc() 496 ddc->pin_clock = dal_gpio_create( in dal_gpio_create_ddc() 499 if (!ddc->pin_clock) { in dal_gpio_create_ddc() 504 ddc->hw_info = *info; in dal_gpio_create_ddc() 506 ddc->ctx = service->ctx; in dal_gpio_create_ddc() [all …]
|
D | hw_ddc.c | 42 ddc->shifts->field_name, ddc->masks->field_name 45 ddc->base.base.ctx 47 (ddc->regs->reg) 73 struct hw_ddc *ddc = HW_DDC_FROM_BASE(ptr); in set_config() local 80 hw_gpio = &ddc->base; in set_config() 92 switch (config_data->config.ddc.type) { in set_config() 140 if (config_data->config.ddc.data_en_bit_present || in set_config() 141 config_data->config.ddc.clock_en_bit_present) in set_config() 153 if (ddc->regs->dc_gpio_aux_ctrl_5 != 0) { in set_config() 157 if (ddc->regs->phy_aux_cntl != 0) { in set_config() [all …]
|
/Linux-v5.10/drivers/gpu/drm/sun4i/ |
D | sun4i_hdmi_ddc_clk.c | 65 struct sun4i_ddc *ddc = hw_to_ddc(hw); in sun4i_ddc_round_rate() local 67 return sun4i_ddc_calc_divider(rate, *prate, ddc->pre_div, in sun4i_ddc_round_rate() 68 ddc->m_offset, NULL, NULL); in sun4i_ddc_round_rate() 74 struct sun4i_ddc *ddc = hw_to_ddc(hw); in sun4i_ddc_recalc_rate() local 78 regmap_field_read(ddc->reg, ®); in sun4i_ddc_recalc_rate() 82 return (((parent_rate / ddc->pre_div) / 10) >> n) / in sun4i_ddc_recalc_rate() 83 (m + ddc->m_offset); in sun4i_ddc_recalc_rate() 89 struct sun4i_ddc *ddc = hw_to_ddc(hw); in sun4i_ddc_set_rate() local 92 sun4i_ddc_calc_divider(rate, parent_rate, ddc->pre_div, in sun4i_ddc_set_rate() 93 ddc->m_offset, &div_m, &div_n); in sun4i_ddc_set_rate() [all …]
|
/Linux-v5.10/drivers/gpu/drm/amd/display/dc/core/ |
D | dc_link_ddc.c | 230 static void ddc_service_destruct(struct ddc_service *ddc) in ddc_service_destruct() argument 232 if (ddc->ddc_pin) in ddc_service_destruct() 233 dal_gpio_destroy_ddc(&ddc->ddc_pin); in ddc_service_destruct() 236 void dal_ddc_service_destroy(struct ddc_service **ddc) in dal_ddc_service_destroy() argument 238 if (!ddc || !*ddc) { in dal_ddc_service_destroy() 242 ddc_service_destruct(*ddc); in dal_ddc_service_destroy() 243 kfree(*ddc); in dal_ddc_service_destroy() 244 *ddc = NULL; in dal_ddc_service_destroy() 247 enum ddc_service_type dal_ddc_service_get_type(struct ddc_service *ddc) in dal_ddc_service_get_type() argument 253 struct ddc_service *ddc, in dal_ddc_service_set_transaction_type() argument [all …]
|
/Linux-v5.10/drivers/gpu/drm/amd/display/dc/dce/ |
D | dce_i2c_sw.c | 42 struct ddc *ddc, in read_bit_from_ddc() argument 48 dal_gpio_get_value(ddc->pin_data, &value); in read_bit_from_ddc() 50 dal_gpio_get_value(ddc->pin_clock, &value); in read_bit_from_ddc() 56 struct ddc *ddc, in write_bit_to_ddc() argument 63 dal_gpio_set_value(ddc->pin_data, value); in write_bit_to_ddc() 65 dal_gpio_set_value(ddc->pin_clock, value); in write_bit_to_ddc() 72 dal_ddc_close(dce_i2c_sw->ddc); in release_engine_dce_sw() 73 dce_i2c_sw->ddc = NULL; in release_engine_dce_sw() 78 struct ddc *ddc, in wait_for_scl_high_sw() argument 87 if (read_bit_from_ddc(ddc, SCL)) in wait_for_scl_high_sw() [all …]
|
D | dce_i2c.c | 30 struct ddc *ddc, in dce_i2c_submit_command() argument 36 if (!ddc) { in dce_i2c_submit_command() 46 dce_i2c_hw = acquire_i2c_hw_engine(pool, ddc); in dce_i2c_submit_command() 49 return dce_i2c_submit_command_hw(pool, ddc, cmd, dce_i2c_hw); in dce_i2c_submit_command() 51 dce_i2c_sw.ctx = ddc->ctx; in dce_i2c_submit_command() 52 if (dce_i2c_engine_acquire_sw(&dce_i2c_sw, ddc)) { in dce_i2c_submit_command() 53 return dce_i2c_submit_command_sw(pool, ddc, cmd, &dce_i2c_sw); in dce_i2c_submit_command()
|
D | dce_aux.c | 77 dal_ddc_close(engine->ddc); in release_engine() 79 engine->ddc = NULL; in release_engine() 270 EVENT_LOG_AUX_REQ(engine->ddc->pin_data->en, EVENT_LOG_AUX_ORIGIN_NATIVE, in submit_channel_request() 399 struct ddc *ddc) in acquire() argument 406 result = dal_ddc_open(ddc, GPIO_MODE_HARDWARE, in acquire() 413 dal_ddc_close(ddc); in acquire() 417 engine->ddc = ddc; in acquire() 432 static uint32_t dce_aux_configure_timeout(struct ddc_service *ddc, in dce_aux_configure_timeout() argument 440 struct ddc *ddc_pin = ddc->ddc_pin; in dce_aux_configure_timeout() 441 struct dce_aux *aux_engine = ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en]; in dce_aux_configure_timeout() [all …]
|
D | dce_i2c_sw.h | 36 struct ddc *ddc; member 48 struct ddc *ddc, 54 struct ddc *ddc_handle);
|
/Linux-v5.10/drivers/gpu/drm/amd/display/dc/inc/ |
D | dc_link_ddc.h | 76 void dal_ddc_service_destroy(struct ddc_service **ddc); 78 enum ddc_service_type dal_ddc_service_get_type(struct ddc_service *ddc); 81 struct ddc_service *ddc, 84 bool dal_ddc_service_is_in_aux_transaction_mode(struct ddc_service *ddc); 87 struct ddc_service *ddc, 91 struct ddc_service *ddc, 98 bool dal_ddc_submit_aux_command(struct ddc_service *ddc, 101 int dc_link_aux_transfer_raw(struct ddc_service *ddc, 105 bool dc_link_aux_transfer_with_retries(struct ddc_service *ddc, 108 bool dc_link_aux_try_to_configure_timeout(struct ddc_service *ddc, [all …]
|
/Linux-v5.10/drivers/gpu/drm/amd/display/include/ |
D | gpio_service_interface.h | 71 struct ddc *dal_gpio_create_ddc( 78 struct ddc **ddc); 103 struct ddc *ddc, 108 struct ddc *ddc, 112 const struct ddc *ddc); 115 struct ddc *ddc, 119 struct ddc *ddc);
|
/Linux-v5.10/drivers/gpu/drm/bridge/ |
D | display-connector.c | 49 if (conn->bridge.ddc && drm_probe_ddc(conn->bridge.ddc)) in display_connector_detect() 59 * For DVI and HDMI connectors a DDC probe failure indicates in display_connector_detect() 72 * if drm_probe_ddc fails, as some cables don't wire the DDC in display_connector_detect() 84 return drm_get_edid(connector, conn->bridge.ddc); in display_connector_get_edid() 208 /* Retrieve the DDC I2C adapter for DVI, HDMI and VGA connectors. */ in display_connector_probe() 214 phandle = of_parse_phandle(pdev->dev.of_node, "ddc-i2c-bus", 0); in display_connector_probe() 216 conn->bridge.ddc = of_get_i2c_adapter_by_node(phandle); in display_connector_probe() 218 if (!conn->bridge.ddc) in display_connector_probe() 229 if (conn->bridge.ddc) in display_connector_probe() 238 "Found %s display connector '%s' %s DDC bus and %s HPD GPIO (ops 0x%x)\n", in display_connector_probe() [all …]
|
/Linux-v5.10/drivers/gpu/drm/tegra/ |
D | output.c | 35 else if (output->ddc) in tegra_output_connector_get_modes() 36 edid = drm_get_edid(connector, output->ddc); in tegra_output_connector_get_modes() 96 struct device_node *ddc, *panel; in tegra_output_probe() local 125 ddc = of_parse_phandle(output->of_node, "nvidia,ddc-i2c-bus", 0); in tegra_output_probe() 126 if (ddc) { in tegra_output_probe() 127 output->ddc = of_get_i2c_adapter_by_node(ddc); in tegra_output_probe() 128 of_node_put(ddc); in tegra_output_probe() 130 if (!output->ddc) { in tegra_output_probe() 186 if (output->ddc) in tegra_output_remove() 187 i2c_put_adapter(output->ddc); in tegra_output_remove()
|
/Linux-v5.10/drivers/gpu/drm/zte/ |
D | zx_vga.c | 37 struct zx_vga_i2c *ddc; member 88 edid = drm_get_edid(connector, &vga->ddc->adap); in zx_vga_connector_get_modes() 167 &vga->ddc->adap); in zx_vga_register() 269 * The DDC I2C adapter is only for reading EDID data, so we assume in zx_vga_i2c_write() 285 struct zx_vga_i2c *ddc = vga->ddc; in zx_vga_i2c_xfer() local 289 mutex_lock(&ddc->lock); in zx_vga_i2c_xfer() 304 mutex_unlock(&ddc->lock); in zx_vga_i2c_xfer() 323 struct zx_vga_i2c *ddc; in zx_vga_ddc_register() local 326 ddc = devm_kzalloc(dev, sizeof(*ddc), GFP_KERNEL); in zx_vga_ddc_register() 327 if (!ddc) in zx_vga_ddc_register() [all …]
|
D | zx_hdmi.c | 41 struct zx_hdmi_i2c *ddc; member 264 edid = drm_get_edid(connector, &hdmi->ddc->adap); in zx_hdmi_connector_get_modes() 321 &hdmi->ddc->adap); in zx_hdmi_register() 526 "DDC FIFO read timed out!"); in zx_hdmi_i2c_read() 543 * The DDC I2C adapter is only for reading EDID data, so we assume in zx_hdmi_i2c_write() 564 struct zx_hdmi_i2c *ddc = hdmi->ddc; in zx_hdmi_i2c_xfer() local 567 mutex_lock(&ddc->lock); in zx_hdmi_i2c_xfer() 569 /* Enable DDC master access */ in zx_hdmi_i2c_xfer() 589 /* Disable DDC master access */ in zx_hdmi_i2c_xfer() 592 mutex_unlock(&ddc->lock); in zx_hdmi_i2c_xfer() [all …]
|
/Linux-v5.10/Documentation/devicetree/bindings/display/ |
D | allwinner,sun4i-a10-hdmi.yaml | 44 - description: The HDMI DDC clock 59 - const: ddc 68 - description: DDC Transmission DMA Channel 69 - description: DDC Reception DMA Channel 74 - const: ddc-tx 75 - const: ddc-rx 155 dma-names = "ddc-tx", "ddc-rx", "audio-tx";
|
/Linux-v5.10/Documentation/devicetree/bindings/display/mediatek/ |
D | mediatek,hdmi.txt | 26 port of a connector node that contains a ddc-i2c-bus property, or to the 41 HDMI DDC 44 The HDMI DDC i2c controller is used to interface with the HDMI DDC pins. 48 - compatible: Should be "mediatek,<chip>-hdmi-ddc" 52 - clock-names: Should be "ddc-i2c". 96 compatible = "mediatek,mt8173-hdmi-ddc"; 100 clock-names = "ddc-i2c"; 145 ddc-i2c-bus = <&hdmiddc0>;
|
/Linux-v5.10/drivers/gpu/drm/radeon/ |
D | radeon_connectors.c | 312 &radeon_connector->ddc_bus->aux.ddc); in radeon_connector_get_edid() 321 &radeon_connector->ddc_bus->aux.ddc); in radeon_connector_get_edid() 336 /* don't fetch the edid from the vbios if ddc fails and runpm is in radeon_connector_get_edid() 895 /* don't fetch the edid from the vbios if ddc fails and runpm is in radeon_lvds_detect() 1056 * with a shared ddc line (often vga + hdmi) in radeon_vga_detect() 1233 * Do a DDC probe, if DDC probe passes, get the full EDID so 1235 * If the monitor is an analog monitor or we got no DDC, 1237 * If we got no DDC, we do load detection on the DAC encoder object. 1238 * If we got analog DDC or load detection passes on the DAC encoder 1275 /* Sometimes the pins required for the DDC probe on DVI in radeon_dvi_detect() [all …]
|
/Linux-v5.10/drivers/gpu/drm/amd/display/dc/gpio/dce60/ |
D | hw_factory_dce60.c | 120 struct hw_ddc *ddc = HW_DDC_FROM_BASE(pin); in define_ddc_registers() local 124 ddc->regs = &ddc_data_regs[en]; in define_ddc_registers() 125 ddc->base.regs = &ddc_data_regs[en].gpio; in define_ddc_registers() 128 ddc->regs = &ddc_clk_regs[en]; in define_ddc_registers() 129 ddc->base.regs = &ddc_clk_regs[en].gpio; in define_ddc_registers() 136 ddc->shifts = &ddc_shift; in define_ddc_registers() 137 ddc->masks = &ddc_mask; in define_ddc_registers()
|
/Linux-v5.10/drivers/gpu/drm/amd/display/dc/gpio/dce80/ |
D | hw_factory_dce80.c | 120 struct hw_ddc *ddc = HW_DDC_FROM_BASE(pin); in define_ddc_registers() local 124 ddc->regs = &ddc_data_regs[en]; in define_ddc_registers() 125 ddc->base.regs = &ddc_data_regs[en].gpio; in define_ddc_registers() 128 ddc->regs = &ddc_clk_regs[en]; in define_ddc_registers() 129 ddc->base.regs = &ddc_clk_regs[en].gpio; in define_ddc_registers() 136 ddc->shifts = &ddc_shift; in define_ddc_registers() 137 ddc->masks = &ddc_mask; in define_ddc_registers()
|
/Linux-v5.10/drivers/gpu/drm/amd/display/dc/gpio/dce110/ |
D | hw_factory_dce110.c | 120 struct hw_ddc *ddc = HW_DDC_FROM_BASE(pin); in define_ddc_registers() local 124 ddc->regs = &ddc_data_regs[en]; in define_ddc_registers() 125 ddc->base.regs = &ddc_data_regs[en].gpio; in define_ddc_registers() 128 ddc->regs = &ddc_clk_regs[en]; in define_ddc_registers() 129 ddc->base.regs = &ddc_clk_regs[en].gpio; in define_ddc_registers() 136 ddc->shifts = &ddc_shift; in define_ddc_registers() 137 ddc->masks = &ddc_mask; in define_ddc_registers()
|
/Linux-v5.10/drivers/gpu/drm/amd/display/dc/gpio/dce120/ |
D | hw_factory_dce120.c | 133 struct hw_ddc *ddc = HW_DDC_FROM_BASE(pin); in define_ddc_registers() local 137 ddc->regs = &ddc_data_regs[en]; in define_ddc_registers() 138 ddc->base.regs = &ddc_data_regs[en].gpio; in define_ddc_registers() 141 ddc->regs = &ddc_clk_regs[en]; in define_ddc_registers() 142 ddc->base.regs = &ddc_clk_regs[en].gpio; in define_ddc_registers() 149 ddc->shifts = &ddc_shift; in define_ddc_registers() 150 ddc->masks = &ddc_mask; in define_ddc_registers()
|
/Linux-v5.10/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_connectors.c | 297 &amdgpu_connector->ddc_bus->aux.ddc); in amdgpu_connector_get_edid() 306 &amdgpu_connector->ddc_bus->aux.ddc); in amdgpu_connector_get_edid() 886 * with a shared ddc line (often vga + hdmi) in amdgpu_connector_vga_detect() 963 * Do a DDC probe, if DDC probe passes, get the full EDID so 965 * If the monitor is an analog monitor or we got no DDC, 967 * If we got no DDC, we do load detection on the DAC encoder object. 968 * If we got analog DDC or load detection passes on the DAC encoder 1013 * with a shared ddc line (often vga + hdmi) in amdgpu_connector_dvi_detect() 1023 * shared DDC line and we have boards with DVI-D + HDMI with a shared in amdgpu_connector_dvi_detect() 1024 * DDC line. The latter is more complex because with DVI<->HDMI adapters in amdgpu_connector_dvi_detect() [all …]
|
/Linux-v5.10/Documentation/devicetree/bindings/display/connector/ |
D | hdmi-connector.yaml | 31 ddc-i2c-bus: 32 description: phandle link to the I2C controller used for DDC EDID probing 35 ddc-en-gpios: 36 description: GPIO signal to enable DDC bus
|
/Linux-v5.10/drivers/video/fbdev/matrox/ |
D | i2c-matroxfb.c | 23 /* primary head DDC for Mystique(?), G100, G200, G400 */ 26 /* primary head DDC for Millennium, Millennium II */ 29 /* secondary head DDC for G400 */ 163 "DDC:fb%u #0", I2C_CLASS_DDC); in i2c_matroxfb_probe() 168 "DDC:fb%u #0", I2C_CLASS_DDC); in i2c_matroxfb_probe() 176 "DDC:fb%u #1", I2C_CLASS_DDC); in i2c_matroxfb_probe() 178 printk(KERN_INFO "i2c-matroxfb: VGA->TV plug detected, DDC unavailable.\n"); in i2c_matroxfb_probe() 201 printk(KERN_ERR "i2c-matroxfb: Could not register primary adapter DDC bus.\n"); in i2c_matroxfb_probe()
|