drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c- Extension
.c- Size
- 23389 bytes
- Lines
- 1038
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/irq.hlinux/irqchip.hlinux/mfd/atmel-hlcdc.hlinux/module.hlinux/pm_runtime.hlinux/platform_device.hdrm/clients/drm_client_setup.hdrm/drm_atomic.hdrm/drm_atomic_helper.hdrm/drm_drv.hdrm/drm_fbdev_dma.hdrm/drm_fourcc.hdrm/drm_gem_dma_helper.hdrm/drm_gem_framebuffer_helper.hdrm/drm_module.hdrm/drm_print.hdrm/drm_probe_helper.hdrm/drm_vblank.hatmel_hlcdc_dc.h
Detected Declarations
function atmel_hlcdc_dc_mode_validfunction atmel_hlcdc_layer_irqfunction atmel_hlcdc_dc_irq_handlerfunction atmel_hlcdc_dc_irq_postinstallfunction atmel_hlcdc_dc_irq_disablefunction atmel_hlcdc_dc_irq_installfunction atmel_hlcdc_dc_irq_uninstallfunction atmel_hlcdc_dc_modeset_initfunction atmel_hlcdc_dc_loadfunction atmel_hlcdc_dc_unloadfunction atmel_hlcdc_dc_drm_probefunction atmel_hlcdc_dc_drm_removefunction atmel_hlcdc_dc_drm_shutdownfunction atmel_hlcdc_dc_drm_suspendfunction atmel_hlcdc_dc_drm_resume
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2014 Traphandler
* Copyright (C) 2014 Free Electrons
* Copyright (C) 2014 Atmel
*
* Author: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
* Author: Boris BREZILLON <boris.brezillon@free-electrons.com>
*/
#include <linux/clk.h>
#include <linux/irq.h>
#include <linux/irqchip.h>
#include <linux/mfd/atmel-hlcdc.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/platform_device.h>
#include <drm/clients/drm_client_setup.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_fbdev_dma.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_gem_dma_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_module.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_vblank.h>
#include "atmel_hlcdc_dc.h"
#define ATMEL_HLCDC_LAYER_IRQS_OFFSET 8
static const struct atmel_hlcdc_layer_desc atmel_hlcdc_at91sam9n12_layers[] = {
{
.name = "base",
.formats = &atmel_hlcdc_plane_rgb_formats,
.regs_offset = 0x40,
.id = 0,
.type = ATMEL_HLCDC_BASE_LAYER,
.cfgs_offset = 0x2c,
.layout = {
.xstride = { 2 },
.default_color = 3,
.general_config = 4,
},
.clut_offset = 0x400,
},
};
static const struct atmel_hlcdc_dc_desc atmel_hlcdc_dc_at91sam9n12 = {
.min_width = 0,
.min_height = 0,
.max_width = 1280,
.max_height = 860,
.max_spw = 0x3f,
.max_vpw = 0x3f,
.max_hpw = 0xff,
.conflicting_output_formats = true,
.nlayers = ARRAY_SIZE(atmel_hlcdc_at91sam9n12_layers),
.layers = atmel_hlcdc_at91sam9n12_layers,
.ops = &atmel_hlcdc_ops,
};
static const struct atmel_hlcdc_layer_desc atmel_hlcdc_at91sam9x5_layers[] = {
{
.name = "base",
.formats = &atmel_hlcdc_plane_rgb_formats,
.regs_offset = 0x40,
.id = 0,
.type = ATMEL_HLCDC_BASE_LAYER,
.cfgs_offset = 0x2c,
.layout = {
.xstride = { 2 },
.default_color = 3,
.general_config = 4,
.disc_pos = 5,
.disc_size = 6,
},
.clut_offset = 0x400,
},
{
.name = "overlay1",
.formats = &atmel_hlcdc_plane_rgb_formats,
.regs_offset = 0x100,
.id = 1,
.type = ATMEL_HLCDC_OVERLAY_LAYER,
.cfgs_offset = 0x2c,
Annotation
- Immediate include surface: `linux/clk.h`, `linux/irq.h`, `linux/irqchip.h`, `linux/mfd/atmel-hlcdc.h`, `linux/module.h`, `linux/pm_runtime.h`, `linux/platform_device.h`, `drm/clients/drm_client_setup.h`.
- Detected declarations: `function atmel_hlcdc_dc_mode_valid`, `function atmel_hlcdc_layer_irq`, `function atmel_hlcdc_dc_irq_handler`, `function atmel_hlcdc_dc_irq_postinstall`, `function atmel_hlcdc_dc_irq_disable`, `function atmel_hlcdc_dc_irq_install`, `function atmel_hlcdc_dc_irq_uninstall`, `function atmel_hlcdc_dc_modeset_init`, `function atmel_hlcdc_dc_load`, `function atmel_hlcdc_dc_unload`.
- 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.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.