drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c- Extension
.c- Size
- 88476 bytes
- Lines
- 2622
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitfield.hlinux/kernel.hlinux/component.hlinux/hw_bitfield.hlinux/mod_devicetable.hlinux/platform_device.hlinux/of.hdrm/drm_blend.hdrm/drm_fourcc.hdrm/drm_framebuffer.hdrm/drm_plane.hdrm/drm_print.hrockchip_drm_vop2.h
Detected Declarations
struct vop2_alphastruct vop2_alpha_configfunction windowfunction rk3568_set_intf_muxfunction rk3576_set_intf_muxfunction rk3588_calc_dclkfunction rk3588_calc_cru_cfgfunction rk3588_get_mipi_port_muxfunction rk3588_get_hdmi_polfunction rk3588_set_intf_muxfunction is_opaquefunction vop2_parse_alphafunction vop2_find_start_mixer_id_for_vpfunction for_each_set_bitfunction vop2_setup_cluster_alphafunction vop2_setup_alphafunction drm_atomic_crtc_for_each_planefunction drm_atomic_crtc_for_each_planefunction rk3568_vop2_read_port_muxfunction rk3568_vop2_wait_for_port_mux_donefunction rk3568_vop2_read_layer_cfgfunction rk3568_vop2_wait_for_layer_cfg_donefunction rk3568_vop2_setup_layer_mixerfunction drm_atomic_crtc_for_each_planefunction rk3568_vop2_setup_dly_for_windowsfunction rk3568_vop2_setup_overlayfunction drm_atomic_crtc_for_each_planefunction rk3576_vop2_setup_layer_mixerfunction drm_atomic_crtc_for_each_planefunction rk3576_vop2_setup_dly_for_windowsfunction drm_atomic_crtc_for_each_planefunction rk3576_vop2_setup_overlayfunction drm_atomic_crtc_for_each_planefunction rk3568_vop2_setup_bg_dlyfunction rk3576_vop2_setup_bg_dlyfunction vop2_probefunction vop2_remove
Annotated Snippet
struct vop2_alpha {
union vop2_alpha_ctrl src_color_ctrl;
union vop2_alpha_ctrl dst_color_ctrl;
union vop2_alpha_ctrl src_alpha_ctrl;
union vop2_alpha_ctrl dst_alpha_ctrl;
};
struct vop2_alpha_config {
bool src_premulti_en;
bool dst_premulti_en;
bool src_pixel_alpha_en;
bool dst_pixel_alpha_en;
u16 src_glb_alpha_value;
u16 dst_glb_alpha_value;
};
static const uint32_t formats_cluster[] = {
DRM_FORMAT_XRGB2101010,
DRM_FORMAT_XBGR2101010,
DRM_FORMAT_XRGB8888,
DRM_FORMAT_ARGB8888,
DRM_FORMAT_XBGR8888,
DRM_FORMAT_ABGR8888,
DRM_FORMAT_RGB888,
DRM_FORMAT_BGR888,
DRM_FORMAT_RGB565,
DRM_FORMAT_BGR565,
DRM_FORMAT_YUV420_8BIT, /* yuv420_8bit non-Linear mode only */
DRM_FORMAT_YUV420_10BIT, /* yuv420_10bit non-Linear mode only */
DRM_FORMAT_YUYV, /* yuv422_8bit non-Linear mode only*/
DRM_FORMAT_Y210, /* yuv422_10bit non-Linear mode only */
};
/*
* The cluster windows on rk3576 support:
* RGB: linear mode and afbc
* YUV: linear mode and rfbc
* rfbc is a rockchip defined non-linear mode, produced by
* Video decoder
*/
static const uint32_t formats_rk3576_cluster[] = {
DRM_FORMAT_XRGB2101010,
DRM_FORMAT_XBGR2101010,
DRM_FORMAT_ARGB2101010,
DRM_FORMAT_ABGR2101010,
DRM_FORMAT_XRGB8888,
DRM_FORMAT_ARGB8888,
DRM_FORMAT_XBGR8888,
DRM_FORMAT_ABGR8888,
DRM_FORMAT_RGB888,
DRM_FORMAT_BGR888,
DRM_FORMAT_RGB565,
DRM_FORMAT_BGR565,
DRM_FORMAT_NV12, /* yuv420_8bit linear mode, 2 plane */
DRM_FORMAT_NV21, /* yvu420_8bit linear mode, 2 plane */
DRM_FORMAT_NV16, /* yuv422_8bit linear mode, 2 plane */
DRM_FORMAT_NV61, /* yvu422_8bit linear mode, 2 plane */
DRM_FORMAT_NV24, /* yuv444_8bit linear mode, 2 plane */
DRM_FORMAT_NV42, /* yvu444_8bit linear mode, 2 plane */
DRM_FORMAT_NV15, /* yuv420_10bit linear mode, 2 plane, no padding */
DRM_FORMAT_NV20, /* yuv422_10bit linear mode, 2 plane, no padding */
DRM_FORMAT_NV30, /* yuv444_10bit linear mode, 2 plane, no padding */
};
static const uint32_t formats_esmart[] = {
DRM_FORMAT_XRGB8888,
DRM_FORMAT_ARGB8888,
DRM_FORMAT_XBGR8888,
DRM_FORMAT_ABGR8888,
DRM_FORMAT_RGB888,
DRM_FORMAT_BGR888,
DRM_FORMAT_RGB565,
DRM_FORMAT_BGR565,
DRM_FORMAT_NV12, /* yuv420_8bit linear mode, 2 plane */
DRM_FORMAT_NV21, /* yvu420_8bit linear mode, 2 plane */
DRM_FORMAT_NV16, /* yuv422_8bit linear mode, 2 plane */
DRM_FORMAT_NV61, /* yvu422_8bit linear mode, 2 plane */
DRM_FORMAT_NV20, /* yuv422_10bit linear mode, 2 plane, no padding */
DRM_FORMAT_NV24, /* yuv444_8bit linear mode, 2 plane */
DRM_FORMAT_NV42, /* yvu444_8bit linear mode, 2 plane */
DRM_FORMAT_NV30, /* yuv444_10bit linear mode, 2 plane, no padding */
DRM_FORMAT_NV15, /* yuv420_10bit linear mode, 2 plane, no padding */
DRM_FORMAT_YVYU, /* yuv422_8bit[YVYU] linear mode */
DRM_FORMAT_VYUY, /* yuv422_8bit[VYUY] linear mode */
DRM_FORMAT_YUYV, /* yuv422_8bit[YUYV] linear mode */
DRM_FORMAT_UYVY, /* yuv422_8bit[UYVY] linear mode */
};
static const uint32_t formats_rk356x_esmart[] = {
DRM_FORMAT_XRGB8888,
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/kernel.h`, `linux/component.h`, `linux/hw_bitfield.h`, `linux/mod_devicetable.h`, `linux/platform_device.h`, `linux/of.h`, `drm/drm_blend.h`.
- Detected declarations: `struct vop2_alpha`, `struct vop2_alpha_config`, `function window`, `function rk3568_set_intf_mux`, `function rk3576_set_intf_mux`, `function rk3588_calc_dclk`, `function rk3588_calc_cru_cfg`, `function rk3588_get_mipi_port_mux`, `function rk3588_get_hdmi_pol`, `function rk3588_set_intf_mux`.
- 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.