Skip to content
  1. Nov 08, 2017
  2. Nov 07, 2017
  3. Nov 06, 2017
    • Arnd Bergmann's avatar
      drm: via: use ktime_get() instead of do_gettimeofday · de7e8bd0
      Arnd Bergmann authored
      
      
      We want to remove uses of do_gettimeofday() from the kernel since the
      resulting timeval structure overflows in 2038. This is not a problem for
      this particular use, but do_gettimeofday() is also not an appropriate
      method for measuring time intervals, since it requires a conversion into
      microseconds and is complicated to work with.
      
      ktime_get() is a better replacement, as it works with the monontonic
      kernel timebase and requires a minimum of computation.
      
      I'm slightly changing the output from microseconds to nanoseconds here,
      to avoid introducing a new division operation. This should be fine
      since the value is only used for debugging.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171104212131.2939989-1-arnd@arndb.de
      de7e8bd0
  4. Nov 02, 2017
  5. Nov 01, 2017
  6. Oct 31, 2017
  7. Oct 30, 2017
    • Pan Bian's avatar
      gma500: mmu: unmap the correct address · 39c9ce70
      Pan Bian authored
      
      
      The function kunmap_atomatic() is called on the same variable twice,
      i.e. pt->v. In the second call, its parameter should be variable v
      rather than pt->v.
      
      Signed-off-by: default avatarPan Bian <bianpan2016@163.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/1509256512-5962-1-git-send-email-bianpan2016@163.com
      39c9ce70
    • Aastha Gupta's avatar
      drm: virtio: replace reference/unreference with get/put · 4e7b2120
      Aastha Gupta authored
      
      
      DRM core uses reference/unreference suffixes for refcounting
      functions, but kernel uses get/put (e.g. kref_get/put()).
      Replace reference/unreference with get/put for consistency
      and also it's shorter.
      
      The following cocci script was used to generate the patch:
      
      @@
      expression e;
      @@
      
      (
      -drm_gem_object_reference(e);
      +drm_gem_object_get(e);
      |
      -drm_gem_object_unreference(e);
      +drm_gem_object_put(e);
      |
      -drm_gem_object_unreference_unlocked(e);
      +drm_gem_object_put_unlocked(e);
      )
      
      Signed-off-by: default avatarAastha Gupta <aastha.gupta4104@gmail.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/1508776686-29664-1-git-send-email-aastha.gupta4104@gmail.com
      4e7b2120
  8. Oct 27, 2017
  9. Oct 21, 2017
    • Harsha Sharma's avatar
      drm/tinydrm: Replace list_for_each with list_for_each_entry · b7fa1bdb
      Harsha Sharma authored
      
      
      Replace use of list_for_each with list_for_each_entry to simplify the
      code and remove variables that are used only in list_for_each.
      Done with following coccinelle patch:
      
      @r@
      identifier fn,i,f,p;
      expression e;
      iterator name list_for_each, list_for_each_entry;
      type T;
      @@
      
      fn(...) {
      ++ T *i;
        <+...
      - list_for_each(p,e)
      + list_for_each_entry(i,e,f)
        {
                    ...
      -   T *i = list_entry(p,T,f);
                        ...
         }
         ...+>
      }
      
      @@
      identifier r.fn,r.p;
      @@
      
      fn(...) {
        ...
      - struct list_head *p;
        ... when != p
      }
      
      @@
      identifier r.fn,r.i,r.f;
      expression r.e;
      statement S;
      @@
      
      fn(...) {
        <...
        list_for_each_entry(i,e,f)
      - {
        S
      - }
        ...>
      }
      
      @s@
      identifier i,f,p;
      expression e;
      type T;
      @@
      
      - list_for_each(p,e)
      + list_for_each_entry(i,e,f)
        {
          ... when != T *i;
      -   i = list_entry(p,T,f);
          ...
        }
      
      @@
      identifier s.p;
      @@
      
      - struct list_head *p;
        ... when != p
      
      @@
      identifier s.i,s.f;
      expression s.e;
      statement S;
      @@
      
        list_for_each_entry(i,e,f)
      - {
        S
      - }
      
      Signed-off-by: default avatarHarsha Sharma <harshasharmaiitr@gmail.com>
      Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
      Signed-off-by: default avatarNoralf Trønnes <noralf@tronnes.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171014202823.29230-1-harshasharmaiitr@gmail.com
      b7fa1bdb
    • Sean Paul's avatar
      drm/rockchip: Fix build warning in analogix_dp-rockchip.c · 9bf15d05
      Sean Paul authored
      I didn't catch this before applying, just right after (of course).
      
      Fixes:
      ../drivers/gpu/drm/rockchip/analogix_dp-rockchip.c: In function
      ‘rockchip_dp_of_probe’:
      ../drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:276:6: warning:
      unused variable ‘ret’ [-Wunused-variable]
        int ret;
              ^~~
      
      Fixes: 102712a3
      
       ("drm/rockchip: analogix_dp: Remove unnecessary init
      code")
      Cc: Jeffy Chen <jeffy.chen@rock-chips.com>
      Cc: Mark Yao <mark.yao@rock-chips.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: Heiko Stuebner <heiko@sntech.de>
      Cc: dri-devel@lists.freedesktop.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-rockchip@lists.infradead.org
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171020172557.54900-1-seanpaul@chromium.org
      9bf15d05
    • Haneen Mohammed's avatar
      drm/print: Update old comment style · 091756bb
      Haneen Mohammed authored
      Remove old comment style used by doxygen.
      And remove comment left from commit 99cdb35e
      
       ("drm/doc: move printf
      helpers out of drmP.h") after refactoring drmP.h.
      
      Signed-off-by: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
      Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/4d89eef3945dbffd402d2ecdc130108b0565c158.1508297716.git.hamohammed.sa@gmail.com
      091756bb
    • Haneen Mohammed's avatar
      drm: Move debug macros out of drmP.h · 02c9656b
      Haneen Mohammed authored
      
      
      This patch extract DRM_* debug macros from drmP.h to drm_print.h and
      move printing related functions used by these macros from drm_drv.[hc]
      to drm_print.[hc].
      
      Signed-off-by: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
      Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/4020bc7c5ffad2af516919f78bb837c7f366b82b.1508297716.git.hamohammed.sa@gmail.com
      02c9656b
    • Jeffy Chen's avatar
      drm/rockchip: analogix_dp: Remove unnecessary init code · 102712a3
      Jeffy Chen authored
      Remove unnecessary init code, since we would do it in the power_on()
      callback.
      
      Also move of parse code to probe().
      
      Fixes: 9e32e16e
      
       ("drm: rockchip: dp: add rockchip platform dp driver")
      Signed-off-by: default avatarJeffy Chen <jeffy.chen@rock-chips.com>
      Acked-by: default avatarMark Yao <mark.yao@rock-chips.com>
      Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171019034812.13768-3-jeffy.chen@rock-chips.com
      102712a3
  10. Oct 20, 2017
    • Eric Anholt's avatar
      drm/vc4: Fix sleeps during the IRQ handler for DSI transactions. · af0c8c10
      Eric Anholt authored
      
      
      VC4's DSI1 has a bug where the AXI connection is broken for 32-bit
      writes from the CPU, so we use the DMA engine to DMA 32-bit values
      into registers instead.  That sleeps, so we can't do it from the top
      half.
      
      As a solution, use an interrupt thread so that all our writes happen
      when sleeping is is allowed.
      
      v2: Use IRQF_ONESHOT (suggested by Boris)
      v3: Style nitpicks.
      
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171014001255.32005-1-eric@anholt.net
      Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> (v2)
      af0c8c10
    • Boris Brezillon's avatar
      drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl · b9f19259
      Boris Brezillon authored
      
      
      This ioctl will allow us to purge inactive userspace buffers when the
      system is running out of contiguous memory.
      
      For now, the purge logic is rather dumb in that it does not try to
      release only the amount of BO needed to meet the last CMA alloc request
      but instead purges all objects placed in the purgeable pool as soon as
      we experience a CMA allocation failure.
      
      Note that the in-kernel BO cache is always purged before the purgeable
      cache because those objects are known to be unused while objects marked
      as purgeable by a userspace application/library might have to be
      restored when they are marked back as unpurgeable, which can be
      expensive.
      
      Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171019125748.3152-1-boris.brezillon@free-electrons.com
      b9f19259
  11. Oct 19, 2017