drivers/gpu/drm/qxl/qxl_drv.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/qxl/qxl_drv.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/qxl/qxl_drv.h- Extension
.h- Size
- 13554 bytes
- Lines
- 455
- 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/iosys-map.hlinux/dma-fence.hlinux/firmware.hlinux/platform_device.hlinux/workqueue.hdrm/drm_crtc.hdrm/drm_encoder.hdrm/drm_exec.hdrm/drm_gem_ttm_helper.hdrm/drm_ioctl.hdrm/drm_gem.hdrm/qxl_drm.hdrm/ttm/ttm_bo.hdrm/ttm/ttm_placement.hqxl_dev.h
Detected Declarations
struct iosys_mapstruct qxl_bostruct qxl_gemstruct qxl_bo_liststruct qxl_crtcstruct qxl_outputstruct qxl_mmanstruct qxl_memslotstruct qxl_releasestruct qxl_drm_chunkstruct qxl_drm_imagestruct qxl_debugfsstruct qxl_devicefunction qxl_bo_physical_address
Annotated Snippet
struct qxl_bo {
struct ttm_buffer_object tbo;
/* Protected by gem.mutex */
struct list_head list;
/* Protected by tbo.reserved */
struct ttm_place placements[3];
struct ttm_placement placement;
struct iosys_map map;
void *kptr;
unsigned int map_count;
int type;
/* Constant after initialization */
unsigned int is_primary:1; /* is this now a primary surface */
unsigned int is_dumb:1;
struct qxl_bo *shadow;
unsigned int hw_surf_alloc:1;
struct qxl_surface surf;
uint32_t surface_id;
struct qxl_release *surf_create;
};
#define gem_to_qxl_bo(gobj) container_of((gobj), struct qxl_bo, tbo.base)
#define to_qxl_bo(tobj) container_of((tobj), struct qxl_bo, tbo)
struct qxl_gem {
struct mutex mutex;
struct list_head objects;
};
struct qxl_bo_list {
struct qxl_bo *bo;
struct list_head list;
};
struct qxl_crtc {
struct drm_crtc base;
int index;
struct qxl_bo *cursor_bo;
};
struct qxl_output {
int index;
struct drm_connector base;
struct drm_encoder enc;
};
#define to_qxl_crtc(x) container_of(x, struct qxl_crtc, base)
#define drm_connector_to_qxl_output(x) container_of(x, struct qxl_output, base)
struct qxl_mman {
struct ttm_device bdev;
};
struct qxl_memslot {
int index;
const char *name;
uint8_t generation;
uint64_t start_phys_addr;
uint64_t size;
uint64_t high_bits;
};
enum {
QXL_RELEASE_DRAWABLE,
QXL_RELEASE_SURFACE_CMD,
QXL_RELEASE_CURSOR_CMD,
};
/* drm_ prefix to differentiate from qxl_release_info in
* spice-protocol/qxl_dev.h */
#define QXL_MAX_RES 96
struct qxl_release {
struct dma_fence base;
int id;
int type;
struct qxl_bo *release_bo;
uint32_t release_offset;
uint32_t surface_release_id;
struct drm_exec exec;
struct list_head bos;
};
struct qxl_drm_chunk {
struct list_head head;
struct qxl_bo *bo;
};
Annotation
- Immediate include surface: `linux/iosys-map.h`, `linux/dma-fence.h`, `linux/firmware.h`, `linux/platform_device.h`, `linux/workqueue.h`, `drm/drm_crtc.h`, `drm/drm_encoder.h`, `drm/drm_exec.h`.
- Detected declarations: `struct iosys_map`, `struct qxl_bo`, `struct qxl_gem`, `struct qxl_bo_list`, `struct qxl_crtc`, `struct qxl_output`, `struct qxl_mman`, `struct qxl_memslot`, `struct qxl_release`, `struct qxl_drm_chunk`.
- 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.