linux/include/drm/drm_fixed.h

/*
 * Copyright 2009 Red Hat 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: Dave Airlie
 *          Christian König
 */
#ifndef DRM_FIXED_H
#define DRM_FIXED_H

#include <linux/kernel.h>
#include <linux/math64.h>

fixed20_12;


#define dfixed_const(A)
#define dfixed_const_half(A)
#define dfixed_const_666(A)
#define dfixed_const_8(A)
#define dfixed_mul(A, B)
#define dfixed_init(A)
#define dfixed_init_half(A)
#define dfixed_trunc(A)
#define dfixed_frac(A)

static inline u32 dfixed_floor(fixed20_12 A)
{}

static inline u32 dfixed_ceil(fixed20_12 A)
{}

static inline u32 dfixed_div(fixed20_12 A, fixed20_12 B)
{}

#define DRM_FIXED_POINT
#define DRM_FIXED_ONE
#define DRM_FIXED_DECIMAL_MASK
#define DRM_FIXED_DIGITS_MASK
#define DRM_FIXED_EPSILON
#define DRM_FIXED_ALMOST_ONE

static inline s64 drm_int2fixp(int a)
{}

static inline int drm_fixp2int(s64 a)
{}

static inline int drm_fixp2int_round(s64 a)
{}

static inline int drm_fixp2int_ceil(s64 a)
{}

static inline unsigned drm_fixp_msbset(s64 a)
{}

static inline s64 drm_fixp_mul(s64 a, s64 b)
{}

static inline s64 drm_fixp_div(s64 a, s64 b)
{}

static inline s64 drm_fixp_from_fraction(s64 a, s64 b)
{}

static inline s64 drm_fixp_exp(s64 x)
{}

static inline int fxp_q4_from_int(int val_int)
{}

static inline int fxp_q4_to_int(int val_q4)
{}

static inline int fxp_q4_to_int_roundup(int val_q4)
{}

static inline int fxp_q4_to_frac(int val_q4)
{}

#define FXP_Q4_FMT
#define FXP_Q4_ARGS(val_q4)

#endif