drivers/gpu/drm/i915/display/intel_bo.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/intel_bo.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/display/intel_bo.c- Extension
.c- Size
- 3185 bytes
- Lines
- 115
- 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
drm/drm_gem.hdrm/intel/display_parent_interface.hintel_bo.hintel_display_core.hintel_display_types.h
Detected Declarations
function intel_bo_is_tiledfunction intel_bo_is_userptrfunction intel_bo_is_shmemfunction intel_bo_is_protectedfunction intel_bo_key_checkfunction intel_bo_fb_mmapfunction intel_bo_read_from_pagefunction intel_bo_describefunction intel_bo_framebuffer_initfunction intel_bo_framebuffer_finifunction intel_bo_fbdev_pitch_alignfunction intel_bo_fbdev_destroyfunction intel_bo_fbdev_fill_info
Annotated Snippet
// SPDX-License-Identifier: MIT
/* Copyright © 2026 Intel Corporation */
#include <drm/drm_gem.h>
#include <drm/intel/display_parent_interface.h>
#include "intel_bo.h"
#include "intel_display_core.h"
#include "intel_display_types.h"
bool intel_bo_is_tiled(struct drm_gem_object *obj)
{
struct intel_display *display = to_intel_display(obj->dev);
return display->parent->bo->is_tiled && display->parent->bo->is_tiled(obj);
}
bool intel_bo_is_userptr(struct drm_gem_object *obj)
{
struct intel_display *display = to_intel_display(obj->dev);
return display->parent->bo->is_userptr && display->parent->bo->is_userptr(obj);
}
bool intel_bo_is_shmem(struct drm_gem_object *obj)
{
struct intel_display *display = to_intel_display(obj->dev);
return display->parent->bo->is_shmem && display->parent->bo->is_shmem(obj);
}
bool intel_bo_is_protected(struct drm_gem_object *obj)
{
struct intel_display *display = to_intel_display(obj->dev);
return display->parent->bo->is_protected(obj);
}
int intel_bo_key_check(struct drm_gem_object *obj)
{
struct intel_display *display = to_intel_display(obj->dev);
return display->parent->bo->key_check(obj);
}
int intel_bo_fb_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
{
struct intel_display *display = to_intel_display(obj->dev);
return display->parent->bo->fb_mmap(obj, vma);
}
int intel_bo_read_from_page(struct drm_gem_object *obj, u64 offset, void *dst, int size)
{
struct intel_display *display = to_intel_display(obj->dev);
return display->parent->bo->read_from_page(obj, offset, dst, size);
}
void intel_bo_describe(struct seq_file *m, struct drm_gem_object *obj)
{
struct intel_display *display = to_intel_display(obj->dev);
if (display->parent->bo->describe)
display->parent->bo->describe(m, obj);
}
int intel_bo_framebuffer_init(struct drm_gem_object *obj, struct drm_mode_fb_cmd2 *mode_cmd)
{
struct intel_display *display = to_intel_display(obj->dev);
return display->parent->bo->framebuffer_init(obj, mode_cmd);
}
void intel_bo_framebuffer_fini(struct drm_gem_object *obj)
{
struct intel_display *display = to_intel_display(obj->dev);
display->parent->bo->framebuffer_fini(obj);
}
struct drm_gem_object *intel_bo_framebuffer_lookup(struct intel_display *display,
struct drm_file *filp,
const struct drm_mode_fb_cmd2 *user_mode_cmd)
{
return display->parent->bo->framebuffer_lookup(display->drm, filp, user_mode_cmd);
}
#if IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION)
u32 intel_bo_fbdev_pitch_align(struct intel_display *display, u32 stride)
Annotation
- Immediate include surface: `drm/drm_gem.h`, `drm/intel/display_parent_interface.h`, `intel_bo.h`, `intel_display_core.h`, `intel_display_types.h`.
- Detected declarations: `function intel_bo_is_tiled`, `function intel_bo_is_userptr`, `function intel_bo_is_shmem`, `function intel_bo_is_protected`, `function intel_bo_key_check`, `function intel_bo_fb_mmap`, `function intel_bo_read_from_page`, `function intel_bo_describe`, `function intel_bo_framebuffer_init`, `function intel_bo_framebuffer_fini`.
- 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.