Permalink
Switch branches/tags
Nothing to show
Commits on Dec 1, 2015
  1. intel: add the missing <strings.h> include

    android-x86 authored and evelikov committed Oct 30, 2015
    It defines the prototype of ffs that fixes the building error
    on Android 6.0 64-bit image.
    
    Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Commits on Nov 21, 2015
  1. amdgpu: Make amdgpu_cs_calculate_timeout() return something sensible …

    Tom St Denis Alex Deucher
    Tom St Denis authored and Alex Deucher committed Nov 17, 2015
    …on error
    
    Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
    Reviewed-by: Christian König <christian.koenig@amd.com>
  2. amdgpu: fix overflow for timeout calculation

    Jammy Zhou Alex Deucher
    Jammy Zhou authored and Alex Deucher committed Nov 17, 2015
    Set the timeout to AMDGPU_TIMEOUT_INFINITE when overflow happens
    
    Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
    Reviewed-by: Christian König <christian.koenig@amd.com>
Commits on Nov 16, 2015
  1. configure.ac: test for the same atomic function as the one we use

    evelikov committed Nov 16, 2015
    Unlikely that we'll hit a case where __sync_fetch_and_add is present
    while __sync_add_and_fetch isn't. Regardless let's keep things sane and
    consistent.
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
  2. configure.ac: rework compiler builtin atomic tests

    jonathangray authored and evelikov committed Aug 29, 2015
    The libdrm autoconf test for atomics uses __sync_val_compare_and_swap with
    the address of a function argument which triggers a gcc ICE on sparc64
    with the OpenBSD system compiler.
    
    Mark Kettenis pointed out that while other architectures probably spill the
    argument onto the stack this is likely not the case on register window
    architectures like SPARC and suggested passing a pointer as an argument
    instead which avoids the ICE and allows the drm libraries requiring
    atomics to build on sparc64 with the autoconf build.
    
    Reported-by: Christian Weisgerber <naddy@openbsd.org>
    Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
    Reviewed-by: Matthieu Herrb <matthieu@openbsd.org>
Commits on Nov 10, 2015
  1. radeon: Handle surface offsets exceeding 32 bits correctly

    Michel Dänzer Michel Dänzer
    Michel Dänzer authored and Michel Dänzer committed Sep 8, 2015
    The slice_size and bo_size fields were getting truncated to 32 bits.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Commits on Nov 5, 2015
  1. libdrm: Use userspace compatible type in fourcc_mod_code macro

    Tvrtko Ursulin authored and freedreno-zz committed Sep 23, 2015
    __u64 should be used instead of u64.
    
    Kernel headers originally pulled in:
    
    commit 8983fe5
    Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
    Date:   Mon Aug 3 10:48:03 2015 +0100
    
        libdrm: Add framebuffer modifiers uapi
    
    Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
    Cc: dri-devel@lists.freedesktop.org
    Cc: Rob Clark <robdclark@gmail.com>
    Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Rob Clark <robclark@freedesktop.org>
Commits on Nov 3, 2015
  1. intel: Cleanup SKL PCI ID definitions.

    bwidawsk committed Oct 22, 2015
    This removes ones which aren't used, and adds some new ones. I kept the original
    names where possible.
    
    Cc: Kristian Høgsberg <krh@bitplanet.net>
    Cc: Damien Lespiau <damien.lespiau@intel.com>
    Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
    Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
  2. intel: Add SKL GT4 PCI IDs

    bwidawsk committed Oct 22, 2015
    Cc: Kristian Høgsberg <krh@bitplanet.net>
    Cc: Damien Lespiau <damien.lespiau@intel.com>
    Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
    Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Commits on Oct 22, 2015
  1. amdgpu: Cleanly handle ENOMEM on result in amdgpu_bo_list_create()

    Tom St Denis Alex Deucher
    Tom St Denis authored and Alex Deucher committed Oct 9, 2015
    Move the allocation of result prior to the IOCTL so we can cleanly
    backtrack if the allocation fails.
    
    Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
  2. amdgpu: Fix use-after-free bug in vamgr_deinit

    Tom St Denis Alex Deucher
    Tom St Denis authored and Alex Deucher committed Oct 9, 2015
    This patch fixes a use-after-free bug in the vamgr_deinit function.
    
    Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
  3. amdgpu: Unlock mutex if base_required is invalid

    Tom St Denis Alex Deucher
    Tom St Denis authored and Alex Deucher committed Oct 9, 2015
    In the function amdgpu_vamgr_find_va() the function would return
    without unlocking the mutex if the base_required offset was below
    the va managers base offset.
    
    Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
    Reviewed-by: Christian König <christian.koenig@amd.com>
Commits on Oct 20, 2015
  1. drm: add virtgpu_drm.h

    Dave Airlie
    Dave Airlie committed Oct 20, 2015
    This is in drm-next now, so add to libdrm.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
  2. xf86drm: Handle unrecognized subsystems safely in drmGetDevice[s]()

    mattrope authored and evelikov committed Oct 16, 2015
    Both drmGetDevice() and drmGetDevices() currently print a warning when
    they encounter an unknown (non-PCI) subsystem type for a device node,
    but they still proceed to assume that the drmDevicePtr was initialized
    and try to add it to the local device array.  Add a 'continue' to the
    error case handling to bypass the rest of the processing for devices we
    can't handle.
    
    Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
  3. xf86drm: Fix error handling for drmGetDevice()

    mattrope authored and evelikov committed Oct 16, 2015
    Some of the error conditions in drmGetDevice() can lead to us calling
    closedir(NULL) or leaking memory.  Fix these conditions the same way we
    did for drmGetDevices() in commit:
    
            commit 8c4a1cb
            Author: Matt Roper <matthew.d.roper@intel.com>
            Date:   Wed Sep 30 09:30:51 2015 -0700
    
                xf86drm: Fix error handling for drmGetDevices()
    
    Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Commits on Oct 14, 2015
  1. Fix void pointer arithmetic in drmProcessPciDevice

    Michel Dänzer Michel Dänzer
    Michel Dänzer authored and Michel Dänzer committed Oct 14, 2015
    Arithmetic on void pointers is a GCC extension.
    
      CC       libdrm_la-xf86drm.lo
    ../xf86drm.c: In function 'drmProcessPciDevice':
    ../xf86drm.c:3017:10: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
         addr += sizeof(drmDevice);
              ^
    ../xf86drm.c:3020:10: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
         addr += DRM_NODE_MAX * sizeof(void *);
              ^
    ../xf86drm.c:3023:14: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
             addr += max_node_str;
                  ^
    ../xf86drm.c:3035:14: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
             addr += sizeof(drmPciBusInfo);
                  ^
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Commits on Oct 2, 2015
  1. xf86drm: Fix error handling for drmGetDevices()

    mattrope authored and evelikov committed Sep 30, 2015
    If the opendir() call in drmGetDevices() returns failure, we jump to an
    error label that calls closedir() and then returns.  However this means
    that we're calling closedir(NULL) which may not be safe on all
    implementations.  We are also leaking the local_devices array that was
    allocated before the opendir() call.
    
    Fix both of these issues by jumping to an earlier error label (to free
    local_devices) and guarding the closedir() call with a NULL test.
    
    Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
    [Emil Velikov: make the teardown symmetrical, remove the NULL check]
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Commits on Sep 28, 2015
  1. xf86drm: include <limits.h> for PATH_MAX

    doughdemon authored and evelikov committed Sep 26, 2015
    fixes compilation error with musl libc and Solaris based platforms.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92082
    Signed-off-by: Felix Janda <felix.janda@posteo.de>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Commits on Sep 21, 2015
  1. xf86drm: remove makedev() hack/workaround

    evelikov committed Aug 7, 2015
    Back when this was introduced commit 569da5a(Merged glxmisc-3-0-0)
    sys/sysmacros.h was used instead of the respecive headers (as per the
    manual).
    
    We've been handling it correctly for a little while now - in Linux, BSD
    and Solaris. Thus we can drop this workaround.
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
  2. exynos/fimg2d: remove g2d_context from public header

    tobiasjakobi authored and evelikov committed Sep 8, 2015
    All functions from the public API only operation on
    struct g2d_context*, so this shouldn't break too much.
    
    Make the context private since we don't want the
    user to modify its content directly. Also remove
    the defines that were only used for fields of
    g2d_context.
    
    Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
  3. exynos/fimg2d: add message prefix

    tobiasjakobi authored and evelikov committed Sep 8, 2015
    Add a prefix to the messages printed to the console via
    printf() and fprintf() so that one can easily see where
    the message comes from.
    
    Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
  4. exynos/fimg2d: make g2d_add_cmd() less heavy

    tobiasjakobi authored and evelikov committed Sep 8, 2015
    The function currently checks for each added command
    if an overflow of the corresponding command buffers
    occurs, but none of the callers ever checks the
    return value.
    
    Since all callers are now converted to use
    g2d_check_space() simplify the function.
    
    (1) The overflow checks become asserts, so they're only
        active for debug builds. This is fine since
        g2d_add_cmd() is not part of the public API.
    
    (2) Switch the return value to void.
    
    (3) Explicitly state that the caller has to check
        buffer space before calling g2d_add_cmd().
    
    Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
  5. exynos/fimg2d: remove superfluous initialization of g2d_point_val

    tobiasjakobi authored and evelikov committed Sep 8, 2015
    The g2d_point_val union consists of two coordinates of 16
    bits. Whenever this union is used though, both coordinates
    are explicitly set. Hence prior initialization is unnecessary.
    
    Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
  6. exynos/fimg2d: remove default case from g2d_get_blend_op()

    tobiasjakobi authored and evelikov committed Sep 8, 2015
    We now validate the blending mode via g2d_validate_mode()
    prior to feeding it to g2d_get_blend_op().
    
    Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
  7. exynos/fimg2d: add g2d_validate_xyz() functions

    tobiasjakobi authored and evelikov committed Sep 8, 2015
    The G2D headers define a number of modes through enums
    (like e.g. color, select, repeat, etc.).
    
    This introduces g2d_validate_select_mode() and
    g2d_validate_blending_op() which validate a
    select mode or blending operation respectively.
    
    Use this together with g2d_check_space() in
    g2d_{blend,scale_and_blend}().
    
    For this we move parameter validation to the top and
    also validate the select mode of the source image and
    the requested blending operation before starting
    command submission.
    
    Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
  8. exynos/fimg2d: add g2d_check_space()

    tobiasjakobi authored and evelikov committed Sep 8, 2015
    This is going to be used to check if the command buffers have
    enough space left prior to actual submission of the commands.
    
    Use this in g2d_{solid_fill,copy,copy_with_scale}().
    
    For this the parameter validation before buffer space
    checking so that we can exit early if it fails.
    Also don't reset the G2D context in this situation since
    the buffers are not partially submitted anymore.
    
    The repeat mode in g2d_copy_with_scale() is checked first
    to make computation of space easier.
    
    Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
  9. exynos/fimg2d: simplify base address submission in g2d_scale_and_blend()

    tobiasjakobi authored and evelikov committed Sep 8, 2015
    Use g2d_add_base_addr() for source and destination base
    address just like all other calls.
    
    Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
  10. exynos/fimg2d: fix empty buffer handling in g2d_flush()

    tobiasjakobi authored and evelikov committed Sep 8, 2015
    Empty command buffers are no error, we just don't have
    anything to do for flushing then.
    
    Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
  11. Fix SunOS/NetBSD atomic macro

    evelikov committed Sep 21, 2015
    Reported-by: Evgeny Litvinenko <evgeny.v.litvinenko@gmail.com>
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
  12. tests/drmdevice: add drm{Get,Free}Device() example

    evelikov committed Sep 9, 2015
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>
  13. xf86drm: add drm{Get,Free}Device

    evelikov committed Sep 9, 2015
    Similar interface to the *Devices() ones but they obtain/free the
    information of the opened device (as given by its fd).
    
    Note there is a fair bit of duplication between the two Get functions,
    and anyone interested is more than welcome to consolidate it.
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>
  14. xf86drm: split out drmProcessPciDevice and drmFoldDuplicatedDevices

    evelikov committed Sep 9, 2015
    Will be reused in the next commit.
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>
  15. xf86drm: warn on missing drmGetMinorNameForFD implementation

    evelikov committed Sep 7, 2015
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>
  16. xf86drm: move ifdef __linux__ guards where needed

    evelikov committed Sep 7, 2015
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>
  17. xf86drm: rework drmGetDevices()

    evelikov committed Sep 7, 2015
    Do a once off memory allocation for each drmDevice.
    
    This allows us to ease the error handling and simplify the
    de-duplication loop. As part of this we need to rework drmFreeDevice()
    such so that it frees the relevant hunks, rather than leaving that to
    the caller.
    
    Some memory stats from the drmdevice test
    
    before: 22 allocs, 22 frees, 66,922 bytes allocated
    after:   9 allocs, 9 frees, 66,436 bytes allocated
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>