drivers/gpu/drm/tidss/tidss_drv.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/tidss/tidss_drv.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/tidss/tidss_drv.c- Extension
.c- Size
- 6195 bytes
- Lines
- 272
- 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/console.hlinux/of.hlinux/module.hlinux/pm_runtime.hlinux/aperture.hdrm/clients/drm_client_setup.hdrm/drm_atomic.hdrm/drm_atomic_helper.hdrm/drm_crtc.hdrm/drm_drv.hdrm/drm_fbdev_dma.hdrm/drm_gem_dma_helper.hdrm/drm_managed.hdrm/drm_module.hdrm/drm_probe_helper.htidss_dispc.htidss_drv.htidss_kms.htidss_irq.htidss_oldi.h
Detected Declarations
function Copyrightfunction tidss_runtime_putfunction tidss_pm_runtime_suspendfunction tidss_pm_runtime_resumefunction tidss_suspendfunction tidss_resumefunction tidss_releasefunction tidss_probefunction tidss_removefunction tidss_shutdown
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2018 Texas Instruments Incorporated - https://www.ti.com/
* Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
*/
#include <linux/console.h>
#include <linux/of.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/aperture.h>
#include <drm/clients/drm_client_setup.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h>
#include <drm/drm_drv.h>
#include <drm/drm_fbdev_dma.h>
#include <drm/drm_gem_dma_helper.h>
#include <drm/drm_managed.h>
#include <drm/drm_module.h>
#include <drm/drm_probe_helper.h>
#include "tidss_dispc.h"
#include "tidss_drv.h"
#include "tidss_kms.h"
#include "tidss_irq.h"
#include "tidss_oldi.h"
/* Power management */
int tidss_runtime_get(struct tidss_device *tidss)
{
int r;
r = pm_runtime_resume_and_get(tidss->dev);
WARN_ON(r < 0);
return r;
}
void tidss_runtime_put(struct tidss_device *tidss)
{
int r;
pm_runtime_mark_last_busy(tidss->dev);
r = pm_runtime_put_autosuspend(tidss->dev);
WARN_ON(r < 0);
}
static int __maybe_unused tidss_pm_runtime_suspend(struct device *dev)
{
struct tidss_device *tidss = dev_get_drvdata(dev);
return dispc_runtime_suspend(tidss->dispc);
}
static int __maybe_unused tidss_pm_runtime_resume(struct device *dev)
{
struct tidss_device *tidss = dev_get_drvdata(dev);
int r;
r = dispc_runtime_resume(tidss->dispc);
if (r)
return r;
return 0;
}
static int __maybe_unused tidss_suspend(struct device *dev)
{
struct tidss_device *tidss = dev_get_drvdata(dev);
return drm_mode_config_helper_suspend(&tidss->ddev);
}
static int __maybe_unused tidss_resume(struct device *dev)
{
struct tidss_device *tidss = dev_get_drvdata(dev);
return drm_mode_config_helper_resume(&tidss->ddev);
}
static __maybe_unused const struct dev_pm_ops tidss_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(tidss_suspend, tidss_resume)
SET_RUNTIME_PM_OPS(tidss_pm_runtime_suspend, tidss_pm_runtime_resume, NULL)
};
/* DRM device Information */
Annotation
- Immediate include surface: `linux/console.h`, `linux/of.h`, `linux/module.h`, `linux/pm_runtime.h`, `linux/aperture.h`, `drm/clients/drm_client_setup.h`, `drm/drm_atomic.h`, `drm/drm_atomic_helper.h`.
- Detected declarations: `function Copyright`, `function tidss_runtime_put`, `function tidss_pm_runtime_suspend`, `function tidss_pm_runtime_resume`, `function tidss_suspend`, `function tidss_resume`, `function tidss_release`, `function tidss_probe`, `function tidss_remove`, `function tidss_shutdown`.
- 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.