[igt-dev] [i-g-t V2] tests/kms_dither: Make dither tests generic
Mark Yacoub
markyacoub at chromium.org
Fri Jul 16 16:12:21 UTC 2021
lgtm. Thanks!
On Fri, Jul 16, 2021 at 11:51 AM Bhanuprakash Modem
<bhanuprakash.modem at intel.com> wrote:
>
> As dithering is not Intel specific, it would be good to make
> these tests generic, so that it can be easy to extend/re-use
> for other platforms.
>
> V2:
> * Use igt_require_intel() instead of igt_require(is_i915_device())
>
> Cc: Uma Shankar <uma.shankar at intel.com>
> Cc: Mark Yacoub <markyacoub at chromium.org>
> Cc: Harry Wentland <harry.wentland at amd.com>
Reviewed-by: Mark Yacoub <markyacoub at chromium.org>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
> ---
> tests/kms_dither.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tests/kms_dither.c b/tests/kms_dither.c
> index 49f7935268..ae21cc7660 100644
> --- a/tests/kms_dither.c
> +++ b/tests/kms_dither.c
> @@ -93,6 +93,8 @@ static dither_status_t get_dither_state(data_t *data)
> dir = igt_debugfs_dir(data->drm_fd);
> igt_assert(dir >= 0);
>
> + igt_require_intel(data->drm_fd);
> +
> res = igt_debugfs_simple_read(dir, "i915_display_info", buf, sizeof(buf));
> igt_require(res > 0);
> close(dir);
> @@ -230,7 +232,7 @@ igt_main
> data_t data = { 0 };
>
> igt_fixture {
> - data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> + data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> kmstest_set_vt_graphics_mode();
>
> igt_display_require(&data.display, data.drm_fd);
> --
> 2.20.1
>
More information about the igt-dev
mailing list