Skip to content
  • Ville Syrjälä's avatar
    tests/kms_big_fb: Make sure huge fbs work correctly · f9961d14
    Ville Syrjälä authored
    
    
    Add various tests to excercise huge framebuffers. First some basic
    sanity checks that the kernel accepts/rejects good/bad addfb2 ioctls,
    and finally actual scanout tests to make sure we scan out the correct
    thing when panning around inside large framebuffers.
    
    The implementation is i915 specific for now since I chose to use
    rendercopy/blitter when generating the framebuffer contents. Using
    the normal cairo stuff was just too slow when dealing with 1GiB+
    framebuffers. It shouldn't be too hard to plug in some other mechanisms
    if someone else wants to reuse this test.
    
    v2: Add igt_require(format+mod) for the addfb/overflow tests
        Unset plane fb after TEST_ONLY fail
        Limit max fb to at most 1/2 RAM or GPU address space
        Tweak coords to avoid fails with 64bpp linear with 4k screen
        Make coords even for 90/270 rotated 16bpp
        Store bpp as uint8_t instead of wasting an entire char*
    v3: Add blitter path for gen3 (render engine is not capable of
        handling big fbs).
        Set fence tiling on gen2/3 in raw addfb tests.
        Deal with weak max fence stride on gen3.
        Don't try to use rotation when the prop isn't present.
        Skip 90/270 test for gen4 (no atomic on those yet so we
        can't neatly check what's supported).
        Kernel restricts scanout to mappable portion of ggtt on
        gmch platforms, so check its size as well
        Use the correct fb for the legacy setcrtc
    v4: Don't igt_skip() inside test_plane() (Daniel)
        Document that we expect the kernel to make
        sure max fb size is still renderable (Daniel)
    
    Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    f9961d14