drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c- Extension
.c- Size
- 10856 bytes
- Lines
- 412
- 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.
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/firmware/imx/svc/misc.hlinux/media-bus-format.hlinux/module.hlinux/of.hlinux/of_graph.hlinux/platform_device.hdrm/drm_atomic_state_helper.hdrm/drm_bridge.hdrm/drm_print.hdt-bindings/firmware/imx/rsrc.h
Detected Declarations
struct imx8qxp_pixel_linkfunction imx8qxp_pixel_link_enable_mst_enfunction imx8qxp_pixel_link_enable_mst_vldfunction imx8qxp_pixel_link_enable_syncfunction imx8qxp_pixel_link_disable_mst_enfunction imx8qxp_pixel_link_disable_mst_vldfunction imx8qxp_pixel_link_disable_syncfunction imx8qxp_pixel_link_set_mst_addrfunction imx8qxp_pixel_link_bridge_attachfunction imx8qxp_pixel_link_bridge_mode_setfunction imx8qxp_pixel_link_bridge_atomic_enablefunction imx8qxp_pixel_link_bridge_atomic_disablefunction imx8qxp_pixel_link_bus_output_fmt_supportedfunction imx8qxp_pixel_link_bridge_atomic_get_input_bus_fmtsfunction imx8qxp_pixel_link_bridge_atomic_get_output_bus_fmtsfunction imx8qxp_pixel_link_disable_all_controlsfunction imx8qxp_pixel_link_find_next_bridgefunction imx8qxp_pixel_link_bridge_probefunction imx8qxp_pixel_link_bridge_remove
Annotated Snippet
struct imx8qxp_pixel_link {
struct drm_bridge bridge;
struct device *dev;
struct imx_sc_ipc *ipc_handle;
u8 stream_id;
u8 dc_id;
u32 sink_rsc;
u32 mst_addr;
u8 mst_addr_ctrl;
u8 mst_en_ctrl;
u8 mst_vld_ctrl;
u8 sync_ctrl;
};
static void imx8qxp_pixel_link_enable_mst_en(struct imx8qxp_pixel_link *pl)
{
int ret;
ret = imx_sc_misc_set_control(pl->ipc_handle, pl->sink_rsc,
pl->mst_en_ctrl, true);
if (ret)
DRM_DEV_ERROR(pl->dev,
"failed to enable DC%u stream%u pixel link mst_en: %d\n",
pl->dc_id, pl->stream_id, ret);
}
static void imx8qxp_pixel_link_enable_mst_vld(struct imx8qxp_pixel_link *pl)
{
int ret;
ret = imx_sc_misc_set_control(pl->ipc_handle, pl->sink_rsc,
pl->mst_vld_ctrl, true);
if (ret)
DRM_DEV_ERROR(pl->dev,
"failed to enable DC%u stream%u pixel link mst_vld: %d\n",
pl->dc_id, pl->stream_id, ret);
}
static void imx8qxp_pixel_link_enable_sync(struct imx8qxp_pixel_link *pl)
{
int ret;
ret = imx_sc_misc_set_control(pl->ipc_handle, pl->sink_rsc,
pl->sync_ctrl, true);
if (ret)
DRM_DEV_ERROR(pl->dev,
"failed to enable DC%u stream%u pixel link sync: %d\n",
pl->dc_id, pl->stream_id, ret);
}
static int imx8qxp_pixel_link_disable_mst_en(struct imx8qxp_pixel_link *pl)
{
int ret;
ret = imx_sc_misc_set_control(pl->ipc_handle, pl->sink_rsc,
pl->mst_en_ctrl, false);
if (ret)
DRM_DEV_ERROR(pl->dev,
"failed to disable DC%u stream%u pixel link mst_en: %d\n",
pl->dc_id, pl->stream_id, ret);
return ret;
}
static int imx8qxp_pixel_link_disable_mst_vld(struct imx8qxp_pixel_link *pl)
{
int ret;
ret = imx_sc_misc_set_control(pl->ipc_handle, pl->sink_rsc,
pl->mst_vld_ctrl, false);
if (ret)
DRM_DEV_ERROR(pl->dev,
"failed to disable DC%u stream%u pixel link mst_vld: %d\n",
pl->dc_id, pl->stream_id, ret);
return ret;
}
static int imx8qxp_pixel_link_disable_sync(struct imx8qxp_pixel_link *pl)
{
int ret;
ret = imx_sc_misc_set_control(pl->ipc_handle, pl->sink_rsc,
pl->sync_ctrl, false);
if (ret)
DRM_DEV_ERROR(pl->dev,
"failed to disable DC%u stream%u pixel link sync: %d\n",
pl->dc_id, pl->stream_id, ret);
return ret;
Annotation
- Immediate include surface: `linux/firmware/imx/svc/misc.h`, `linux/media-bus-format.h`, `linux/module.h`, `linux/of.h`, `linux/of_graph.h`, `linux/platform_device.h`, `drm/drm_atomic_state_helper.h`, `drm/drm_bridge.h`.
- Detected declarations: `struct imx8qxp_pixel_link`, `function imx8qxp_pixel_link_enable_mst_en`, `function imx8qxp_pixel_link_enable_mst_vld`, `function imx8qxp_pixel_link_enable_sync`, `function imx8qxp_pixel_link_disable_mst_en`, `function imx8qxp_pixel_link_disable_mst_vld`, `function imx8qxp_pixel_link_disable_sync`, `function imx8qxp_pixel_link_set_mst_addr`, `function imx8qxp_pixel_link_bridge_attach`, `function imx8qxp_pixel_link_bridge_mode_set`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.