1. 30 11月, 2016 1 次提交
    • B
      drm/tilcdc: add a workaround for failed clk_set_rate() · cb42e20e
      Bartosz Golaszewski 提交于
      Some architectures don't use the common clock framework and don't
      implement all the clk interfaces for every clock. This is the case
      for da850-lcdk where clk_set_rate() only works for PLL0 and PLL1.
      
      Trying to set the clock rate for the LCDC clock results in -EINVAL
      being returned.
      
      As a workaround for that: if the call to clk_set_rate() fails, fall
      back to adjusting the clock divider instead. Proper divider value is
      calculated by dividing the current clock rate by the required pixel
      clock rate in HZ.
      
      This code is based on a hack initially developed internally for
      baylibre by Karl Beldan <kbeldan@baylibre.com>.
      
      Tested with a da850-lcdk with an LCD display connected over VGA.
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      cb42e20e
  2. 02 11月, 2016 1 次提交
  3. 25 10月, 2016 1 次提交
  4. 18 10月, 2016 1 次提交
  5. 17 10月, 2016 1 次提交
  6. 23 9月, 2016 5 次提交
  7. 22 9月, 2016 1 次提交
  8. 07 9月, 2016 6 次提交
  9. 02 9月, 2016 7 次提交
  10. 29 8月, 2016 1 次提交
  11. 09 8月, 2016 15 次提交
    • J
      drm/tilcdc: Change tilcdc_crtc_page_flip() to tilcdc_crtc_update_fb() · e0e344e6
      Jyri Sarha 提交于
      Change tilcdc_crtc_page_flip() to tilcdc_crtc_update_fb(). The
      function is not used as a page_flip() callback anymore so it is only
      confusing to call it that. The function should only be used by dummy
      primary plane commit() callback.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      e0e344e6
    • J
      drm/tilcdc: Remove unnecessary pm_runtime_get() and *_put() calls · d81b7f34
      Jyri Sarha 提交于
      Remove unnecessary pm_runtime_get() and *_put() calls from commit
      phase callbacks. Those calls are not needed since we have the whole
      commit phase between pm_runtime_get_sync() and pm_runtime_put_sync().
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      d81b7f34
    • J
      drm/tilcdc: Get rid of legacy dpms mechanism · 47bfd6c0
      Jyri Sarha 提交于
      Get rid of legacy dpms mechanism. This simplifies the code quite a
      bit. The old start() and stop() functions become tilcdc_crtc_enable()
      and *_disable(). The functions are added with all the necessary
      mechanisms from the old dpms function and they are used directly as
      the crtc helper enable() and disable() callbacks.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      47bfd6c0
    • J
      drm/tilcdc: Use drm_atomic_helper_resume/suspend() · 514d1a1f
      Jyri Sarha 提交于
      Use drm_atomic_helper_resume/suspend() and get rid off all the obsolete
      register level context restoring code.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      514d1a1f
    • J
      drm/tilcdc: Enable and disable interrupts in crtc start() and stop() · afaf833d
      Jyri Sarha 提交于
      Enable and disable interrupts in crtc start() and stop(). None of the
      interrupts can fire if CRTC is disabled, so it is cleaner - when
      considering suspend/resume code etc. - to enable the interrupts when
      CRTC is turned on and to disable them when CRTC is turned off.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      afaf833d
    • J
      drm/tilcdc: tfp410: Add atomic modeset helpers to connector funcs · 018cfbde
      Jyri Sarha 提交于
      Add atomic modeset helpers to tfp410 connector funcs. Property handling
      related helpers, atomic reset helper, and new dpms helper is needed in
      connector for atomic modeseting to work. The default helper functions
      are enough.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      018cfbde
    • J
      drm/tilcdc: tfp410: Set crtc panel info at init phase · 7c979b55
      Jyri Sarha 提交于
      Set crtc panel info at init phase. Setting it at prepare callback does
      it multiple times for no good reason and it is also too late when atomic
      modeset is used.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      7c979b55
    • J
      drm/tilcdc: panel: Add atomic modeset helpers to connector funcs · 0f65d89b
      Jyri Sarha 提交于
      Add atomic modeset helpers to panel connector funcs. Property handling
      related helpers, atomic reset helper, and new dpms helper is needed in
      connector for atomic modeseting to work. The default helper functions
      are enough.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      0f65d89b
    • J
      drm/tilcdc: panel: Set crtc panel info at init phase · ee6de21b
      Jyri Sarha 提交于
      Set crtc panel info at init phase. Setting it at prepare callback does
      it multiple times for no good reason and it is also too late when atomic
      modeset is used.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      ee6de21b
    • J
      drm/tilcdc: Remove tilcdc_verify_fb() · c72cc663
      Jyri Sarha 提交于
      Remove tilcdc_verify_fb(). The tilcdc_verify_fb() function is not
      needed because the same checks are implemented in
      tilcdc_plane_atomic_check().
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      c72cc663
    • J
      drm/tilcdc: Remove obsolete crtc helper functions · 6b4736db
      Jyri Sarha 提交于
      Remove obsolete crtc helper functions. These are not needed when
      atomic modeset is used.
      
      Note that the drm_crtc_helper_funcs mode_fixup() is still needed. The
      crtc's check() callback can not do its job here.
      
      The plane's check() callback needs to set drm_crtc_state's
      ->mode_changed to true if the pixel format for the framebuffer
      changes. Because of this drm_mode_config_funcs atomic_check() callback
      needs to call drm_atomic_helper_check_modeset() once more after it has
      called drm_atomic_helper_check_planes(). If the fixing of the
      adjusted_mode would be done in drm_crtc_helper_funcs atomic_check()
      callback, it would get over written by the extra
      drm_atomic_helper_check_modeset() call.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      6b4736db
    • J
      drm/tilcdc: Set DRIVER_ATOMIC and use atomic crtc helpers · 305198de
      Jyri Sarha 提交于
      Set DRIVER_ATOMIC and use atomic helpers and rename commit and prepare
      crtc helpers to enable and disable. This makes the final jump to mode
      setting, but there is lot of obsolete code to clean up.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      305198de
    • J
      drm/tilcdc: Add drm_mode_config_reset() call to tilcdc_load() · 522a76f8
      Jyri Sarha 提交于
      Add drm_mode_config_reset() call to tilcdc_load(). This is need to
      initialize atomic state variables at load time.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      522a76f8
    • J
      drm/tilcdc: Add atomic mode config funcs · edc43303
      Jyri Sarha 提交于
      Add atomic mode config funcs. The atomic_commit implementation is a
      copy-paste from drm_atomic_helper_commit(), leaving out the async
      test. The similar copy-paste implementation appears to be used in many
      other drivers too. The standard drm_atomic_helper_check() is used for
      checking.
      
      The drm_atomic_helper_check() can not be used in drm_mode_config_funcs
      atomic_check() callback because the plane's check implementation may
      update crtc state's ->mode_changed flag. Because of this the
      drm_atomic_helper_check_modeset() has to be called once more after
      drm_atomic_helper_check_planes() (see drm_atomic_helper_check_modeset()
      documentation).
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      edc43303
    • J
      drm/tilcdc: Add tilcdc_crtc_atomic_check() · db380c58
      Jyri Sarha 提交于
      Add tilcdc_crtc_atomic_check(). Checks the display mode validity and
      the presence of the mandatory primary plane.
      
      The drm_crtc_helper_funcs mode_fixup() callback is left untouched and
      the check function does no try to do its job on purpose, despite what
      the mode_fixup() callback's documentations suggests.
      
      The plane's check() callback needs to set drm_crtc_state's
      ->mode_changed to true if the pixel format for the framebuffer
      changes. Because of this drm_mode_config_funcs atomic_check() callback
      needs to call drm_atomic_helper_check_modeset() once more after it has
      called drm_atomic_helper_check_planes(). If the fixing of the
      adjusted_mode would be done in drm_crtc_helper_funcs atomic_check()
      callback, it would get over written by the extra
      drm_atomic_helper_check_modeset() call.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      db380c58