drivers/gpu/drm/nouveau/dispnv50/wndwca7e.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/dispnv50/wndwca7e.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/nouveau/dispnv50/wndwca7e.c- Extension
.c- Size
- 7814 bytes
- Lines
- 243
- 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
wndw.hatom.hnvif/pushc97b.hnvhw/class/clca7e.hnouveau_bo.h
Detected Declarations
function Copyrightfunction wndwca7e_image_setfunction wndwca7e_ilut_clrfunction wndwca7e_ilut_setfunction wndwca7e_ntfy_clrfunction wndwca7e_ntfy_setfunction wndwca7e_new
Annotated Snippet
#include "wndw.h"
#include "atom.h"
#include <nvif/pushc97b.h>
#include <nvhw/class/clca7e.h>
#include <nouveau_bo.h>
static int
wndwca7e_image_clr(struct nv50_wndw *wndw)
{
struct nvif_push *push = &wndw->wndw.push;
int ret;
ret = PUSH_WAIT(push, 4);
if (ret)
return ret;
PUSH_MTHD(push, NVCA7E, SET_PRESENT_CONTROL,
NVVAL(NVCA7E, SET_PRESENT_CONTROL, MIN_PRESENT_INTERVAL, 0) |
NVDEF(NVCA7E, SET_PRESENT_CONTROL, BEGIN_MODE, NON_TEARING));
PUSH_MTHD(push, NVCA7E, SET_SURFACE_ADDRESS_LO_ISO(0),
NVDEF(NVCA7E, SET_SURFACE_ADDRESS_LO_ISO, ENABLE, DISABLE));
return 0;
}
static int
wndwca7e_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
{
const u32 iso0_hi = upper_32_bits(asyw->image.offset[0]);
const u32 iso0_lo = lower_32_bits(asyw->image.offset[0]);
struct nvif_push *push = &wndw->wndw.push;
int ret, kind;
if (asyw->image.kind)
kind = NVCA7E_SET_SURFACE_ADDRESS_LO_ISO_KIND_BLOCKLINEAR;
else
kind = NVCA7E_SET_SURFACE_ADDRESS_LO_ISO_KIND_PITCH;
ret = PUSH_WAIT(push, 17);
if (ret)
return ret;
PUSH_MTHD(push, NVCA7E, SET_SURFACE_ADDRESS_HI_ISO(0), iso0_hi);
PUSH_MTHD(push, NVCA7E, SET_SURFACE_ADDRESS_LO_ISO(0),
NVVAL(NVCA7E, SET_SURFACE_ADDRESS_LO_ISO, ADDRESS_LO, iso0_lo >> 4) |
NVDEF(NVCA7E, SET_SURFACE_ADDRESS_LO_ISO, TARGET, PHYSICAL_NVM) |
NVVAL(NVCA7E, SET_SURFACE_ADDRESS_LO_ISO, KIND, kind) |
NVDEF(NVCA7E, SET_SURFACE_ADDRESS_LO_ISO, ENABLE, ENABLE));
PUSH_MTHD(push, NVCA7E, SET_PRESENT_CONTROL,
NVVAL(NVCA7E, SET_PRESENT_CONTROL, MIN_PRESENT_INTERVAL, asyw->image.interval) |
NVVAL(NVCA7E, SET_PRESENT_CONTROL, BEGIN_MODE, asyw->image.mode) |
NVDEF(NVCA7E, SET_PRESENT_CONTROL, TIMESTAMP_MODE, DISABLE));
PUSH_MTHD(push, NVCA7E, SET_SIZE,
NVVAL(NVCA7E, SET_SIZE, WIDTH, asyw->image.w) |
NVVAL(NVCA7E, SET_SIZE, HEIGHT, asyw->image.h),
SET_STORAGE,
NVVAL(NVCA7E, SET_STORAGE, BLOCK_HEIGHT, asyw->image.blockh),
SET_PARAMS,
NVVAL(NVCA7E, SET_PARAMS, FORMAT, asyw->image.format) |
NVDEF(NVCA7E, SET_PARAMS, CLAMP_BEFORE_BLEND, DISABLE) |
NVDEF(NVCA7E, SET_PARAMS, SWAP_UV, DISABLE) |
NVDEF(NVCA7E, SET_PARAMS, FMT_ROUNDING_MODE, ROUND_TO_NEAREST),
SET_PLANAR_STORAGE(0),
NVVAL(NVCA7E, SET_PLANAR_STORAGE, PITCH, asyw->image.blocks[0]) |
NVVAL(NVCA7E, SET_PLANAR_STORAGE, PITCH, asyw->image.pitch[0] >> 6));
PUSH_MTHD(push, NVCA7E, SET_POINT_IN(0),
NVVAL(NVCA7E, SET_POINT_IN, X, asyw->state.src_x >> 16) |
NVVAL(NVCA7E, SET_POINT_IN, Y, asyw->state.src_y >> 16));
PUSH_MTHD(push, NVCA7E, SET_SIZE_IN,
NVVAL(NVCA7E, SET_SIZE_IN, WIDTH, asyw->state.src_w >> 16) |
NVVAL(NVCA7E, SET_SIZE_IN, HEIGHT, asyw->state.src_h >> 16));
PUSH_MTHD(push, NVCA7E, SET_SIZE_OUT,
NVVAL(NVCA7E, SET_SIZE_OUT, WIDTH, asyw->state.crtc_w) |
NVVAL(NVCA7E, SET_SIZE_OUT, HEIGHT, asyw->state.crtc_h));
return 0;
}
Annotation
- Immediate include surface: `wndw.h`, `atom.h`, `nvif/pushc97b.h`, `nvhw/class/clca7e.h`, `nouveau_bo.h`.
- Detected declarations: `function Copyright`, `function wndwca7e_image_set`, `function wndwca7e_ilut_clr`, `function wndwca7e_ilut_set`, `function wndwca7e_ntfy_clr`, `function wndwca7e_ntfy_set`, `function wndwca7e_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.