diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2021-10-05 15:29:35 -0700 |
---|---|---|
committer | Ashutosh Dixit <ashutosh.dixit@intel.com> | 2021-10-08 19:16:05 -0700 |
commit | 426723f979380f18f9c07d36ebac3a52f760ba7e (patch) | |
tree | eefda917ee9bb1bf8b7aefd8c607f4a0d8f4eabb /tests/i915/gem_pxp.c | |
parent | d5d99d16817eca9ce8d191b6e84c1a1fe2ad4428 (diff) |
lib: Typechecking minmax
Add typechecking to the min/max macros and make their locals truly
unique-ish to reduce the risk of shadowing.
v2: small bug fix, write also height coordinate on rotation
test. (jheikkil)
v3: Fix up a couple of other max/max_t instances (Ashutosh)
Signed-off-by: Juha-Pekka Heikkilä <juha-pekka.heikkila@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Diffstat (limited to 'tests/i915/gem_pxp.c')
-rw-r--r-- | tests/i915/gem_pxp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/i915/gem_pxp.c b/tests/i915/gem_pxp.c index 0430f4b8..5f269bab 100644 --- a/tests/i915/gem_pxp.c +++ b/tests/i915/gem_pxp.c @@ -1082,8 +1082,8 @@ static void test_display_protected_crc(int i915, igt_display_t *display) for_each_connected_output(display, output) { mode = igt_output_get_mode(output); - width = max(width, mode->hdisplay); - height = max(height, mode->vdisplay); + width = max_t(int, width, mode->hdisplay); + height = max_t(int, height, mode->vdisplay); } igt_create_color_fb(i915, width, height, DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_NONE, |