1. 21 9月, 2018 1 次提交
  2. 23 7月, 2018 1 次提交
  3. 05 7月, 2018 8 次提交
    • A
      drm/arm/malidp: Added the late system pm functions · e368fc75
      Ayan Kumar Halder 提交于
      malidp_pm_suspend_late checks if the runtime status is not suspended
      and if so, invokes malidp_runtime_pm_suspend which disables the
      display engine/core interrupts and the clocks. It sets the runtime status
      as suspended.
      
      The difference between suspend() and suspend_late() is as follows:-
      1. suspend() makes the device quiescent. In our case, we invoke the DRM
      helper which disables the CRTC. This would have invoked runtime pm
      suspend but the system suspend process disables runtime pm.
      2. suspend_late() It continues the suspend operations of the drm device
      which was started by suspend(). In our case, it performs the same functionality
      as runtime_suspend().
      
      The complimentary functions are resume() and resume_early(). In the case of
      resume_early(), we invoke malidp_runtime_pm_resume() which enables the clocks
      and the interrupts. It sets the runtime status as active. If the device was
      in runtime suspend mode before system suspend was called, pm_runtime_work()
      will put the device back in runtime suspended mode( after the complete system
      has been resumed).
      Signed-off-by: NAyan Kumar Halder <ayan.halder@arm.com>
      Acked-by: NLiviu Dudau <liviu.dudau@arm.com>
      Signed-off-by: NLiviu Dudau <liviu.dudau@arm.com>
      e368fc75
    • A
      drm/arm/malidp: Set the output_depth register in modeset · f877006d
      Ayan Kumar Halder 提交于
      One needs to store the value of the OUTPUT_DEPTH that one has parsed from
      device tree, so that it can be restored on system resume. This value is
      set in the modeset function as this gets reset when the system suspends.
      Signed-off-by: NAyan Kumar Halder <ayan.halder@arm.com>
      Acked-by: NLiviu Dudau <liviu.dudau@arm.com>
      Signed-off-by: NLiviu Dudau <liviu.dudau@arm.com>
      f877006d
    • A
      drm/arm/malidp: Enable/disable interrupts in runtime pm · fbcc454e
      Ayan Kumar Halder 提交于
      Display and scaling engine interrupts need to be disabled when the
      runtime pm invokes malidp_runtime_pm_suspend(). Conversely, they
      need to be enabled in malidp_runtime_pm_resume().
      
      This patch depends on:
      https://lkml.org/lkml/2017/5/15/695Reported-by: NAlexandru-Cosmin Gheorghe <Alexandru-Cosmin.Gheorghe@arm.com>
      Signed-off-by: NAlexandru-Cosmin Gheorghe <Alexandru-Cosmin.Gheorghe@arm.com>
      Signed-off-by: NAyan Kumar Halder <ayan.halder@arm.com>
      Acked-by: NLiviu Dudau <liviu.dudau@arm.com>
      Signed-off-by: NLiviu Dudau <liviu.dudau@arm.com>
      fbcc454e
    • A
      drm/arm/malidp: Modified the prototype of malidp irq de-initializers · 62862cfb
      Ayan Kumar Halder 提交于
      Malidp uses two interrupts ie 1. se_irq - used for memory writeback.
       and 2. de_irq - used for display output.
      'struct drm_device' is being replaced with 'struct malidp_hw_device'
      as the function argument. The reason being the dependency of
      malidp_de_irq_fini on 'struct drm_device' needs to be removed so as to
      enable it to call from functions which receives 'struct malidp_hw_device'
      as argument. Furthermore, there is no way to retrieve 'struct drm_device'
      from 'struct malidp_hw_device'.
      Signed-off-by: NAyan Kumar Halder <ayan.halder@arm.com>
      Acked-by: NLiviu Dudau <liviu.dudau@arm.com>
      Signed-off-by: NLiviu Dudau <liviu.dudau@arm.com>
      62862cfb
    • A
      drm: mali-dp: Add debugfs file for reporting internal errors · 613c5c7f
      Alexandru Gheorghe 提交于
      Status register contains a lot of bits for reporting internal errors
      inside Mali DP. Currently, we just silently ignore all of the errors,
      that doesn't help when we are investigating different bugs, especially
      on the FPGA models which have a lot of constraints, so we could easily
      end up in AXI or underrun errors.
      
      Add a new file called debug that contains an aggregate of the
      errors reported by the Mali DP hardware.
      
      E.g:
      [root@alarm ~]# cat /sys/kernel/debug/dri/1/debug
      [DE] num_errors : 167
      [DE] last_error_status  : 0x00000001
      [DE] last_error_vblank : 385
      [SE] num_errors : 3
      [SE] last_error_status  : 0x00e23001
      [SE] last_error_vblank : 201
      
      Changes since v2:
      - Add lock to protect the errors stats.
      - Add possibility to reset the error stats by writing anything to the
        debug file.
      Signed-off-by: NAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
      Acked-by: NLiviu Dudau <liviu.dudau@arm.com>
      Signed-off-by: NLiviu Dudau <liviu.dudau@arm.com>
      613c5c7f
    • L
      drm/mali-dp: Improve writeback handling for DP500. · 0735cfdf
      Liviu Dudau 提交于
      Mali DP500 operates in continuous writeback mode (writes frame content
      until stopped) and it needs special handling in order to behave like
      a one-shot writeback engine. The original state machine added for DP500
      was a bit fragile, as it did not handle correctly cases where a new
      atomic commit was in progress when the SE IRQ happens and it would
      commit some partial updates.
      
      Improve the handling by adding a parameter to the set_config_valid()
      function to clear the config valid bit in hardware before starting a
      new commit and by introducing a MW_RESTART state in the writeback
      state machine to cater for the case where a new writeback commit
      gets submitted while the last one is still being active.
      Reported-by: NBrian Starkey <brian.starkey@arm.com>
      Reviewed-by: NBrian Starkey <brian.starkey@arm.com>
      Signed-off-by: NLiviu Dudau <liviu.dudau@arm.com>
      0735cfdf
    • B
      drm: mali-dp: Add writeback connector · 8cbc5caf
      Brian Starkey 提交于
      Mali-DP has a memory writeback engine which can be used to write the
      composition result to a memory buffer. Expose this functionality as a
      DRM writeback connector on supported hardware.
      
      Changes since v1:
       Daniel Vetter:
       - Don't require a modeset when writeback routing changes
       - Make writeback connector always disconnected
      
      Changes since v2:
       - Rebase onto new drm_writeback_connector
       - Add reset callback, allocating subclassed state
       Daniel Vetter:
       - Squash out-fence support into this commit
       Gustavo Padovan:
       - Don't signal fence directly from driver (and drop malidp_mw_job)
      
      Changes since v3:
       - Modifications to fit with Mali-DP commit tail changes
      Signed-off-by: NBrian Starkey <brian.starkey@arm.com>
      [rebased and fixed conflicts]
      Signed-off-by: NMihail Atanassov <mihail.atanassov@arm.com>
      Signed-off-by: NLiviu Dudau <liviu.dudau@arm.com>
      8cbc5caf
    • L
      drm/mali-dp: Add writeback support for DP500. · 1cb3cbe7
      Liviu Dudau 提交于
      Mali DP500 behaves differently from the rest of the Mali DP IP,
      in that it does not have a one-shot mode and keeps writing the
      content of the current frame to the provided memory area until
      stopped. As a way of emulating the one-shot behaviour, we are
      going to use the CVAL interrupt that is being raised at the
      start of each frame, during prefetch phase, to act as End-of-Write
      signal, but with a twist: we are going to disable the memory
      write engine right after we're notified that it has been enabled,
      using the knowledge that the bit controlling the enabling will
      only be acted upon on the next vblank/prefetch.
      
      CVAL interrupt will fire durint the next prefetch phase every time
      the global CVAL bit gets set, so we need a state byte to track
      the memory write enabling. We also need to pay attention during the
      disabling of the memory write engine as that requires the CVAL bit
      to be set in the control register, but we don't want to do that
      during an atomic commit, as it will write into the hardware a partial
      state.
      Reviewed-by: NBrian Starkey <brian.starkey@arm.com>
      Signed-off-by: NLiviu Dudau <liviu.dudau@arm.com>
      1cb3cbe7
  4. 19 6月, 2018 1 次提交
  5. 14 3月, 2018 5 次提交
  6. 08 12月, 2017 1 次提交
  7. 01 12月, 2017 1 次提交
  8. 24 11月, 2017 2 次提交
  9. 28 8月, 2017 1 次提交
  10. 29 7月, 2017 1 次提交
  11. 13 7月, 2017 1 次提交
  12. 01 6月, 2017 1 次提交
  13. 24 4月, 2017 7 次提交
  14. 07 4月, 2017 1 次提交
  15. 14 3月, 2017 1 次提交
  16. 12 2月, 2017 1 次提交
  17. 08 2月, 2017 2 次提交
  18. 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
  19. 26 1月, 2017 2 次提交
  20. 23 1月, 2017 1 次提交