1. 08 2月, 2017 2 次提交
  2. 03 2月, 2017 1 次提交
    • G
      drm: Rely on mode_config data for fb_helper initialization · e4563f6b
      Gabriel Krisman Bertazi 提交于
      Instead of receiving the num_crts as a parameter, we can read it
      directly from the mode_config structure.  I audited the drivers that
      invoke this helper and I believe all of them initialize the mode_config
      struct accordingly, prior to calling the fb_helper.
      
      I used the following coccinelle hack to make this transformation, except
      for the function headers and comment updates.  The first and second
      rules are split because I couldn't find a way to remove the unused
      temporary variables at the same time I removed the parameter.
      
      // <smpl>
      @r@
      expression A,B,D,E;
      identifier C;
      @@
      (
      - drm_fb_helper_init(A,B,C,D)
      + drm_fb_helper_init(A,B,D)
      |
      - drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
      + drm_fbdev_cma_init_with_funcs(A,B,D,E)
      |
      - drm_fbdev_cma_init(A,B,C,D)
      + drm_fbdev_cma_init(A,B,D)
      )
      
      @@
      expression A,B,C,D,E;
      @@
      (
      - drm_fb_helper_init(A,B,C,D)
      + drm_fb_helper_init(A,B,D)
      |
      - drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
      + drm_fbdev_cma_init_with_funcs(A,B,D,E)
      |
      - drm_fbdev_cma_init(A,B,C,D)
      + drm_fbdev_cma_init(A,B,D)
      )
      
      @@
      identifier r.C;
      type T;
      expression V;
      @@
      - T C;
      <...
      when != C
      - C = V;
      ...>
      // </smpl>
      
      Changes since v1:
       - Rebased on top of the tip of drm-misc-next.
       - Remove mention to sti since a proper fix got merged.
      Suggested-by: NDaniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: NGabriel Krisman Bertazi <krisman@collabora.co.uk>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170202162640.27261-1-krisman@collabora.co.uk
      e4563f6b
  3. 09 1月, 2017 1 次提交
  4. 30 12月, 2016 1 次提交
  5. 14 12月, 2016 1 次提交
  6. 29 11月, 2016 6 次提交
  7. 09 11月, 2016 1 次提交
  8. 02 11月, 2016 1 次提交
  9. 20 10月, 2016 2 次提交
  10. 22 9月, 2016 1 次提交
  11. 06 9月, 2016 2 次提交
  12. 19 6月, 2016 3 次提交
  13. 09 6月, 2016 1 次提交
    • S
      drm/fsl-dcu: use flat regmap cache · ce492b3b
      Stefan Agner 提交于
      Using flat regmap cache instead of RB-tree to avoid the following
      lockdep warning on driver load:
      WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:2755 lockdep_trace_alloc+0x15c/0x160()
      DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags))
      
      The RB-tree regmap cache needs to allocate new space on first
      writes. However, allocations in an atomic context (e.g. when a
      spinlock is held) are not allowed. The function regmap_write
      calls map->lock, which acquires a spinlock in the fast_io case.
      Since the FSL DCU driver uses MMIO, the regmap bus of type
      regmap_mmio is being used which has fast_io set to true.
      
      Use flat regmap cache and specify max register to be large
      enouth to cover all registers available in LS1021a and Vybrids
      register space.
      Signed-off-by: NStefan Agner <stefan@agner.ch>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: stable@vger.kernel.org
      ce492b3b
  14. 01 6月, 2016 1 次提交
  15. 21 5月, 2016 1 次提交
    • D
      drm: Nuke ->vblank_disable_allowed · fcee5906
      Daniel Vetter 提交于
      This was added in
      
      commit 0a3e67a4
      Author: Jesse Barnes <jbarnes@virtuousgeek.org>
      Date:   Tue Sep 30 12:14:26 2008 -0700
      
          drm: Rework vblank-wait handling to allow interrupt reduction.
      
      to stay backwards-compatible with old UMS code that didn't even tell
      the kernel when it did a modeset, so that the kernel could
      save/restore vblank counters. At worst this means vblanks will be
      somewhat funky on a setup that very likely no one still runs.
      
      So let's just nuke it.
      
      Plan B would be to set it unconditionally in drm_vblank_init for kms
      drivers, instead of in each driver separately. So if this patch breaks
      anything please only restore the hunks in drmP.h and drm_irq.c, plus
      add a check for DRIVER_MODESET in drm_vblank_init.
      
      Stumbled over this in a discussion on irc with Chris.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Liviu Dudau <liviu.dudau@arm.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Cc: Inki Dae <inki.dae@samsung.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Mark Yao <mark.yao@rock-chips.com>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Acked-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Tested-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      fcee5906
  16. 26 4月, 2016 9 次提交
  17. 26 2月, 2016 3 次提交
    • S
      drm/fsl-dcu: mask all interrupts on initialization · 638c93f6
      Stefan Agner 提交于
      The state of the interrupt mask register on initialization is
      unknown, e.g. U-Boot could already used the DCU. So depending on
      the boot loader, the outcome of the interrupt mask register could
      be different. A defined state is much more preferable. Also, there
      is no value in keeping interrupts enabled which we don't need.
      Therefor, mask all interrupts on initialization.
      Signed-off-by: NStefan Agner <stefan@agner.ch>
      638c93f6
    • S
      drm/fsl-dcu: remove regmap return value checks · e291d298
      Stefan Agner 提交于
      It is not common to do regmap return value checks, especially not
      for memory mapped device. We can rule out most error returns since
      the conditions are static and we know they are ok (e.g. offset
      aligned to register stride). Also without proper error handling
      they are not really valuable for the user. Hence remove most of
      them.
      
      The check in the interrupt handler is worth keeping since a
      volatile register won't be readable in case register caching is
      still enabled.
      Signed-off-by: NStefan Agner <stefan@agner.ch>
      e291d298
    • S
      drm/fsl-dcu: specify volatile registers · efb8b491
      Stefan Agner 提交于
      Since we are using cached registers, we need to specify volatile
      registers explicitly to avoid reading their value from the cache.
      This allows to read the correct interrupt status in fsl_dcu_drm_irq
      and clear the asserted bits only.
      Signed-off-by: NStefan Agner <stefan@agner.ch>
      efb8b491
  18. 26 1月, 2016 1 次提交
  19. 15 12月, 2015 1 次提交
  20. 07 10月, 2015 1 次提交