• T
    drm/ttm: Fix memory space allocation v2 · e30f3963
    Thomas Hellstrom 提交于
    In the event that TTM doesn't find a compatible memory type for the
    driver's first placement choice (placement without eviction), TTM
    returns -EINVAL without trying the driver's second choice.
    This causes problems on vmwgfx when VRAM is disabled before first modeset
    and during VT switches when fbdev is not enabled.
    
    Fix this by also trying the driver's second choice before returning
    -EINVAL.
    
    v2: Also check that man->use_type is true for the driver's second choice.
    Fixes a bug where disallowed memory types could be used.
    Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: NBrian Paul <brianp@vmware.com>
    Reviewed-by: NSinclair Yeh <syeh@vmware.com>
    e30f3963
ttm_bo.c 41.6 KB