• Mark Yacoub's avatar
    drm/amdgpu: Ensure that the modifier requested is supported by plane. · f4a9be99
    Mark Yacoub authored
    On initializing the framebuffer, call drm_any_plane_has_format to do a
    check if the modifier is supported. drm_any_plane_has_format calls
    dm_plane_format_mod_supported which is extended to validate that the
    modifier is on the list of the plane's supported modifiers.
    
    The bug was caught using igt-gpu-tools test: kms_addfb_basic.addfb25-bad-modifier
    
    Tested on ChromeOS Zork by turning on the display, running an overlay
    test, and running a YT video.
    
    === Changes from v1 ===
    Explicitly handle DRM_FORMAT_MOD_INVALID modifier.
    
    Cc: Alex Deucher <alexander.deucher@amd.com>
    Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
    Signed-off-by: default avatarMark Yacoub <markyacoub@chromium.org>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    f4a9be99
amdgpu_display.c 43.9 KB