diff options
author | Leo (Sunpeng) Li <sunpeng.li@amd.com> | 2018-05-11 09:22:49 -0400 |
---|---|---|
committer | Leo (Sunpeng) Li <sunpeng.li@amd.com> | 2018-05-11 09:22:49 -0400 |
commit | 6d78c4f6347fccddf1e8b0359221f232166a0a29 (patch) | |
tree | 197cb5fa33316e8bc7e9c8adee34ec8ac7990c31 | |
parent | a914cda3a28b95e933ab3e5c3e565e314c453839 (diff) |
Remove libdrm includes
We really shouldn't be dependant on libdrm anyways.
Also switch linux int types to C standard int types.
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
-rw-r--r-- | demo.c | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -26,12 +26,10 @@ #include <math.h> #include <stdio.h> #include <stdlib.h> +#include <stdint.h> #include <string.h> #include <unistd.h> -#include <xf86drm.h> -#include <xf86drmMode.h> - #include <X11/Xlib.h> #include <X11/Xatom.h> #include <X11/extensions/Xrandr.h> @@ -49,17 +47,17 @@ */ struct _drm_color_ctm { /* Transformation matrix in S31.32 format. */ - __s64 matrix[9]; + int64_t matrix[9]; }; struct _drm_color_lut { /* * Data is U0.16 fixed point format. */ - __u16 red; - __u16 green; - __u16 blue; - __u16 reserved; + uint16_t red; + uint16_t green; + uint16_t blue; + uint16_t reserved; }; /* Struct to make constructing luts easier. */ @@ -86,7 +84,7 @@ static void coeffs_to_lut(struct color3d *coeffs, int lut_size) { int i; - __u16 max_value = 0xFFFF; + uint16_t max_value = 0xFFFF; for (i = 0; i < lut_size; i++) { lut[i].red = coeffs[i].r * max_value; |