xref: /openbsd-src/sys/dev/pci/drm/amd/display/dc/inc/custom_float.h (revision fb4d85023675bc7da402da96b2bb84fd12905dbf)
1*fb4d8502Sjsg /*
2*fb4d8502Sjsg  * Copyright 2017 Advanced Micro Devices, Inc.
3*fb4d8502Sjsg  *
4*fb4d8502Sjsg  * Permission is hereby granted, free of charge, to any person obtaining a
5*fb4d8502Sjsg  * copy of this software and associated documentation files (the "Software"),
6*fb4d8502Sjsg  * to deal in the Software without restriction, including without limitation
7*fb4d8502Sjsg  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8*fb4d8502Sjsg  * and/or sell copies of the Software, and to permit persons to whom the
9*fb4d8502Sjsg  * Software is furnished to do so, subject to the following conditions:
10*fb4d8502Sjsg  *
11*fb4d8502Sjsg  * The above copyright notice and this permission notice shall be included in
12*fb4d8502Sjsg  * all copies or substantial portions of the Software.
13*fb4d8502Sjsg  *
14*fb4d8502Sjsg  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15*fb4d8502Sjsg  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16*fb4d8502Sjsg  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17*fb4d8502Sjsg  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18*fb4d8502Sjsg  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19*fb4d8502Sjsg  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20*fb4d8502Sjsg  * OTHER DEALINGS IN THE SOFTWARE.
21*fb4d8502Sjsg  *
22*fb4d8502Sjsg  * Authors: AMD
23*fb4d8502Sjsg  *
24*fb4d8502Sjsg  */
25*fb4d8502Sjsg 
26*fb4d8502Sjsg #ifndef CUSTOM_FLOAT_H_
27*fb4d8502Sjsg #define CUSTOM_FLOAT_H_
28*fb4d8502Sjsg 
29*fb4d8502Sjsg #include "bw_fixed.h"
30*fb4d8502Sjsg #include "hw_shared.h"
31*fb4d8502Sjsg #include "opp.h"
32*fb4d8502Sjsg 
33*fb4d8502Sjsg 
34*fb4d8502Sjsg bool convert_to_custom_float_format(
35*fb4d8502Sjsg 	struct fixed31_32 value,
36*fb4d8502Sjsg 	const struct custom_float_format *format,
37*fb4d8502Sjsg 	uint32_t *result);
38*fb4d8502Sjsg 
39*fb4d8502Sjsg 
40*fb4d8502Sjsg #endif //CUSTOM_FLOAT_H_
41