linux/drivers/gpu/drm/amd/display/dc/spl/spl_fixpt31_32.c

// SPDX-License-Identifier: MIT
//
// Copyright 2024 Advanced Micro Devices, Inc.

#include "spl_fixpt31_32.h"

static const struct spl_fixed31_32 spl_fixpt_two_pi =;
static const struct spl_fixed31_32 spl_fixpt_ln2 =;
static const struct spl_fixed31_32 spl_fixpt_ln2_div_2 =;

static inline unsigned long long abs_i64(
	long long arg)
{}

/*
 * @brief
 * result = dividend / divisor
 * *remainder = dividend % divisor
 */
static inline unsigned long long complete_integer_division_u64(
	unsigned long long dividend,
	unsigned long long divisor,
	unsigned long long *remainder)
{}


#define FRACTIONAL_PART_MASK

#define GET_INTEGER_PART(x)

#define GET_FRACTIONAL_PART(x)

struct spl_fixed31_32 spl_fixpt_from_fraction(long long numerator, long long denominator)
{}

struct spl_fixed31_32 spl_fixpt_mul(struct spl_fixed31_32 arg1, struct spl_fixed31_32 arg2)
{}

struct spl_fixed31_32 spl_fixpt_sqr(struct spl_fixed31_32 arg)
{}

struct spl_fixed31_32 spl_fixpt_recip(struct spl_fixed31_32 arg)
{}

struct spl_fixed31_32 spl_fixpt_sinc(struct spl_fixed31_32 arg)
{}

struct spl_fixed31_32 spl_fixpt_sin(struct spl_fixed31_32 arg)
{}

struct spl_fixed31_32 spl_fixpt_cos(struct spl_fixed31_32 arg)
{}

/*
 * @brief
 * result = exp(arg),
 * where abs(arg) < 1
 *
 * Calculated as Taylor series.
 */
static struct spl_fixed31_32 fixed31_32_exp_from_taylor_series(struct spl_fixed31_32 arg)
{}

struct spl_fixed31_32 spl_fixpt_exp(struct spl_fixed31_32 arg)
{}

struct spl_fixed31_32 spl_fixpt_log(struct spl_fixed31_32 arg)
{}


/* this function is a generic helper to translate fixed point value to
 * specified integer format that will consist of integer_bits integer part and
 * fractional_bits fractional part. For example it is used in
 * spl_fixpt_u2d19 to receive 2 bits integer part and 19 bits fractional
 * part in 32 bits. It is used in hw programming (scaler)
 */

static inline unsigned int ux_dy(
	long long value,
	unsigned int integer_bits,
	unsigned int fractional_bits)
{}

static inline unsigned int clamp_ux_dy(
	long long value,
	unsigned int integer_bits,
	unsigned int fractional_bits,
	unsigned int min_clamp)
{}

unsigned int spl_fixpt_u4d19(struct spl_fixed31_32 arg)
{}

unsigned int spl_fixpt_u3d19(struct spl_fixed31_32 arg)
{}

unsigned int spl_fixpt_u2d19(struct spl_fixed31_32 arg)
{}

unsigned int spl_fixpt_u0d19(struct spl_fixed31_32 arg)
{}

unsigned int spl_fixpt_clamp_u0d14(struct spl_fixed31_32 arg)
{}

unsigned int spl_fixpt_clamp_u0d10(struct spl_fixed31_32 arg)
{}

int spl_fixpt_s4d19(struct spl_fixed31_32 arg)
{}

struct spl_fixed31_32 spl_fixpt_from_ux_dy(unsigned int value,
	unsigned int integer_bits,
	unsigned int fractional_bits)
{}

struct spl_fixed31_32 spl_fixpt_from_int_dy(unsigned int int_value,
	unsigned int frac_value,
	unsigned int integer_bits,
	unsigned int fractional_bits)
{}