/linux/drivers/gpu/drm/display/ |
H A D | drm_hdmi_state_helper.c | 1 // SPDX-License-Identifier: MIT 13 * __drm_atomic_helper_connector_hdmi_reset() - Initializes all HDMI @drm_connector_state resources 14 * @connector: DRM connector 15 * @new_conn_state: connector state to reset 17 * Initializes all HDMI resources from a @drm_connector_state without 18 * actually allocating it. This is useful for HDMI drivers, in 22 void __drm_atomic_helper_connector_hdmi_reset(struct drm_connector *connector, in __drm_atomic_helper_connector_hdmi_reset() argument 25 unsigned int max_bpc = connector->max_bpc; in __drm_atomic_helper_connector_hdmi_reset() 27 new_conn_state->max_bpc = max_bpc; in __drm_atomic_helper_connector_hdmi_reset() 28 new_conn_state->max_requested_bpc = max_bpc; in __drm_atomic_helper_connector_hdmi_reset() [all …]
|
H A D | drm_hdmi_audio_helper.c | 1 // SPDX-License-Identifier: MIT 14 #include <sound/hdmi-codec.h> 18 struct drm_connector *connector = data; in drm_connector_hdmi_audio_startup() local 20 connector->hdmi_audio.funcs; in drm_connector_hdmi_audio_startup() 22 if (funcs->startup) in drm_connector_hdmi_audio_startup() 23 return funcs->startup(connector); in drm_connector_hdmi_audio_startup() 32 struct drm_connector *connector = data; in drm_connector_hdmi_audio_prepare() local 34 connector->hdmi_audio.funcs; in drm_connector_hdmi_audio_prepare() 36 return funcs->prepare(connector, fmt, hparms); in drm_connector_hdmi_audio_prepare() 41 struct drm_connector *connector = data; in drm_connector_hdmi_audio_shutdown() local [all …]
|
H A D | drm_hdmi_helper.c | 1 // SPDX-License-Identifier: MIT 18 * drm_hdmi_infoframe_set_hdr_metadata() - fill an HDMI DRM infoframe with 20 * @frame: HDMI DRM infoframe 21 * @conn_state: Connector state containing HDR metadata 28 struct drm_connector *connector; in drm_hdmi_infoframe_set_hdr_metadata() local 33 return -EINVAL; in drm_hdmi_infoframe_set_hdr_metadata() 35 connector = conn_state->connector; in drm_hdmi_infoframe_set_hdr_metadata() 37 if (!conn_state->hdr_output_metadata) in drm_hdmi_infoframe_set_hdr_metadata() 38 return -EINVAL; in drm_hdmi_infoframe_set_hdr_metadata() 40 hdr_metadata = conn_state->hdr_output_metadata->data; in drm_hdmi_infoframe_set_hdr_metadata() [all …]
|
/linux/drivers/gpu/drm/rockchip/ |
H A D | inno_hdmi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Zheng Yang <zhengyang@rock-chips.com> 5 * Yakir Yang <ykk@rock-chips.com> 12 #include <linux/hdmi.h> 62 struct drm_connector connector; member 83 static struct inno_hdmi *connector_to_inno_hdmi(struct drm_connector *connector) in connector_to_inno_hdmi() argument 85 return container_of(connector, struct inno_hdmi, connector); in connector_to_inno_hdmi() 100 * Cb = -0.291G - 0.148R + 0.439B + 128 102 * Cr = -0.368G + 0.439R - 0.071B + 128 111 * Cb = - 0.338G - 0.101R + 0.439B + 128 [all …]
|
H A D | rk3066_hdmi.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Zheng Yang <zhengyang@rock-chips.com> 49 struct drm_connector connector; member 67 static struct rk3066_hdmi *connector_to_rk3066_hdmi(struct drm_connector *connector) in connector_to_rk3066_hdmi() argument 69 return container_of(connector, struct rk3066_hdmi, connector); in connector_to_rk3066_hdmi() 72 static inline u8 hdmi_readb(struct rk3066_hdmi *hdmi, u16 offset) in hdmi_readb() argument 74 return readl_relaxed(hdmi->regs + offset); in hdmi_readb() 77 static inline void hdmi_writeb(struct rk3066_hdmi *hdmi, u16 offset, u32 val) in hdmi_writeb() argument 79 writel_relaxed(val, hdmi->regs + offset); in hdmi_writeb() 82 static inline void hdmi_modb(struct rk3066_hdmi *hdmi, u16 offset, in hdmi_modb() argument [all …]
|
H A D | dw_hdmi_qp-rockchip.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (c) 2021-2022 Rockchip Electronics Co., Ltd. 6 * Author: Algea Cao <algea.cao@rock-chips.com> 58 struct dw_hdmi_qp *hdmi; member 74 struct rockchip_hdmi_qp *hdmi = to_rockchip_hdmi_qp(encoder); in dw_hdmi_qp_rockchip_encoder_enable() local 75 struct drm_crtc *crtc = encoder->crtc; in dw_hdmi_qp_rockchip_encoder_enable() 79 gpiod_set_value(hdmi->enable_gpio, 1); in dw_hdmi_qp_rockchip_encoder_enable() 81 if (crtc && crtc->state) { in dw_hdmi_qp_rockchip_encoder_enable() 82 rate = drm_hdmi_compute_mode_clock(&crtc->state->adjusted_mode, in dw_hdmi_qp_rockchip_encoder_enable() 84 clk_set_rate(hdmi->ref_clk, rate); in dw_hdmi_qp_rockchip_encoder_enable() [all …]
|
/linux/drivers/gpu/drm/sun4i/ |
H A D | sun4i_hdmi_enc.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Maxime Ripard <maxime.ripard@free-electrons.com> 41 container_of_const(c, struct sun4i_hdmi, connector) 43 static int sun4i_hdmi_write_infoframe(struct drm_connector *connector, in sun4i_hdmi_write_infoframe() argument 47 struct sun4i_hdmi *hdmi = drm_connector_to_sun4i_hdmi(connector); in sun4i_hdmi_write_infoframe() local 51 drm_err(connector->dev, in sun4i_hdmi_write_infoframe() 57 writeb(buffer[i], hdmi->base + SUN4I_HDMI_AVI_INFOFRAME_REG(i)); in sun4i_hdmi_write_infoframe() 66 struct sun4i_hdmi *hdmi = drm_encoder_to_sun4i_hdmi(encoder); in sun4i_hdmi_disable() local 69 DRM_DEBUG_DRIVER("Disabling the HDMI Output\n"); in sun4i_hdmi_disable() 71 val = readl(hdmi->base + SUN4I_HDMI_VID_CTRL_REG); in sun4i_hdmi_disable() [all …]
|
/linux/drivers/gpu/drm/sti/ |
H A D | sti_hdmi.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #include <linux/hdmi.h> 26 #include <sound/hdmi-codec.h> 96 #define HDMI_IFRAME_CFG_DI_N(x, n) ((x) << ((n-1)*4)) /* n from 1 to 6 */ 164 struct sti_hdmi *hdmi; member 177 u32 hdmi_read(struct sti_hdmi *hdmi, int offset) in hdmi_read() argument 179 return readl(hdmi->regs + offset); in hdmi_read() 182 void hdmi_write(struct sti_hdmi *hdmi, u32 val, int offset) in hdmi_write() argument 184 writel(val, hdmi->regs + offset); in hdmi_write() 188 * HDMI interrupt handler threaded [all …]
|
/linux/drivers/gpu/drm/tests/ |
H A D | drm_hdmi_state_helper_test.c | 1 // SPDX-License-Identifier: GPL-2.0 34 struct drm_connector connector; member 41 container_of_const(c, struct drm_atomic_helper_connector_hdmi_priv, connector) 43 static struct drm_display_mode *find_preferred_mode(struct drm_connector *connector) in find_preferred_mode() argument 45 struct drm_device *drm = connector->dev; in find_preferred_mode() 48 mutex_lock(&drm->mode_config.mutex); in find_preferred_mode() 49 preferred = list_first_entry_or_null(&connector->modes, struct drm_display_mode, head); in find_preferred_mode() 50 list_for_each_entry(mode, &connector->modes, head) in find_preferred_mode() 51 if (mode->type & DRM_MODE_TYPE_PREFERRED) in find_preferred_mode() 53 mutex_unlock(&drm->mode_config.mutex); in find_preferred_mode() [all …]
|
/linux/include/drm/ |
H A D | drm_connector.h | 29 #include <linux/hdmi.h> 58 DRM_FORCE_ON_DIGITAL, /* for DVI-I use digital connector */ 62 * enum drm_connector_status - status for a &drm_connector 64 * This enum is used to track the connector status. There are no separate 69 * @connector_status_connected: The connector is definitely connected to 74 * @connector_status_disconnected: The connector isn't connected to a 76 * HDMI (which can be realiable probed) this means there's really 77 * nothing there. It is driver-dependent whether a connector with this 82 * @connector_status_unknown: The connector's status could not be 84 * flicker (like load-detection when the connector is in use), or when a [all …]
|
/linux/drivers/gpu/drm/loongson/ |
H A D | lsdc_output_7a2000.c | 1 // SPDX-License-Identifier: GPL-2.0+ 18 * Display pipe 0 is attached with a built-in transparent VGA encoder and 19 * a built-in HDMI encoder. 20 * Display pipe 1 has only one built-in HDMI encoder connected. 22 * | +-----+ | | | 23 * | CRTC0 -+--> | VGA | ----> VGA Connector ---> | VGA Monitor |<---+ 24 * | | +-----+ | |_____________| | 26 * | | +------+ | | | | 27 * | +--> | HDMI | ----> HDMI Connector --> | HDMI Monitor |<--+ 28 * | +------+ | |______________| | [all …]
|
/linux/Documentation/devicetree/bindings/display/connector/ |
H A D | hdmi-connector.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only 3 --- 4 $id: http://devicetree.org/schemas/display/connector/hdmi-connector.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: HDMI Connector 10 - Laurent Pinchart <Laurent.pinchart@ideasonboard.com> 14 const: hdmi-connector 17 description: The HDMI connector type 19 - a # Standard full size 20 - b # Never deployed? [all …]
|
/linux/drivers/gpu/drm/i915/display/ |
H A D | intel_hdmi.c | 3 * Copyright © 2006-2009 Intel Corporation 30 #include <linux/hdmi.h> 44 #include <media/cec-notifier.h> 76 drm_WARN(display->drm, in assert_hdmi_port_disabled() 77 intel_de_read(display, intel_hdmi->hdmi_reg) & enabled_bits, in assert_hdmi_port_disabled() 78 "HDMI port enabled, expecting disabled\n"); in assert_hdmi_port_disabled() 85 drm_WARN(display->drm, in assert_hdmi_transcoder_func_disabled() 88 "HDMI transcoder function enabled, expecting disabled\n"); in assert_hdmi_transcoder_func_disabled() 219 drm_WARN(display->drm, !(val & VIDEO_DIP_ENABLE), in g4x_write_infoframe() 270 if ((val & VIDEO_DIP_PORT_MASK) != VIDEO_DIP_PORT(encoder->port)) in g4x_infoframes_enabled() [all …]
|
/linux/drivers/gpu/drm/bridge/synopsys/ |
H A D | dw-hdmi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * DesignWare High-Definition Multimedia Interface (HDMI) driver 5 * Copyright (C) 2013-2015 Mentor Graphics Inc. 6 * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. 12 #include <linux/hdmi.h> 20 #include <linux/dma-mapping.h> 23 #include <media/cec-notifier.h> 25 #include <uapi/linux/media-bus-format.h> 39 #include "dw-hdmi-audio.h" 40 #include "dw-hdmi-cec.h" [all …]
|
H A D | dw-hdmi-qp.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (c) 2021-2022 Rockchip Electronics Co., Ltd. 6 * Author: Algea Cao <algea.cao@rock-chips.com> 10 #include <linux/hdmi.h> 28 #include <sound/hdmi-codec.h> 30 #include "dw-hdmi-qp.h" 65 static void dw_hdmi_qp_write(struct dw_hdmi_qp *hdmi, unsigned int val, in dw_hdmi_qp_write() argument 68 regmap_write(hdmi->regm, offset, val); in dw_hdmi_qp_write() 71 static unsigned int dw_hdmi_qp_read(struct dw_hdmi_qp *hdmi, int offset) in dw_hdmi_qp_read() argument 75 regmap_read(hdmi->regm, offset, &val); in dw_hdmi_qp_read() [all …]
|
/linux/drivers/gpu/drm/tegra/ |
H A D | hdmi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 #include <linux/hdmi.h> 21 #include <sound/hdmi-codec.h> 35 #include "hdmi.h" 68 struct regulator *hdmi; member 114 static inline u32 tegra_hdmi_readl(struct tegra_hdmi *hdmi, in tegra_hdmi_readl() argument 117 u32 value = readl(hdmi->regs + (offset << 2)); in tegra_hdmi_readl() 119 trace_hdmi_readl(hdmi->dev, offset, value); in tegra_hdmi_readl() 124 static inline void tegra_hdmi_writel(struct tegra_hdmi *hdmi, u32 value, in tegra_hdmi_writel() argument 127 trace_hdmi_writel(hdmi->dev, offset, value); in tegra_hdmi_writel() [all …]
|
/linux/drivers/gpu/drm/meson/ |
H A D | meson_encoder_hdmi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 19 #include <media/cec-notifier.h> 29 #include <linux/media-bus-format.h> 42 struct drm_connector *connector; member 56 return drm_bridge_attach(bridge->encoder, encoder_hdmi->next_bridge, in meson_encoder_hdmi_attach() 57 &encoder_hdmi->bridge, flags); in meson_encoder_hdmi_attach() 64 cec_notifier_conn_unregister(encoder_hdmi->cec_notifier); in meson_encoder_hdmi_detach() 65 encoder_hdmi->cec_notifier = NULL; in meson_encoder_hdmi_detach() 71 struct meson_drm *priv = encoder_hdmi->priv; in meson_encoder_hdmi_set_vclk() 78 vclk_freq = mode->clock; in meson_encoder_hdmi_set_vclk() [all …]
|
/linux/drivers/gpu/drm/msm/hdmi/ |
H A D | hdmi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 16 #include <sound/hdmi-codec.h> 17 #include "hdmi.h" 19 void msm_hdmi_set_mode(struct hdmi *hdmi, bool power_on) in msm_hdmi_set_mode() argument 24 spin_lock_irqsave(&hdmi->reg_lock, flags); in msm_hdmi_set_mode() 27 if (!hdmi->hdmi_mode) { in msm_hdmi_set_mode() 29 hdmi_write(hdmi, REG_HDMI_CTRL, ctrl); in msm_hdmi_set_mode() 38 hdmi_write(hdmi, REG_HDMI_CTRL, ctrl); in msm_hdmi_set_mode() 39 spin_unlock_irqrestore(&hdmi->reg_lock, flags); in msm_hdmi_set_mode() 40 DBG("HDMI Core: %s, HDMI_CTRL=0x%08x", in msm_hdmi_set_mode() [all …]
|
/linux/include/media/ |
H A D | cec-notifier.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * cec-notifier.h - notify CEC drivers of physical address changes 6 * Copyright 2016-2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved. 23 * cec_notifier_conn_register - find or create a new cec_notifier for the given 24 * HDMI device and connector tuple. 25 * @hdmi_dev: HDMI device that sends the events. 26 * @port_name: the connector name from which the event occurs. May be NULL 27 * if there is always only one HDMI connector created by the HDMI device. 28 * @conn_info: the connector info from which the event occurs (may be NULL) 30 * If a notifier for device @dev and connector @port_name already exists, then [all …]
|
/linux/Documentation/devicetree/bindings/display/ti/ |
H A D | ti,omap-dss.txt | 5 ------------------- 22 HDMI, MIPI DPI, etc. 25 ----------- 36 ------- 39 name for each display. If no aliases are defined, a semi-random number is used 43 ------- 45 A shortened example of the DSS description for OMAP4, with non-relevant parts 49 compatible = "ti,omap4-dss"; 54 clock-names = "fck"; 55 #address-cells = <1>; [all …]
|
/linux/drivers/gpu/drm/omapdrm/dss/ |
H A D | hdmi5.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * HDMI driver for OMAP5 5 * Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com/ 14 #define DSS_SUBSYS_NAME "HDMI" 31 #include <sound/omap-hdmi-audio.h> 41 static int hdmi_runtime_get(struct omap_hdmi *hdmi) in hdmi_runtime_get() argument 47 r = pm_runtime_get_sync(&hdmi->pdev->dev); in hdmi_runtime_get() 49 pm_runtime_put_noidle(&hdmi->pdev->dev); in hdmi_runtime_get() 55 static void hdmi_runtime_put(struct omap_hdmi *hdmi) in hdmi_runtime_put() argument 61 r = pm_runtime_put_sync(&hdmi->pdev->dev); in hdmi_runtime_put() [all …]
|
H A D | hdmi4.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * HDMI interface DSS driver for TI's OMAP4 family of SoCs. 5 * Copyright (C) 2010-2011 Texas Instruments Incorporated - https://www.ti.com/ 10 #define DSS_SUBSYS_NAME "HDMI" 27 #include <sound/omap-hdmi-audio.h> 38 #include "hdmi.h" 40 static int hdmi_runtime_get(struct omap_hdmi *hdmi) in hdmi_runtime_get() argument 46 r = pm_runtime_get_sync(&hdmi->pdev->dev); in hdmi_runtime_get() 48 pm_runtime_put_noidle(&hdmi->pdev->dev); in hdmi_runtime_get() 54 static void hdmi_runtime_put(struct omap_hdmi *hdmi) in hdmi_runtime_put() argument [all …]
|
/linux/drivers/gpu/drm/vc4/ |
H A D | vc4_hdmi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 * DOC: VC4 Falcon HDMI module 12 * The HDMI core has a state machine and a PHY. On BCM2835, most of 16 * HDMI infoframes are kept within a small packet ram, where each 19 * HDMI audio is implemented entirely within the HDMI IP block. A 20 * register in the HDMI encoder takes SPDIF frames from the DMA engine 21 * and transfers them over an internal MAI (multi-channel audio 25 * The driver's HDMI encoder does not yet support power management. 26 * The HDMI encoder's power domain and the HSM/pixel clocks are kept 27 * continuously running, and only the HDMI logic and packet ram are [all …]
|
/linux/drivers/video/fbdev/omap2/omapfb/displays/ |
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 17 tristate "TPD12S015 HDMI ESD protection and level shifter" 19 Driver for TPD12S015, which offers HDMI ESD protection and level 23 tristate "DVI Connector" 26 Driver for a generic DVI connector. 29 tristate "HDMI Connector" 31 Driver for a generic HDMI connector. 34 tristate "Analog TV Connector" 36 Driver for a generic analog TV connector.
|
/linux/drivers/gpu/drm/bridge/ |
H A D | display-connector.c | 1 // SPDX-License-Identifier: GPL-2.0 9 #include <linux/media-bus-format.h> 39 return flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR ? 0 : -EINVAL; in display_connector_attach() 47 if (conn->hpd_gpio) { in display_connector_detect() 48 if (gpiod_get_value_cansleep(conn->hpd_gpio)) in display_connector_detect() 54 if (conn->bridge.ddc && drm_probe_ddc(conn->bridge.ddc)) in display_connector_detect() 57 switch (conn->bridge.type) { in display_connector_detect() 64 * For DVI and HDMI connectors a DDC probe failure indicates in display_connector_detect() 74 * Composite and S-Video connectors have no other detection in display_connector_detect() 85 struct drm_connector *connector) in display_connector_edid_read() argument [all …]
|