drivers/gpu/drm/nouveau/dispnv50/coreca7d.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/dispnv50/coreca7d.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/nouveau/dispnv50/coreca7d.c- Extension
.c- Size
- 3846 bytes
- Lines
- 123
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
core.hhead.hnvif/class.hnvif/pushc97b.hnvhw/class/clca7d.hnouveau_bo.h
Detected Declarations
function Copyrightfunction coreca7d_initfunction coreca7d_new
Annotated Snippet
#include "core.h"
#include "head.h"
#include <nvif/class.h>
#include <nvif/pushc97b.h>
#include <nvhw/class/clca7d.h>
#include <nouveau_bo.h>
static int
coreca7d_update(struct nv50_core *core, u32 *interlock, bool ntfy)
{
const u64 ntfy_addr = core->disp->sync->offset + NV50_DISP_CORE_NTFY;
const u32 ntfy_hi = upper_32_bits(ntfy_addr);
const u32 ntfy_lo = lower_32_bits(ntfy_addr);
struct nvif_push *push = &core->chan.push;
int ret;
ret = PUSH_WAIT(push, 5 + (ntfy ? 5 + 2 : 0));
if (ret)
return ret;
if (ntfy) {
PUSH_MTHD(push, NVCA7D, SET_SURFACE_ADDRESS_HI_NOTIFIER, ntfy_hi,
SET_SURFACE_ADDRESS_LO_NOTIFIER,
NVVAL(NVCA7D, SET_SURFACE_ADDRESS_LO_NOTIFIER, ADDRESS_LO, ntfy_lo >> 4) |
NVDEF(NVCA7D, SET_SURFACE_ADDRESS_LO_NOTIFIER, TARGET, PHYSICAL_NVM) |
NVDEF(NVCA7D, SET_SURFACE_ADDRESS_LO_NOTIFIER, ENABLE, ENABLE));
PUSH_MTHD(push, NVCA7D, SET_NOTIFIER_CONTROL,
NVDEF(NVCA7D, SET_NOTIFIER_CONTROL, MODE, WRITE) |
NVDEF(NVCA7D, SET_NOTIFIER_CONTROL, NOTIFY, ENABLE));
}
PUSH_MTHD(push, NVCA7D, SET_INTERLOCK_FLAGS, interlock[NV50_DISP_INTERLOCK_CURS],
SET_WINDOW_INTERLOCK_FLAGS, interlock[NV50_DISP_INTERLOCK_WNDW]);
PUSH_MTHD(push, NVCA7D, UPDATE,
NVDEF(NVCA7D, UPDATE, RELEASE_ELV, TRUE) |
NVDEF(NVCA7D, UPDATE, SPECIAL_HANDLING, NONE) |
NVDEF(NVCA7D, UPDATE, INHIBIT_INTERRUPTS, FALSE));
if (ntfy) {
PUSH_MTHD(push, NVCA7D, SET_NOTIFIER_CONTROL,
NVDEF(NVCA7D, SET_NOTIFIER_CONTROL, NOTIFY, DISABLE));
}
return PUSH_KICK(push);
}
static int
coreca7d_init(struct nv50_core *core)
{
struct nvif_push *push = &core->chan.push;
const u32 windows = 8, heads = 4;
int ret, i;
ret = PUSH_WAIT(push, windows * 6 + heads * 6);
if (ret)
return ret;
for (i = 0; i < windows; i++) {
PUSH_MTHD(push, NVCA7D, WINDOW_SET_WINDOW_FORMAT_USAGE_BOUNDS(i),
NVDEF(NVCA7D, WINDOW_SET_WINDOW_FORMAT_USAGE_BOUNDS, RGB_PACKED1BPP, TRUE) |
NVDEF(NVCA7D, WINDOW_SET_WINDOW_FORMAT_USAGE_BOUNDS, RGB_PACKED2BPP, TRUE) |
NVDEF(NVCA7D, WINDOW_SET_WINDOW_FORMAT_USAGE_BOUNDS, RGB_PACKED4BPP, TRUE) |
NVDEF(NVCA7D, WINDOW_SET_WINDOW_FORMAT_USAGE_BOUNDS, RGB_PACKED8BPP, TRUE),
WINDOW_SET_WINDOW_ROTATED_FORMAT_USAGE_BOUNDS(i), 0x00000000);
PUSH_MTHD(push, NVCA7D, WINDOW_SET_WINDOW_USAGE_BOUNDS(i),
NVVAL(NVCA7D, WINDOW_SET_WINDOW_USAGE_BOUNDS, MAX_PIXELS_FETCHED_PER_LINE, 0x7fff) |
NVDEF(NVCA7D, WINDOW_SET_WINDOW_USAGE_BOUNDS, ILUT_ALLOWED, TRUE) |
NVDEF(NVCA7D, WINDOW_SET_WINDOW_USAGE_BOUNDS, INPUT_SCALER_TAPS, TAPS_2) |
NVDEF(NVCA7D, WINDOW_SET_WINDOW_USAGE_BOUNDS, UPSCALING_ALLOWED, FALSE),
WINDOW_SET_PHYSICAL(i), BIT(i));
}
for (i = 0; i < heads; i++) {
PUSH_MTHD(push, NVCA7D, HEAD_SET_HEAD_USAGE_BOUNDS(i),
NVDEF(NVCA7D, HEAD_SET_HEAD_USAGE_BOUNDS, CURSOR, USAGE_W256_H256) |
NVDEF(NVCA7D, HEAD_SET_HEAD_USAGE_BOUNDS, OLUT_ALLOWED, TRUE) |
NVDEF(NVCA7D, HEAD_SET_HEAD_USAGE_BOUNDS, OUTPUT_SCALER_TAPS, TAPS_2) |
NVDEF(NVCA7D, HEAD_SET_HEAD_USAGE_BOUNDS, UPSCALING_ALLOWED, TRUE));
PUSH_MTHD(push, NVCA7D, HEAD_SET_TILE_MASK(i), BIT(i));
Annotation
- Immediate include surface: `core.h`, `head.h`, `nvif/class.h`, `nvif/pushc97b.h`, `nvhw/class/clca7d.h`, `nouveau_bo.h`.
- Detected declarations: `function Copyright`, `function coreca7d_init`, `function coreca7d_new`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
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.