1. 13 6月, 2015 30 次提交
  2. 21 4月, 2015 1 次提交
  3. 24 3月, 2015 9 次提交
    • G
      drm/omap: tiler: add hibernation callback · 1d601da2
      Grygorii Strashko 提交于
      Setting a dev_pm_ops resume callback but not a set of hibernation
      handler means that pm function will not be called upon hibernation.
      
      Fix this by using SIMPLE_DEV_PM_OPS, which appropriately assigns the
      suspend and hibernation handlers and move omap_dmm_resume under
      CONFIG_PM_SLEEP to avoid build warnings.
      Signed-off-by: NGrygorii Strashko <grygorii.strashko@linaro.org>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      [tomi valkeinen: add missing 'static']
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      1d601da2
    • G
      drm/omap: add hibernation callbacks · 8450c8d0
      Grygorii Strashko 提交于
      Setting a dev_pm_ops suspend/resume pair but not a set of hibernation
      functions means those pm functions will not be called upon hibernation.
      
      Fix this by using SIMPLE_DEV_PM_OPS, which appropriately assigns the
      suspend and hibernation handlers and move
      omap_drm_suspend/omap_drm_resume under CONFIG_PM_SLEEP to avoid build
      warnings.
      Signed-off-by: NGrygorii Strashko <Grygorii.Strashko@linaro.org>
      [tomi.valkeinen@ti.com: fix conflict, clean up description]
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      8450c8d0
    • T
      drm/omap: keep ref to old_fb · 223bfd69
      Tomi Valkeinen 提交于
      We store the fb being page-flipped to 'old_fb' field, but we don't
      increase the ref count of the fb when doing that. While I am not
      sure if it can cause problem in practice, it's still safer to keep a ref
      when storing a pointer to a fb.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      223bfd69
    • T
      drm/omap: fix race conditon in DMM · 7439507f
      Tomi Valkeinen 提交于
      The omapdrm DMM code sometimes crashes with:
      
      WARNING: CPU: 0 PID: 1235 at lib/list_debug.c:36 __list_add+0x8c/0xbc()
      list_add double add: new=e9265368, prev=e90139c4, next=e9265368.
      
      This is caused by the code calling release_engine() twice for the same
      engine.
      
      dmm_txn_commit(wait=true) call is supposed to wait until the DMM
      transaction has been finished. And it does that, but it does not wait
      for the irq handler to finish.
      
      What happens is that the irq handler is triggered, and it either wakes
      up the thread that called dmm_txn_commit(), or that thread never even
      slept because the transaction was finished in the HW very quickly. That
      thread then continues executing, even if the irq handler is not yet
      finished, and a new transaction may be initiated. If that transaction is
      async (i.e. wait=false), a 'async' flag is set to true. The original irq
      handler, which has yet not finished, then sees the transaction as
      'async', even if it was supposed to be 'sync'.
      
      When that happens, the irq handler does an extra release_engine() call
      because it thinks it need to release the engine, leading to the crash.
      
      This patch fixes the issue by using completion to ensure that the irq
      handler has finished before a dmm_txn_commit(wait=true) may continue.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      7439507f
    • T
      drm/omap: fix race condition with dev->obj_list · 76c4055f
      Tomi Valkeinen 提交于
      omap_gem_objects are added to dev->obj_list in omap_gem_new, and removed
      in omap_gem_free_object. Unfortunately there's no locking for
      dev->obj_list, which eventually leads to a crash:
      
      WARNING: CPU: 1 PID: 1123 at lib/list_debug.c:59 __list_del_entry+0xa4/0xe0()
      list_del corruption. prev->next should be e9281344, but was ea722b84
      
      Add a spinlock to protect dev->obj_list.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      76c4055f
    • T
      drm/omap: do not use BUG_ON(!spin_is_locked(x)) · 8519c62c
      Tomi Valkeinen 提交于
      spin_is_locked(x) returns always 0 on uniprocessor, triggering BUG() in
      omapdrm.
      
      Change it to use assert_spin_locked() to fix the issue.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      8519c62c
    • T
      drm/omap: only ignore DIGIT SYNC LOST for TV output · ef422283
      Tomi Valkeinen 提交于
      We need to ignore DIGIT SYNC LOST error when enabling/disabling TV
      output. The code does that, but it ignores the DIGI SYNC LOST when
      enabling any output. Normally this does no harm, but it could make us
      miss DIGIT SYNC LOST on some rare occasions.
      
      Fix the code to only ignore DIGIT SYNC LOST when enabling/disabling TV.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      ef422283
    • T
      drm/omap: fix race with error_irq · a36af73f
      Tomi Valkeinen 提交于
      omapdrm tries to avoid error floods by unregistering the error irq when
      an error happens, and then registering the error irq again later.
      However, the code is racy, as it sometimes tries to unregister the error
      irq when it's already unregistered, leading to WARN().
      
      Also, the code only registers the error irq again when something is done
      on that particular output, i.e. if only TV is used to flip the buffers,
      and LCD is showing a same buffer, an error on LCD will cause the LCD
      error irq to be unregistered and never registered again.
      
      To fix this, let's keep the error irqs always enabled and trust the
      DRM_ERROR_RATELIMITED to limit the flood.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      a36af73f
    • T
      drm/omap: use DRM_ERROR_RATELIMITED() for error irqs · 3b143fc8
      Tomi Valkeinen 提交于
      omapdrm uses normal DRM_ERROR() print when the HW reports an error. As
      we sometimes may get a flood of errors, let's rather use
      DRM_ERROR_RATELIMITED().
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      3b143fc8