[igt-dev] [PATCH i-g-t v3 3/3] Added a subtest where chamelium acts as a tiled panel.

Petri Latvala petri.latvala at intel.com
Mon Aug 17 06:16:31 UTC 2020


On Sat, Aug 15, 2020 at 10:46:37AM +0530, Kunal Joshi wrote:
> Split kms_dp_tiled_display into to two subtest.First to execute the
> basic test with physical tiled panel and second with chamelium.
> 
> v2: Revised to just have basic test if chamelium dependencies are not present.
>     Reset ports after the test executes.Changed subtest name from with-chamelium
>     to basic-test-pattern-with-chamelium
> 
> v3: Changes required to adapt to changes done in first patch.
> 
> Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
> Signed-off-by: Karthik B S <karthik.b.s at intel.com>
> Reviewed-by: Navare Manasi D <manasi.d.navare at intel.com>
> ---
>  tests/kms_dp_tiled_display.c | 119 ++++++++++++++++++++++++++++-------
>  1 file changed, 95 insertions(+), 24 deletions(-)
> 
> diff --git a/tests/kms_dp_tiled_display.c b/tests/kms_dp_tiled_display.c
> index b1160fee..582727a2 100644
> --- a/tests/kms_dp_tiled_display.c
> +++ b/tests/kms_dp_tiled_display.c
> @@ -40,6 +40,7 @@
>  #include "poll.h"
>  #include "drm_mode.h"
>  #include "drm_fourcc.h"
> +#include "igt_edid.h"
>  
>  IGT_TEST_DESCRIPTION("Test for Transcoder Port Sync for Display Port Tiled Displays");
>  
> @@ -59,8 +60,22 @@ typedef struct {
>  	data_connector_t *conns;
>  	enum igt_commit_style commit;
>  	struct timeval first_ts;
> +
> +	#ifdef HAVE_CHAMELIUM
> +	struct chamelium *chamelium;
> +	struct chamelium_port **ports;
> +	int port_count;
> +	struct chamelium_edid *edids[TEST_EDID_COUNT];
> +	#endif
> +
>  } data_t;
>  
> +void basic_test(data_t *data, drmEventContext *drm_event, struct pollfd *pfd);
> +
> +#ifdef HAVE_CHAMELIUM
> +static void test_with_chamelium(data_t *data);
> +#endif
> +
>  static int drm_property_is_tile(drmModePropertyPtr prop)
>  {
>  	return (strcmp(prop->name, "TILE") ? 0 : 1) &&
> @@ -206,7 +221,6 @@ static void test_cleanup(data_t *data)
>  	igt_display_commit2(data->display, data->commit);
>  	memset(conns, 0, sizeof(data_connector_t) * data->num_h_tiles);
>  }
> -
>  static void setup_mode(data_t *data)
>  {
>  	int count = 0, prev = 0, i = 0;
> @@ -380,21 +394,83 @@ static bool got_all_page_flips(data_t *data)
>  	return true;
>  }
>  
> +#ifdef HAVE_CHAMELIUM
> +static void test_with_chamelium(data_t *data)
> +{
> +	int i, count = 0;
> +	uint8_t htile = 2, vtile = 1;
> +	struct edid **edid;
> +
> +	data->chamelium = chamelium_init(data->drm_fd);
> +	igt_assert(data->chamelium);

igt_require the chamelium init, not assert. The driver is not broken
if we don't have chamelium configured.


-- 
Petri Latvala


More information about the igt-dev mailing list