• Jerome Glisse's avatar
    drm/radeon: fix tiling and command stream checking on evergreen v3 · d2609875
    Jerome Glisse authored
    Fix regresson since the introduction of command stream checking on
    evergreen (thread referenced below). Issue is cause by ddx allocating
    bo with formula width*height*bpp while programming the GPU command
    stream with ALIGN(height, 8). In some case (where page alignment does
    not hide the extra size bo should be according to height alignment)
    the kernel will reject the command stream.
    
    This patch reprogram the command stream to slice - 1 (slice is
    a derivative value from height) which avoid rejecting the command
    stream while keeping the value of command stream checking from a
    security point of view.
    
    This patch also fix wrong computation of layer size for 2D tiled
    surface. Which should fix issue when 2D color tiling is enabled.
    This dump the radeon KMS_DRIVER_MINOR so userspace can know if
    they are on a fixed kernel or not.
    
    https://lkml.org/lkml/2012/6/3/80
    https://bugs.freedesktop.org/show_bug.cgi?id=50892
    https://bugs.freedesktop.org/show_bug.cgi?id=50857
    
    !!! STABLE need a custom version of this patch for 3.4 !!!
    
    v2: actually bump the minor version and add comment about stable
    v3: do compute the height the ddx was trying to use
    
    [airlied: drop left over debug]
    Signed-off-by: default avatarJerome Glisse <jglisse@redhat.com>
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
    d2609875
radeon_drv.c 15 KB