[i-g-t,v3,19/21] lib/igt_chamelium: Hook-in checkerboard comparison method in helpers

Submitted by Paul Kocialkowski on Jan. 11, 2019, 9:05 a.m.

Details

Message ID 20190111090532.19235-20-paul.kocialkowski@bootlin.com
State New
Series "Chamelium VC4 plane fuzzy testing, with SAND and T-tiled mode"
Headers show

Commit Message

Paul Kocialkowski Jan. 11, 2019, 9:05 a.m.
This introduces the checkerboard chamelium checking type and hooks the
call to the associated igt_frame matching helper in the frame match
chamelium helper.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
---
 lib/igt_chamelium.c | 4 +++-
 lib/igt_chamelium.h | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index 17321a2cef89..731259f2f196 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -1127,6 +1127,9 @@  void chamelium_assert_frame_match_or_dump(struct chamelium *chamelium,
 	case CHAMELIUM_CHECK_ANALOG:
 		match = igt_check_analog_frame_match(reference, capture);
 		break;
+	case CHAMELIUM_CHECK_CHECKERBOARD:
+		match = igt_check_checkerboard_frame_match(reference, capture);
+		break;
 	default:
 		igt_assert(false);
 	}
@@ -1155,7 +1158,6 @@  void chamelium_assert_frame_match_or_dump(struct chamelium *chamelium,
 	cairo_surface_destroy(capture);
 }
 
-
 /**
  * chamelium_analog_frame_crop:
  * @chamelium: The Chamelium instance to use
diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
index 042ac019ccdb..d6159307f240 100644
--- a/lib/igt_chamelium.h
+++ b/lib/igt_chamelium.h
@@ -42,6 +42,7 @@  struct chamelium_fb_crc_async_data;
 
 enum chamelium_check {
 	CHAMELIUM_CHECK_ANALOG,
+	CHAMELIUM_CHECK_CHECKERBOARD,
 	CHAMELIUM_CHECK_CRC,
 };
 

Comments

Maxime Ripard Jan. 11, 2019, 3:19 p.m.
On Fri, Jan 11, 2019 at 10:05:30AM +0100, Paul Kocialkowski wrote:
> This introduces the checkerboard chamelium checking type and hooks the
> call to the associated igt_frame matching helper in the frame match
> chamelium helper.
> 
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>

Maxime
Lyude Paul Jan. 15, 2019, 10:14 p.m.
Reviewed-by: Lyude Paul <lyude@redhat.com>

On Fri, 2019-01-11 at 10:05 +0100, Paul Kocialkowski wrote:
> This introduces the checkerboard chamelium checking type and hooks the
> call to the associated igt_frame matching helper in the frame match
> chamelium helper.
> 
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> ---
>  lib/igt_chamelium.c | 4 +++-
>  lib/igt_chamelium.h | 1 +
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> index 17321a2cef89..731259f2f196 100644
> --- a/lib/igt_chamelium.c
> +++ b/lib/igt_chamelium.c
> @@ -1127,6 +1127,9 @@ void chamelium_assert_frame_match_or_dump(struct
> chamelium *chamelium,
>  	case CHAMELIUM_CHECK_ANALOG:
>  		match = igt_check_analog_frame_match(reference, capture);
>  		break;
> +	case CHAMELIUM_CHECK_CHECKERBOARD:
> +		match = igt_check_checkerboard_frame_match(reference,
> capture);
> +		break;
>  	default:
>  		igt_assert(false);
>  	}
> @@ -1155,7 +1158,6 @@ void chamelium_assert_frame_match_or_dump(struct
> chamelium *chamelium,
>  	cairo_surface_destroy(capture);
>  }
>  
> -
>  /**
>   * chamelium_analog_frame_crop:
>   * @chamelium: The Chamelium instance to use
> diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
> index 042ac019ccdb..d6159307f240 100644
> --- a/lib/igt_chamelium.h
> +++ b/lib/igt_chamelium.h
> @@ -42,6 +42,7 @@ struct chamelium_fb_crc_async_data;
>  
>  enum chamelium_check {
>  	CHAMELIUM_CHECK_ANALOG,
> +	CHAMELIUM_CHECK_CHECKERBOARD,
>  	CHAMELIUM_CHECK_CRC,
>  };
>