1. 08 3月, 2017 6 次提交
    • C
      drm/sun4i: Initialize crtc from tcon bind function · 46cce6da
      Chen-Yu Tsai 提交于
      The tcon provides part of the functionality of the crtc, and also
      provides the device node for the output port of the crtc. To be able
      to use drm_of_find_possible_crtcs(), all crtc must be initialized before
      any downstream encoders. The other part of the crtc is the display
      backend.
      
      The Rockchip DRM driver does this by first binding all vops, which is
      their crtc, and this step also creates the crtc objects. Then all
      remaining hardware components are bound. With the Allwinner display
      pipeline, we have multiple components comprising the crtc, and varying
      depths of the display pipeline. Since components are added with a depth
      first search of the of_graph, we can initialize the crtc object within
      the tcon bind function. Since the backend precedes the tcon, and the
      backends cannot be muxed or switched around, we can be sure that the
      associated backend is already initialized.
      
      This patch also moves the crtc pointer from the main drm_device data to
      the tcon device data. Besides the crtc callbacks, the crtc structure is
      only used within the tcon driver to signal vblank events from its
      interrupt handler.
      
      As the crtc and layer bits are now called from the tcon bits, we must
      move them from the sun4i-drm module to the sun4i-tcon module to avoid
      circular dependencies between the two modules. This is because sun4i-drm
      also calls into sun4i-tcon.
      Signed-off-by: NChen-Yu Tsai <wens@csie.org>
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      46cce6da
    • C
      drm/sun4i: Move layers from sun4i_drv to sun4i_crtc · b3f266e4
      Chen-Yu Tsai 提交于
      This patch moves the sun4i_layers_init call from sun4i_drv_bind to
      sun4i_crtc_init, and the layers pointer from struct sun4i_drv to
      struct sun4i_crtc.
      
      The layers are bound to a specific crtc, and they are not directly
      used once initiated. They are used through their included drm_plane
      structures.
      
      Moving the layers into the crtc facilitates binding them to the crtc
      explicitly, by setting the corresponding bit in their .possible_crtcs
      fields right after the crtc is initialized. This is done in a later
      patch.
      Signed-off-by: NChen-Yu Tsai <wens@csie.org>
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      b3f266e4
    • C
      drm/sun4i: Make sun4i_crtc_init return ERR_PTR style error codes · ea411fd2
      Chen-Yu Tsai 提交于
      sun4i_crtc_init can fail for a number of reasons. Instead of returning
      a NULL pointer when it fails, pass back the encountered error using
      ERR_PTR.
      Signed-off-by: NChen-Yu Tsai <wens@csie.org>
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      ea411fd2
    • C
      drm/sun4i: Check return value of drm_vblank_init · 92b300c4
      Chen-Yu Tsai 提交于
      drm_vblank_init can fail due to insufficient memory. Ignoring the error
      and proceeding may cause the kernel to dereference an invalid pointer
      when vblank is enabled.
      Signed-off-by: NChen-Yu Tsai <wens@csie.org>
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      92b300c4
    • C
      drm/sun4i: Fix up error path cleanup for master bind function · 9d56defb
      Chen-Yu Tsai 提交于
      The master bind function calls numerous drm functions which initialize
      underlying structures. It also tries to bind the various components
      of the display pipeline, some of which may add additional drm objects.
      
      This patch adds proper cleanup functions in the error path of the
      master bind function.
      
      This requires the patch "drm/sun4i: Move drm_mode_config_cleanup call
      to main driver", which splits out drm_mode_config_cleanup from
      sun4i_framebuffer_free so we can call it separately.
      Signed-off-by: NChen-Yu Tsai <wens@csie.org>
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      9d56defb
    • C
      drm/sun4i: Move drm_mode_config_cleanup call to main driver · 92caf9be
      Chen-Yu Tsai 提交于
      drm_mode_config_cleanup is the complement of drm_mode_config_init, which
      is called in the bind function of sun4i_drv. drm_mode_config_cleanup
      should be put in the unbind function to match.
      Signed-off-by: NChen-Yu Tsai <wens@csie.org>
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      92caf9be
  2. 09 2月, 2017 1 次提交
  3. 08 2月, 2017 1 次提交
  4. 07 11月, 2016 1 次提交
  5. 03 11月, 2016 1 次提交
  6. 02 11月, 2016 1 次提交
  7. 25 10月, 2016 1 次提交
  8. 20 10月, 2016 2 次提交
  9. 22 9月, 2016 1 次提交
  10. 08 9月, 2016 1 次提交
  11. 22 8月, 2016 1 次提交
  12. 12 8月, 2016 1 次提交
  13. 19 7月, 2016 1 次提交
  14. 05 7月, 2016 1 次提交
  15. 01 7月, 2016 1 次提交
  16. 22 6月, 2016 2 次提交
  17. 01 6月, 2016 1 次提交
  18. 30 5月, 2016 2 次提交
  19. 28 4月, 2016 2 次提交