summaryrefslogtreecommitdiff
path: root/tests/drm_read.c
AgeCommit message (Collapse)Author
2019-02-27igt/drm_read: Exercise waking up the next waiterChris Wilson
Try to hit a bug in the kernel whereby a short reader does not wakeup the next waiter (on the same fd) leading to forever blocking. 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-10-01igt: Require a display (KMS enabled) for KMS testsChris Wilson
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>
2017-10-16tests/drm_read: Change tests to not require fbconMaarten Lankhorst
The first active pipe might not be pipe A, and we shouldn't rely on fbcon for a working crtc. Use igt_kms to set up something basic, and use the kmstest helper to get an event from the correct pipe. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-25tests/drm_read: Drop DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_IDTomeu Vizoso
So the test runs on other drivers, drop the usage of the i915-specific DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID ioctl. Wait for a vblank event on pipe0 and if we get it, then the test can proceed (code copied from kms_vblank). Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.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-14lib: Add wrapper for DRM_IOCTL_MODE_CREATE_DUMBTomeu Vizoso
In order to test drivers that don't have support for proper buffer objects, add a wrapper for creating dumb buffer objects that will be called from the lib code for those subtests that don't need to care. 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-25igt/drm_read: Clear O_NONBLOCK between testsChris Wilson
Ensure that O_NONBLOCK isn't accidentally set when we want a nonblocking file descroptor. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-11-25igt/drm_read: Check handling of pagefault on destination bufferChris Wilson
In theory, this should force i915_gem_fault() when we first use the buffer (and not at mmap time) and so prevent a __copy_to_user_inatomic() from writting to the buffer. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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-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>
2014-12-08igt/drm_read: Require that pipe 0 is activeChris Wilson
As we require a pipe enabled to generate vblanks, the first step is to then to check that pipe 0 is active or else skip the test. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-05igt/drm_read: Abuse read(drm)Chris Wilson
Check that the more obvious userspace error conditions are handled by the kernel, ideally without loss of data. These include nonblocking waits, passing invalid buffers and passing buffers of the incorrect length. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>