linux/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c

/*
 * Copyright 2012-15 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: AMD
 *
 */

#include "dm_services.h"
#include "include/fixed31_32.h"

static const struct fixed31_32 dc_fixpt_two_pi =;
static const struct fixed31_32 dc_fixpt_ln2 =;
static const struct fixed31_32 dc_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 fixed31_32 dc_fixpt_from_fraction(long long numerator, long long denominator)
{}

struct fixed31_32 dc_fixpt_mul(struct fixed31_32 arg1, struct fixed31_32 arg2)
{}

struct fixed31_32 dc_fixpt_sqr(struct fixed31_32 arg)
{}

struct fixed31_32 dc_fixpt_recip(struct fixed31_32 arg)
{}

struct fixed31_32 dc_fixpt_sinc(struct fixed31_32 arg)
{}

struct fixed31_32 dc_fixpt_sin(struct fixed31_32 arg)
{}

struct fixed31_32 dc_fixpt_cos(struct fixed31_32 arg)
{}

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

struct fixed31_32 dc_fixpt_exp(struct fixed31_32 arg)
{}

struct fixed31_32 dc_fixpt_log(struct 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
 * dc_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 dc_fixpt_u4d19(struct fixed31_32 arg)
{}

unsigned int dc_fixpt_u3d19(struct fixed31_32 arg)
{}

unsigned int dc_fixpt_u2d19(struct fixed31_32 arg)
{}

unsigned int dc_fixpt_u0d19(struct fixed31_32 arg)
{}

unsigned int dc_fixpt_clamp_u0d14(struct fixed31_32 arg)
{}

unsigned int dc_fixpt_clamp_u0d10(struct fixed31_32 arg)
{}

int dc_fixpt_s4d19(struct fixed31_32 arg)
{}