drivers/gpu/drm/amd/display/dc/sspl/spl_fixpt31_32.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/sspl/spl_fixpt31_32.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/sspl/spl_fixpt31_32.h- Extension
.h- Size
- 11383 bytes
- Lines
- 527
- 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
spl_debug.hspl_os_types.h
Detected Declarations
struct spl_fixed31_32function spl_fixpt_from_intfunction spl_fixpt_negfunction spl_fixpt_absfunction spl_fixpt_ltfunction spl_fixpt_lefunction spl_fixpt_eqfunction spl_fixpt_minfunction spl_fixpt_maxfunction spl_fixpt_clampfunction spl_fixpt_shlfunction spl_fixpt_shrfunction spl_fixpt_addfunction spl_fixpt_add_intfunction spl_fixpt_subfunction spl_fixpt_sub_intfunction spl_fixpt_mul_intfunction spl_fixpt_div_intfunction spl_fixpt_divfunction spl_fixpt_powfunction spl_fixpt_floorfunction spl_fixpt_roundfunction spl_fixpt_ceilfunction spl_fixpt_truncate
Annotated Snippet
struct spl_fixed31_32 {
long long value;
};
/*
* @brief
* Useful constants
*/
static const struct spl_fixed31_32 spl_fixpt_zero = { 0 };
static const struct spl_fixed31_32 spl_fixpt_epsilon = { 1LL };
static const struct spl_fixed31_32 spl_fixpt_half = { 0x80000000LL };
static const struct spl_fixed31_32 spl_fixpt_one = { 0x100000000LL };
/*
* @brief
* Initialization routines
*/
/*
* @brief
* result = numerator / denominator
*/
struct spl_fixed31_32 SPL_NAMESPACE(spl_fixpt_from_fraction(
long long numerator, long long denominator));
/*
* @brief
* result = arg
*/
static inline struct spl_fixed31_32 spl_fixpt_from_int(int arg)
{
struct spl_fixed31_32 res;
res.value = (long long) arg << FIXED31_32_BITS_PER_FRACTIONAL_PART;
return res;
}
/*
* @brief
* Unary operators
*/
/*
* @brief
* result = -arg
*/
static inline struct spl_fixed31_32 spl_fixpt_neg(struct spl_fixed31_32 arg)
{
struct spl_fixed31_32 res;
res.value = -arg.value;
return res;
}
/*
* @brief
* result = abs(arg) := (arg >= 0) ? arg : -arg
*/
static inline struct spl_fixed31_32 spl_fixpt_abs(struct spl_fixed31_32 arg)
{
if (arg.value < 0)
return spl_fixpt_neg(arg);
else
return arg;
}
/*
* @brief
* Binary relational operators
*/
/*
* @brief
* result = arg1 < arg2
*/
static inline bool spl_fixpt_lt(struct spl_fixed31_32 arg1, struct spl_fixed31_32 arg2)
{
return arg1.value < arg2.value;
}
/*
* @brief
* result = arg1 <= arg2
*/
static inline bool spl_fixpt_le(struct spl_fixed31_32 arg1, struct spl_fixed31_32 arg2)
{
Annotation
- Immediate include surface: `spl_debug.h`, `spl_os_types.h`.
- Detected declarations: `struct spl_fixed31_32`, `function spl_fixpt_from_int`, `function spl_fixpt_neg`, `function spl_fixpt_abs`, `function spl_fixpt_lt`, `function spl_fixpt_le`, `function spl_fixpt_eq`, `function spl_fixpt_min`, `function spl_fixpt_max`, `function spl_fixpt_clamp`.
- 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.