Permalink
Switch branches/tags
Commits on Jan 6, 2017
  1. i965: map/unmap DRIimage helpers

    varadgautam committed Jan 6, 2017
    Signed-off-by: Varad <varadgautam@gmail.com>
  2. i965: support format and modifier queries

    varadgautam committed Jan 6, 2017
    modifier list as per vsyrjala/fb_format_dedup_2_ccs, ccs only
    supported for rgb8888 fmts on gen9+.
    
    v2
    
    Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
  3. i965: import with dmabuf modifiers

    varadgautam committed Jan 6, 2017
    Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
Commits on Jan 4, 2017
  1. wip: fix DRIimageExtension version clash

    varadgautam committed Dec 6, 2016
    make queryDmaBuf{Formats,Modifiers} => DRIimage v16 to avoid clash with
    createImageWithModifiers.
    
    Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
  2. egl: advertise EGL_EXT_image_dma_buf_import_modifiers

    varadgautam committed Nov 14, 2016
    Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
  3. egl: implement eglQueryDmaBufModifiersEXT

    varadgautam committed Nov 23, 2016
    query and return supported dmabuf format modifiers for
    EGL_EXT_image_dma_buf_import_modifiers.
    
    Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
  4. st/dri: support format modifier queries

    varadgautam committed Nov 23, 2016
    ask the driver for supported modifiers for a given format.
    
    bump __DRI_IMAGE implementation version to 15.
    
    Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
  5. egl: implement eglQueryDmaBufFormatsEXT

    varadgautam committed Nov 24, 2016
    ***
    allow egl clients to query the dmabuf formats supported on this platform.
    
    Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
    Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
  6. st/dri: support format queries

    varadgautam committed Nov 23, 2016
    ask the driver for supported dmabuf formats
    
    Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
  7. gallium: introduce dmabuf format and modifier querying

    varadgautam committed Nov 23, 2016
    ***
    this allows drivers to be queried for supported formats and format
    modifiers. drivers that implement these queries must expose these under
    PIPE_CAP_QUERY_DMABUF_ATTRIBS.
    
    Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
  8. dri: add queryDmaBufFormats and queryDmaBufModifiers to DRIimage

    varadgautam committed Nov 23, 2016
    these allow querying the driver for supported dmabuf formats and
    modifiers.
    
    Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
  9. egl_dri2: add support for using modifier attributes in eglCreateImageKHR

    varadgautam committed Nov 23, 2016
    allow creating EGLImages with dmabuf format modifiers when target is
    EGL_LINUX_DMA_BUF_EXT for EGL_EXT_image_dma_buf_import_modifiers.
    
    v2:
     - clear modifier assembling and error label name (Eric Engestrom)
    v3:
     - remove goto jumps within switch-case (Emil Velikov)
     - treat zero as valid modifier (Daniel Stone)
     - ensure same modifier across all dmabuf planes (Emil Velikov)
    
    Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
    Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
  10. st/dri: implement DRIimage creation from dmabufs with modifiers

    varadgautam committed Nov 14, 2016
    ***
    support importing dmabufs into DRIimage taking format modifiers in
    account, as per DRIimage extension version 15.
    (14 == createImageWithModifiers)
    
    Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
  11. dri: support DRIimage creation from dmabufs with modifiers

    ppaalanen authored and varadgautam committed Nov 14, 2016
    add createImageFromDmaBufs2 function which accepts per-plane dmabuf
    format modifiers.
    
    * DRIimage version 15
    
    Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
    Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
  12. egl/main: add support for fourth plane tokens

    ppaalanen authored and varadgautam committed Sep 23, 2015
    The EGL_EXT_dma_buf_import_modifiers extension adds support for a
    fourth plane, just like DRM KMS API does.
    
    Bump maximum dma_buf plane count to four.
    
    v2: prevent attribute tokens from being parsed if
        EXT_image_dma_buf_import_modifiers is not suported. (Emil Velikov)
    
    Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
    Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
  13. egl: update eglext.h

    varadgautam committed Nov 11, 2016
    update eglext.h to revision 33288 from Khronos
    
    Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
  14. egl: introduce DMA_BUF_MAX_PLANES

    ppaalanen authored and varadgautam committed Sep 23, 2015
    Rather than hardcoding 3, use a #define. Makes it easier to bump this
    later to 4.
    
    Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
    Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Commits on Jan 3, 2017
  1. i965: Handle compression modifier

    bwidawsk committed Oct 7, 2016
    FINISHME: Use the kernel's final choice for the fb modifier
    
    bwidawsk@norris2:~/intel-gfx/kmscube (modifiers $) ~/scripts/measure_bandwidth.sh ./kmscube none
    Read bandwidth: 603.91 MiB/s
    Write bandwidth: 615.28 MiB/s
    bwidawsk@norris2:~/intel-gfx/kmscube (modifiers $) ~/scripts/measure_bandwidth.sh ./kmscube ytile
    Read bandwidth: 571.13 MiB/s
    Write bandwidth: 555.51 MiB/s
    bwidawsk@norris2:~/intel-gfx/kmscube (modifiers $) ~/scripts/measure_bandwidth.sh ./kmscube ccs
    Read bandwidth: 259.34 MiB/s
    Write bandwidth: 337.83 MiB/s
    
    v2: Move all references to the new fourcc code(s) to this patch.
    
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Acked-by: Daniel Stone <daniels@collabora.com>
  2. i965: Remove scanout restriction from lossless compression

    bwidawsk committed Nov 29, 2016
    v2: Try to keep the assert as recommended by Topi. This requires
    modifying the num_samples check to be <= 1 because internally created
    buffers set num_samples = 0.
    
    Cc: Topi Pohjolainen <topi.pohjolainen@intel.com>
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Acked-by: Daniel Stone <daniels@collabora.com>
  3. i965: Use partial resolves for CCS buffers being scanned out

    bwidawsk committed Nov 16, 2016
    On Gen9 hardware, the display engine is able to scanout a compressed
    framebuffer by providing an offset to auxiliary compression information.
    Unfortunately, the hardware is incapable of doing the same thing for the
    fast clear color.
    
    To mitigate this, the hardware introduced a new resolve type called a
    partial resolve. The partial resolve will only do a resolve of the fast
    clear color and leave the rest of the compressed data alone.
    
    This patch enables using this resolve type for cases where the
    framebuffer will be passed along to the kernel for display.
    
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Acked-by: Daniel Stone <daniels@collabora.com>
  4. i965: Add new resolve hints full and partial

    bwidawsk committed Nov 16, 2016
    Upper layers of the code will have the need to specify full or partial
    resolves (more on this in the next patch). This code simply adds the new
    enums and plumbs it in as minimally as necessary.
    
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Acked-by: Daniel Stone <daniels@collabora.com>
  5. i965: Plumb resolve hints from miptrees to blorp

    bwidawsk committed Nov 16, 2016
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Acked-by: Daniel Stone <daniels@collabora.com>
  6. i965: Change resolve flags to enum

    bwidawsk committed Nov 16, 2016
    In the foreseeable future it doesn't seem to make sense to have multiple
    resolve flags. What does make sense is to have the caller give an
    indication to the lower layers what it things should be done for
    resolve. The enum change distinguishes this binary selection.
    
    v2: Make setting the hint more concise (Topi)
    
    Cc: Topi Pohjolainen <topi.pohjolainen@gmail.com>
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Acked-by: Daniel Stone <daniels@collabora.com>
  7. i965: Make CCS stride match kernel's expectations

    bwidawsk committed Nov 30, 2016
    v2: Put the commit message as a comment (Topi)
    
    Cc: Topi Pohjolainen <topi.pohjolainen@gmail.com>
    Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Cc: Jason Ekstrand <jason@jlekstrand.net>
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Acked-by: Daniel Stone <daniels@collabora.com>
  8. i965: Pretend that CCS modified images are two planes

    bwidawsk committed Nov 11, 2016
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Acked-by: Daniel Stone <daniels@collabora.com>
  9. i965/miptree: Allocate mt earlier in update winsys

    bwidawsk committed Oct 25, 2016
    Allows us to continue utilizing common miptree creation using __DRIimage
    without creating a new DRIimage (for the intel_process_dri2_buffer()
    case).
    
    This is a bit ugly, but I think it's the best one can do.
    
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Acked-by: Daniel Stone <daniels@collabora.com>
  10. i965/miptree: Add a return for updating of winsys

    bwidawsk committed Oct 25, 2016
    There is nothing particularly useful to do currently if the update
    fails, but there is no point carrying on either. As a result, this has a
    behavior change.
    
    v2: Make the return type a bool (Topi)
    
    Cc: Topi Pohjolainen <topi.pohjolainen@intel.com>
    Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
    Acked-by: Daniel Stone <daniels@collabora.com>
  11. i965: Create correctly sized mcs for an image

    bwidawsk committed Nov 29, 2016
    v2: Leave "image+mod" (Topi)
    
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Acked-by: Daniel Stone <daniels@collabora.com>
  12. i965: Allocate tile aligned height

    bwidawsk committed Jan 3, 2017
    This patch shouldn't actually do anything because the libdrm function
    should already do this alignment. However, it preps us for a future
    patch where we add in the CCS AUX size, and in the process it serves as
    a good place to find bisectable issues if libdrm or kernel does
    something incorrectly.
    
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Acked-by: Daniel Stone <daniels@collabora.com>
  13. i965: Support all known modifiers

    bwidawsk committed Jan 3, 2017
    This patch adds support for handling X tiled modifier. This isn't
    particularly useful but it makes our code complete.
    
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Acked-by: Daniel Stone <daniels@collabora.com>
  14. i965/miptree: Allocate mcs_buf for an image's CCS_E

    bwidawsk committed Oct 17, 2016
    This code will disable actually creating these buffers for the scanout,
    but it puts the allocation in place.
    
    Primarily this patch is split out for review, it can be squashed in
    later if preferred.
    
    assert(mt->offset == 0) in ccs creation (as requested by Topi)
    
    Cc: Topi Pohjolainen <topi.pohjolainen@intel.com>
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Acked-by: Daniel Stone <daniels@collabora.com>
  15. i965/miptree: Add a helper functions for image creation

    bwidawsk committed Oct 13, 2016
    This provides a common function or creating miptrees when there is an
    existing DRIimage to use. That provides an easy way to add CCS
    allocation.
    
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Acked-by: Daniel Stone <daniels@collabora.com>
  16. i965: Support images with offset aux buffers

    bwidawsk committed Nov 29, 2016
    Previously our aux buffers (MCS, and HiZ) never had an offset because
    they were in their own buffer object. When using the CCS lossless
    compression feature, it's desirable to store the data at an offset from
    the main framebuffer, ie. share a buffer object. This patch just makes
    having an aux offset possible.
    
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Acked-by: Daniel Stone <daniels@collabora.com>
  17. i965: Separate image allocation with modifiers

    bwidawsk committed Oct 6, 2016
    Since the code doesn't support modifiers yet, this patch should do
    nothing other than prepare for more patches.
    
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Acked-by: Daniel Stone <daniels@collabora.com>
  18. i965: Bring back always Y-tiled on SKL+

    bwidawsk committed Aug 1, 2016
    commit 6a0d036
    Author: Ben Widawsky <ben@bwidawsk.net>
    Date:   Thu Apr 21 20:14:58 2016 -0700
    
        i965: Always use Y-tiled buffers on SKL+
    
    Aside from the benchmark gains that were initially posted, I was able to
    collect memory bandwidth data running kmscube (19x12 display).
    
    Without
    Writes:          6,583.58 MiB
    Reads:           6,540.93 MiB
    
    With Y-tiling:
    Writes:          5,361.78 MiB
    Reads            6,052.45 MiB
    
    Savings per frame
    Writes:  2 MiB
    Reads:  .8 MiB
    
    v2: Use new modifier mechanism, and expose new DRIimage version
    
    Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
    Acked-by: Daniel Stone <daniels@collabora.com>