summaryrefslogtreecommitdiff
path: root/tests/kms_addfb_basic.c
AgeCommit message (Collapse)Author
2019-03-01tests/kms_addfb_basic: Check that only the owner can rmfbDaniel Vetter
Just realized we don't seem to have any testcase for this. Fill this gap asap! v2: Use igt_device_set/drop_master (Chris) v3: Use "" for local includes (Chris) Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1) Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2018-09-14igt/kms_addfb_basic: Skip if the KMS interface is not supportedChris Wilson
Some drivers and some hardware do not support KMS and so the addfb ioctls are expected to fail. However, since they are expected to fail with a specific errno (ENOTSUP) in the case KMS is not supported on the fd, we can check for that and skip the tests where they are not appropriate. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-09-06igt/kms_addfb_basic: Exercise legacy interface to addfb2Chris Wilson
The legacy interface passes in a single handle, and instead of providing the pixel_format fourcc, passes in a bpp/depth combination that the kernel translates into a fourcc. If that is an illegal combination, the kernel should be reporting EINVAL rather than pass an unknown framebuffer to the drivers. As the number of possible permutations of bpp/depth (both are strictly u32 parameters) is huge, we simply fuzz the interface for 1s. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-12-31igt/kms_addfb_basic: Try changing tiling on the framebuffer [addfb2]Chris Wilson
If we request the object to be tiled with the same tiling as it currently has, the kernel may spot the no-op and report success. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-30igt/kms_addfb_basic: Try changing tiling on the framebufferChris Wilson
If we request the object to be tiled with the same tiling as it currently has, the kernel may spot the no-op and report success. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-07tests/kms_addfb_basic: Add invalid tests to set fb propsDaniel Vetter
There's no properties on fb modeset objects, bug bugs in the kernel when trying to use those ioctls in such an invalid way. Cc: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-05-06tests/kms_addfb_basic: Move tiling tests into their own groupsTomeu Vizoso
So those subtests that require tiling don't cause unrelated subtests to be skipped. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-04-15tests/kms_addfb_basic: Set tiling in addfb25 subtestTomeu Vizoso
When moving the call to gem_set_tiling into the subtests, the one needed by addfb25-framebuffer-vs-set-tiling was left out. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2016-04-14tests: Open any driverTomeu Vizoso
For those tests that now pass on drivers other than i915, call drm_open_driver_master with DRIVER_ANY. Also do so from igt_enable_connectors. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14kms_addfb_basic: Get intel gen from within subtestTomeu Vizoso
Because determining the Intel GFX generation requires a call to DRM_IOCTL_I915_GETPARAM, move the code that requires it to a subtest that can be skipped on drivers other than i915. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14kms_addfb_basic: Move calls to gem_set_tiling to the subtestsTomeu Vizoso
So they don't cause unrelated subtests to be skipped when testing drivers other than i915. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14kms_addfb_basic: Split tiling_tests offTomeu Vizoso
Move tests requiring tiled BOs to the end so they don't cause unrelated subtests to be skipped when testing drivers with only dumb buffer support. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14kms_addfb_basic: move tiling functionality into each subtestTomeu Vizoso
Because calls to gem_set_tiling will cause the subtest to be skipped on drivers other than i915, move them to each subtest that needs them so the other subtests aren't skipped as well. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14kms_addfb_basic: call igt_create_bo_with_dimensionsTomeu Vizoso
Many tests can do their work on drivers other than i915 and even with just dumb buffers, so call igt_create_bo_with_dimensions instead of gem_create which will paper out the differences and call the proper ioctls or cause the subtest to be skipped if that's not possible. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-11-16tests/kms_addfb_basic: Add clobbered-modifier subtestVille Syrjälä
Make sure the kernel doesn't clobber the modifiers when the user didn't pass any. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocciMicah Fedke
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>
2015-09-08kms_addfb_basic: Require fb modifiers for unused field testsAnder Conselvan de Oliveira
The drm core doesn't check unused fields of ADDFB2 for pre-FB_MODIFIERS userspace, so use igt_require_fb_modifiers(). Also, the size of the ioctl changed with the addition of the modifiers, so it is necessary to use the LOCAL_ version of it, otherwise some data may get truncated. v2: Improve commit message. (Thomas) Remove one spurious change to use LOCAL_DRM_IOCTL_ADDFB2. (Thomas) Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21lib: add a single include headerThomas Wood
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>
2015-08-14tests/kms_addfb: mark simple fb creation tests as basic v2Jesse Barnes
We should always be able to create simple and tiled objects. v2: make the whole test basic (Daniel) add to .gitignore Reviewed-by: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>