igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/sink_crc: Remove kms_sink_crc_basic
Date: Mon, 16 Jul 2018 10:25:45 -0700	[thread overview]
Message-ID: <20180716172545.GF4262@intel.com> (raw)
In-Reply-To: <20180714233936.20813-1-dhinakaran.pandiyan@intel.com>

On Sat, Jul 14, 2018 at 04:39:36PM -0700, Dhinakaran Pandiyan wrote:
> "drm/i915: Kill sink_crc for good" removes the kernel support for sink
> crc.
> 
> References: https://patchwork.freedesktop.org/series/46039/
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  tests/Makefile.sources                |   1 -
>  tests/intel-ci/fast-feedback.testlist |   1 -
>  tests/kms_sink_crc_basic.c            | 156 --------------------------
>  tests/meson.build                     |   1 -
>  4 files changed, 159 deletions(-)
>  delete mode 100644 tests/kms_sink_crc_basic.c
> 
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index 8fec6ffe..4555045c 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -204,7 +204,6 @@ TESTS_progs = \
>  	kms_rmfb \
>  	kms_rotation_crc \
>  	kms_setmode \
> -	kms_sink_crc_basic \
>  	kms_sysfs_edid_timing \
>  	kms_tv_load_detect \
>  	kms_universal_plane \
> diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
> index aa861d39..cb3346f8 100644
> --- a/tests/intel-ci/fast-feedback.testlist
> +++ b/tests/intel-ci/fast-feedback.testlist
> @@ -245,7 +245,6 @@ igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b
>  igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c
>  igt@kms_psr@basic
>  igt@kms_setmode@basic-clone-single-crtc
> -igt@kms_sink_crc_basic
>  igt@pm_backlight@basic-brightness
>  igt@pm_rpm@basic-pci-d3-state
>  igt@pm_rpm@basic-rte
> diff --git a/tests/kms_sink_crc_basic.c b/tests/kms_sink_crc_basic.c
> deleted file mode 100644
> index 1c31e30a..00000000
> --- a/tests/kms_sink_crc_basic.c
> +++ /dev/null
> @@ -1,156 +0,0 @@
> -/*
> - * Copyright © 2013 Intel Corporation
> - *
> - * Permission is hereby granted, free of charge, to any person obtaining a
> - * copy of this software and associated documentation files (the "Software"),
> - * to deal in the Software without restriction, including without limitation
> - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> - * and/or sell copies of the Software, and to permit persons to whom the
> - * Software is furnished to do so, subject to the following conditions:
> - *
> - * The above copyright notice and this permission notice (including the next
> - * paragraph) shall be included in all copies or substantial portions of the
> - * Software.
> - *
> - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> - * IN THE SOFTWARE.
> - *
> - */
> -
> -#include "igt.h"
> -#include "igt_sysfs.h"
> -#include <errno.h>
> -#include <limits.h>
> -#include <stdbool.h>
> -#include <stdio.h>
> -#include <string.h>
> -
> -#include "drm_fourcc.h"
> -
> -
> -enum color {
> -	RED,
> -	GREEN,
> -};
> -
> -typedef struct {
> -	int drm_fd;
> -	igt_display_t display;
> -	struct igt_fb fb_green, fb_red;
> -	igt_plane_t *primary;
> -} data_t;
> -
> -static void assert_color(int dir, enum color color)
> -{
> -	unsigned int r, g, b;
> -
> -	igt_require_f(igt_sysfs_scanf(dir,
> -				      "i915_sink_crc_eDP1",
> -				      "%4x%4x%4x",
> -				      &r, &g, &b) == 3,
> -		      "Sink CRC is unreliable on this machine. Try manual debug with --interactive-debug=no-crc\n");
> -
> -	/* Black screen is always invalid */
> -	igt_assert_neq(r | g | b, 0);
> -
> -	switch (color) {
> -	case RED:
> -		igt_assert_lt(0, r);
> -		igt_assert_eq(0, g);
> -		igt_assert_eq(0, b);
> -		igt_debug("sink CRC for red %.4x%.4x%.4x\n", r, g, b);
> -		break;
> -	case GREEN:
> -		igt_assert_eq(0, r);
> -		igt_assert_lt(0, g);
> -		igt_assert_eq(0, b);
> -		igt_debug("sink CRC for green %.4x%.4x%.4x\n", r, g, b);
> -		break;
> -	default:
> -		igt_fail(IGT_EXIT_FAILURE);
> -	}
> -}
> -
> -static void basic_sink_crc_check(data_t *data)
> -{
> -	int dir;
> -
> -	dir = igt_debugfs_dir(data->drm_fd);
> -
> -	/* Go Green */
> -	igt_plane_set_fb(data->primary, &data->fb_green);
> -	igt_display_commit(&data->display);
> -
> -	/* It should be Green */
> -	assert_color(dir, GREEN);
> -
> -	/* Go Red */
> -	igt_plane_set_fb(data->primary, &data->fb_red);
> -	igt_display_commit(&data->display);
> -
> -	/* It should be Red */
> -	assert_color(dir, RED);
> -
> -	close(dir);
> -}
> -
> -static void run_test(data_t *data)
> -{
> -	igt_display_t *display = &data->display;
> -	igt_output_t *output;
> -	drmModeModeInfo *mode;
> -	enum pipe pipe;
> -
> -	for_each_pipe_with_valid_output(display, pipe, output) {
> -		drmModeConnectorPtr c = output->config.connector;
> -
> -		if (c->connector_type != DRM_MODE_CONNECTOR_eDP)
> -			continue;
> -
> -		igt_output_set_pipe(output, pipe);
> -
> -		mode = igt_output_get_mode(output);
> -
> -		igt_create_color_fb(data->drm_fd,
> -				    mode->hdisplay, mode->vdisplay,
> -				    DRM_FORMAT_XRGB8888,
> -				    LOCAL_I915_FORMAT_MOD_X_TILED,
> -				    0.0, 1.0, 0.0,
> -				    &data->fb_green);
> -
> -		igt_create_color_fb(data->drm_fd,
> -				    mode->hdisplay, mode->vdisplay,
> -				    DRM_FORMAT_XRGB8888,
> -				    LOCAL_I915_FORMAT_MOD_X_TILED,
> -				    1.0, 0.0, 0.0,
> -				    &data->fb_red);
> -
> -		data->primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> -
> -		basic_sink_crc_check(data);
> -		return;
> -	}
> -
> -	igt_skip("no eDP with CRC support found\n");
> -}
> -
> -igt_simple_main
> -{
> -	data_t data = {};
> -
> -	igt_skip_on_simulation();
> -
> -	data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> -
> -	kmstest_set_vt_graphics_mode();
> -	igt_display_init(&data.display, data.drm_fd);
> -
> -	run_test(&data);
> -
> -	igt_display_fini(&data.display);
> -}
> diff --git a/tests/meson.build b/tests/meson.build
> index 704bd13f..abf38a15 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -180,7 +180,6 @@ test_progs = [
>  	'kms_rmfb',
>  	'kms_rotation_crc',
>  	'kms_setmode',
> -	'kms_sink_crc_basic',
>  	'kms_sysfs_edid_timing',
>  	'kms_tv_load_detect',
>  	'kms_universal_plane',
> -- 
> 2.17.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

      parent reply	other threads:[~2018-07-16 17:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-14 23:39 [igt-dev] [PATCH i-g-t] tests/sink_crc: Remove kms_sink_crc_basic Dhinakaran Pandiyan
2018-07-15  0:05 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-07-15  1:06 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-07-16 17:25 ` Rodrigo Vivi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180716172545.GF4262@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).