summaryrefslogtreecommitdiff
path: root/tests/fbdev.c
AgeCommit message (Collapse)Author
2021-11-08tests/fbdev: Add debug traces to subtest panPetri Latvala
This helps debugging https://gitlab.freedesktop.org/drm/intel/-/issues/4435 Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
2021-11-01tests/fbdev: Add tests for display panningThomas Zimmermann
Add tests that perform panning / page flip operations on an fbdev device. Panning should work when the viewport wi within the virtual screen and fail otherwise. v4: * return early if PAN ioctl failed in pan_test() v3: * moved ioctls and assertions into helper (Ville) * set FB_VMODE_YWRAP for rsp tests * additional comments on YWRAP v2: * set offset to respect panning offsets (Ville) * respect FB_VMODE_YWRAP (Ville) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2021-11-01tests/fbdev: Test for validity of video mode settingsThomas Zimmermann
Add basic tests for video mode resolution and color on fbdev devices. v2: * respect FB_VMODE_YWRAP (Ville) * test horizontal resolution against line length Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2020-11-24tests/fbdev: Flip assertion for an unmet memchr()Chris Wilson
The last unaligned test, looks for the target character in the tail of the buffer, where it is not expected to be found. We should be asserting that the memchr() returned NULL. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-11-23tests/fbdev: Add tests for read/writing with NULL-pointer buffersThomas Zimmermann
Trying to read and write with a NULL-pointer buffer should fail and report EFAULT. v6: * actually replace igt_require() (Petri) v4: * replace igt_require() by igt_assert() in "nullptr" (Petri) * add nullptr test to CI v3: * put igt_describe() before igt_subtest() (Petri) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-11-23tests/fbdev: Add tests for accessing framebuffer near EOFThomas Zimmermann
Fbdev has some specific behavior when reading/writing near the EOF, which the eof test checks. If at least one bytes has been written, the number of bytes has to be returned, otherwise an error code (if any) has to be returned, or otherwise 0 has to returned. Not all drivers get this right. v4: * replace igt_require() by igt_assert() in "eof" (Petri) * add eof test to CI v3: * put igt_describe() before igt_subtest() (Petri) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-11-23tests/fbdev: Add tests for unaligned writes on framebuffer memoryThomas Zimmermann
The tests for unaligned writes start and stop writing within pages. v6: * remove test from fast-feedback.testlist v4: * replace igt_require() by igt_assert() in "unaligned-write" (Petri) * clarify error message about framebuffer size (Petri) * add unaligned-write test to CI v3: * put igt_describe() before igt_subtest() (Petri) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-11-23tests/fbdev: Add tests for write operations on framebufferThomas Zimmermann
The write tests check the written buffer against the content of the mapped framebuffer. v4: * replace igt_require() by iqt_assert() in "write" (Petri) * add write test to CI v3: * put igt_describe() before igt_subtest() (Petri) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-11-23tests/fbdev: Add tests for unaligned reads on framebuffer memoryThomas Zimmermann
The tests for unaligned reads start and stop reading within pages. v6: * remove test from fast-feedback.testlist v4: * declare pagesize as volatile * test sysconf() success with igt_require() (Petri) * clarify error message about frambuffer size (Petri) * replace igt_require() by igt_assert() in "unaligned-read" (Petri) * add unaligned-read test to CI v3: * put igt_describe() before igt_subtest() (Petri) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-11-23tests/fbdev: Add tests for read operations on framebufferThomas Zimmermann
The read tests check the read buffer against the content of the mapped framebuffer. v4: * test malloc() success with igt_require() * replace igt_require() by igt_assert() in "read" (Petri) * add read test to CI v3: * put igt_describe() before igt_subtest() (Petri) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-11-23tests/fbdev: Map framebuffer in igt_fixtureThomas Zimmermann
The mapping of the framebuffer memory will be useful for read/write tests. Move it into an igt_fixture block. v4: * declare map as volatile (Petri) * test struct fb_fix_screeninfo.smem_len with igt_assert() * remove mmap test from CI Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-11-23tests/fbdev: Move existing tests into separate subgroupsThomas Zimmermann
Move the existing tests into subgroups for testing modesetting and accessing the framebuffer. v5: * test mmap() with igt_assert() (Daniel, Chris) v4: * declare fd as volatile (Petri) * add info test to CI v3: * put igt_describe() before igt_subtest() and igt_subtest_group() (Petri) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-10-30fbdev: Force module loadChris Wilson
If there are no /dev/fbN, force loading of the first available drm module and try again. v2: Use drm_load_module() directly Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2582 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-11-14tests: Add exercise for fbdevChris Wilson
I broke fb_mmap() proving that we need a test in CI! References: https://bugs.freedesktop.org/show_bug.cgi?id=112256 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>