Age | Commit message (Collapse) | Author |
|
The i915 specific feature requirements that would have failed subtests
from kms_plane, kms_plane_multiple and kms_plane_scaling have been
conditionally guarded against. These tests can now be run on AMDGPU
with the i915 specific tests skipped appropriately.
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
|
|
The plane_scaling subtests are capable of running on AMDGPU when
not using i915 specific tiling formats and when the test only requires
one scaler per pipe.
This patch removes the forced i915 devid and gen checks from non i915
devices. It also adds logic for getting the number of scalers per pipe
in a way that doesn't only depend on devid. One scaler per pipe is
assumed for AMDGPU.
There isn't any specific reason that the x-tiled formats need to be
used on the non-rotation tests on i915 but this patch keeps the
existing test behavior. It's a little simpler to keep it this way for
the prepare_crtc helper that's shared between the scaling test
and the clipping/clamping test.
v2: Use igt_plane_has_format_mod helper (Ville)
v3: Use helpers to check x-tiled support (Ville)
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Simple rule of thumb, if a kms_* test calls igt_display_init() in its
global fixture, skip the entire test if the driver has disabled KMS.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
Test DRM_FORMAT_RGB565 rotation when gen is 11 or higher.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
The 9x9 was maybe a workaround for the kernel's rounding behaviour?
The kernel was changed so that's no longer necessary. So let's go
for 8x8 since that actually works with YUV formats.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> #irc
|
|
YUV formats require the clipped src coordinates to be suitably aligned.
We'd need to very carefully compute the unclipped dst coordinates to
guarantee that. That's too much hassle so let's just accept failure in
case YUV formats are used.
v2: Actually remove the original igt_display_commit2() (Maarten)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> #irc
|
|
Modesetting requires DRM_MASTER privileges, so use
drm_open_driver_master() to assert that we do acquire them.
References: https://bugs.freedesktop.org/show_bug.cgi?id=105997
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
Per Bspec, fb height needs to be min 16 for NV12 (YUV planar
formats). We also need the src height and width to be
multiple of 4.
Reviewed-By: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
When the plane scaling is used with YUV 420 planar formats,
the height should be a minimum of 16 scanlines as per BSpec.
Minimum of 8 scanlines is for non-YUV 420 planar formats.
Patch changes the minimum fb height being used in the test
in case of YUV 420 planar (currently done for NV12, as
that is the only planar format supported)
v2: Addressed review comments from Maarten
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
itg_kms already defines an api that creates and colors a new fb, let's
use that instead of recreating that all over again.
Signed-off-by: Carlos Santa <carlos.santa@intel.com>
CC: Jyoti Yadav <jyoti.r.yadav@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
This makes it possible to iterate whether a format is supported or not,
without each driver having to open code it.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
|
|
This cleans up the tests slightly.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
|
|
Run across all combinations of pixel formats to ensure better testing.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
This will allow us to test NV12 as well, when available.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
This will allow support for NV12 in the future, where igt_get_cairo_ctx
will return a RGB image to draw with, which will be converted in
igt_put_cairo_ctx so tests don't have to add special support for NV12.
This is the same as cairo_destroy + checking for errors, but not all
tests use this correctly so it's better to have a single handler for it.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Add a subtest to display primary and overlay planes on two
connected pipes and runs scaling test on both pipes
Changes since v1:
- Commit first before trying any scaling. (Maarten)
- Use the same logic as kms_cursor_legacy to find a pipe and output. (Maarten)
- Rework test to work with how cleanup is handled. (Maarten)
Changes since v2:
- Use get_num_scalers() to only use 2 scalers if available. (Maarten)
Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com>
Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
This patch adds subtest to test scaler clipping and clamping
scenario.
Changes since v1:
- Modify test to work with the changes to kms_plane_scaling. (Maarten)
Changes since v2:
- Use get_num_scalers() to skip when needed.
Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com>
Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
formats, v3.
This patch adds subtest for testing scaling in combination with rotation
and pixel formats.
Changes since v1:
- Rework test to work with the other changes to kms_plane_scaling. (Maarten)
- Remove hardcodes for MIN/MAX_SRC_WIDTH, and use the value directly. (Maarten)
Changes since v2:
- Put rotation and tiling in an array. (Maarten)
Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com>
Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
The test only runs on gen9+, so we can safely replace all calls with
COMMIT_ATOMIC.
Also perform some cleanups by making fb an array, and cleaning up in
prepare_crtc. This way failed subtests won't cause failures in other
subtests.
Changes since v1:
- Rebase on top of num_scalers changes.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
The number of scalers can depend on the pipe, so require at least 1
scaler before running any subtests.
Changes since v1:
- More closely match kernel implementation. (Mika)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Convert the test to run subtests per pipe, before we start adding
more subtests.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
PIPEC doesnt have 3rd plane in GEN9. So, we skip the
3rd plane related scaling test where 2nd OVERLAY
plane is not available.
Restricting downscaling to (9/10)x original size of the
image to avoid "Max pixel rate limitation" of the hardware.
When testing with a resolution of 1024x768, the test fails
in iterate_plane_scaling because height becomes out of bounds.
Lastly, instead of a fixed test image, generate a test pattern
at runtime to not run into bxt's hardware limits for scaling.
Later patches in this series will cover corner cases of
scaling.
Changes since v1:
- Move out the code reshuffle to a separate commit. (Maarten)
This makes it more clear what's fixed.
Changes since v2:
- Fix iterate_plane_scaling on 1024x768. (Maarten)
- Instead of upscaling a test image, use the test pattern with a color. (Maarten)
Using a 600x600 test pattern doesn't run into BXT's
hardware limits for scaling.
Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com>
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
We will add more subtests in the future, it's more clear if we split
out the actual test to its own function first.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Commit ca20170afc6f ("tests/kms_plane_scaling: Add support for dynamic
number of planes") shifted the tested planes by one after the
refactoring, accidentally ignoring the first plane, which is zero
indexed. A symptom of the issue appears on KBL, where the third plane
is already the shared cursor, causing igt to configure an unsupported
framebuffer format on it, triggering the following error:
[drm:__setplane_internal] Invalid pixel format XR24 little-endian (0x34325258)
With this fixed, we can exposes the pixel clock scaling issue, which is
the actual problem being tracked in Bug 103159, but let's start by
reverting to the old behavior.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103159
Fixes: ca20170afc6f ("tests/kms_plane_scaling: Add support for dynamic number of planes")
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
|
|
Most of these tests have no reason to look at those members,
so try other ways of getting the information.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
This reverts commit 25fbae15262cf570e207e62f50e7c5233e06bc67, restoring
commit 301ad44cdf1b868b1ab89096721da91fa8541fdc
Author: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Thu Mar 2 10:37:11 2017 +0100
lib: Open debugfs files for the given DRM device
with fixes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This reverts commit 301ad44cdf1b868b1ab89096721da91fa8541fdc.
When a render-only device is opened and gem_quiescent_gpu is called, we
need to use the debugfs dir for the master device instead.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
When opening a DRM debugfs file, locate the right path based on the
given DRM device FD.
This is needed so, in setups with more than one DRM device, any
operations on debugfs files affect the expected DRM device.
v2: - rebased and fixed new API additions
v3: - updated chamelium test, which was missed previously
- use the minor of the device for the debugfs path, not the major
- have a proper exit handler for calling igt_hpd_storm_reset with the
right device fd.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Add changes reflecting the new support for dynamic number of planes per pipe.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
We've had support for universal planes since kernel version 3.15, so
there's not really a good reason to try supporting drivers that lack
plane support now. As well, the current has_universal_planes logic is
broken anyway as it makes the assumption that having display planes
always means we have both a primary plane and a cursor plane (this isn't
true on radeon/amdgpu and nouveau).
So, remove this, and just check for whether or not we have a cursor
plane.
Signed-off-by: Lyude <lyude@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
They're duplicates with src_x/y, so just use those.
Changes since v1:
- Fix order of parameters in calls to igt_fb_set_position.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
|
|
Use for_each_pipe_with_valid_output instead.
This may increase test time slightly on the affected tests, because now
outputs will be tested on every pipe instead of the first pipe. This
will increase test coverage to all usable pipes though, so it shouldn't
be an issue.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
|
|
Several tests do one or more of the following:
* igt_create_fb() + igt_paint_test_pattern()
* igt_create_color_fb() + igt_paint_test_pattern()
* igt_create_fb() + igt_paint_image()
Extract them into new helpers: igt_create_pattern_fb(),
igt_create_color_pattern_fb(), igt_create_image_fb().
v2: Fix typos, and improve API docs (Thomas)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Signed-off-by: Daniel Stone <daniels@collabora.com>
|
|
Apply the new API to all call sites within the test suite using the following
semantic patch:
// Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls
@@
identifier i =~ "\bdrm_open_any\b";
@@
- i()
+ drm_open_driver(DRIVER_INTEL)
@@
identifier i =~ "\bdrm_open_any_master\b";
@@
- i()
+ drm_open_driver_master(DRIVER_INTEL)
@@
identifier i =~ "\bdrm_open_any_render\b";
@@
- i()
+ drm_open_driver_render(DRIVER_INTEL)
@@
identifier i =~ "\b__drm_open_any\b";
@@
- i()
+ __drm_open_driver(DRIVER_INTEL)
Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Add a header that includes all the headers for the library. This allows
reorganisation of the library without affecting programs using it and
also simplifies the headers that need to be included to use the library.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
This patch is adding i-g-t plane scaling test case to test couple basic
display plane scaling usages. Additional test scenarios can be added later.
v2:
-Added iterative scaling to visually observe scaling (me)
v3:
-Added a flag to control primary plane scaling (me)
v4:
-Use new tiled types when calling igt_create_fb (me)
Signed-off-by: chandra konduru <chandra.konduru@intel.com>
[Thomas: convert test to use igt_simple_main]
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|