diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2019-12-08 18:57:00 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2020-01-16 21:06:38 +0200 |
commit | 1b2816124ec3dbd53b81725d39292f45d41d895b (patch) | |
tree | ff5f46268a355e30b660b6a5762b94056eb54cf8 /tools | |
parent | e29c30f5952e9d7cf87cc018b686d8421dd58629 (diff) |
tools/intel_panel_fitter: Fix abs(unsigned)
../tools/intel_panel_fitter.c: In function ‘change_screen_size’:
../tools/intel_panel_fitter.c:183:10: warning: taking the absolute value of unsigned type ‘uint32_t’ {aka ‘unsigned int’} has no effect [-Wabsolute-value]
183 | pos_x = abs((info.tot_width - dst_width)) / 2;
| ^~~
../tools/intel_panel_fitter.c:184:10: warning: taking the absolute value of unsigned type ‘uint32_t’ {aka ‘unsigned int’} has no effect [-Wabsolute-value]
184 | pos_y = abs((info.tot_height - dst_height)) / 2;
| ^~~
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/intel_panel_fitter.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/intel_panel_fitter.c b/tools/intel_panel_fitter.c index 640787053..c6ee2101c 100644 --- a/tools/intel_panel_fitter.c +++ b/tools/intel_panel_fitter.c @@ -72,12 +72,12 @@ struct pipe_info { bool enabled; bool pf_enabled; uint32_t interlace_mode; - uint32_t tot_width; /* htotal */ - uint32_t tot_height; /* vtotal */ - uint32_t src_width; /* pipesrc.x */ - uint32_t src_height; /* pipesrc.y */ - uint32_t dst_width; /* pf_win_sz.x */ - uint32_t dst_height; /* pf_win_sz.y */ + int tot_width; /* htotal */ + int tot_height; /* vtotal */ + int src_width; /* pipesrc.x */ + int src_height; /* pipesrc.y */ + int dst_width; /* pf_win_sz.x */ + int dst_height; /* pf_win_sz.y */ }; static void read_pipe_info(int intel_pipe, struct pipe_info *info) @@ -155,7 +155,7 @@ static void dump_info(void) static int change_screen_size(int intel_pipe, int x, int y) { struct pipe_info info; - uint32_t dst_width, dst_height, pos_x, pos_y; + int dst_width, dst_height, pos_x, pos_y; uint32_t ctrl1_val; uint32_t win_pos_val; uint32_t win_sz_val; |