drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c- Extension
.c- Size
- 2256 bytes
- Lines
- 84
- 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
dm_services.hatom.hinclude/bios_parser_types.hbios_parser_helper.hcommand_table_helper.hcommand_table.hbios_parser_types_internal.hreg_helper.h
Detected Declarations
function filesfunction bios_is_accelerated_modefunction bios_set_scratch_acc_mode_changefunction bios_set_scratch_critical_state
Annotated Snippet
#include "dm_services.h"
#include "atom.h"
#include "include/bios_parser_types.h"
#include "bios_parser_helper.h"
#include "command_table_helper.h"
#include "command_table.h"
#include "bios_parser_types_internal.h"
uint8_t *bios_get_image(struct dc_bios *bp,
uint32_t offset,
uint32_t size)
{
if (!bp->bios)
return NULL;
if (offset > bp->bios_size || size > bp->bios_size - offset)
return NULL;
return bp->bios + offset;
}
#include "reg_helper.h"
#define CTX \
bios->ctx
#define REG(reg)\
(bios->regs->reg)
#undef FN
#define FN(reg_name, field_name) \
ATOM_ ## field_name ## _SHIFT, ATOM_ ## field_name
bool bios_is_accelerated_mode(
struct dc_bios *bios)
{
uint32_t acc_mode;
REG_GET(BIOS_SCRATCH_6, S6_ACC_MODE, &acc_mode);
return (acc_mode == 1);
}
void bios_set_scratch_acc_mode_change(
struct dc_bios *bios,
uint32_t state)
{
REG_UPDATE(BIOS_SCRATCH_6, S6_ACC_MODE, state);
}
void bios_set_scratch_critical_state(
struct dc_bios *bios,
bool state)
{
uint32_t critial_state = state ? 1 : 0;
REG_UPDATE(BIOS_SCRATCH_6, S6_CRITICAL_STATE, critial_state);
}
Annotation
- Immediate include surface: `dm_services.h`, `atom.h`, `include/bios_parser_types.h`, `bios_parser_helper.h`, `command_table_helper.h`, `command_table.h`, `bios_parser_types_internal.h`, `reg_helper.h`.
- Detected declarations: `function files`, `function bios_is_accelerated_mode`, `function bios_set_scratch_acc_mode_change`, `function bios_set_scratch_critical_state`.
- 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.