1. 03 4月, 2017 2 次提交
    • J
      drm/omap: Major omap_modeset_init() cleanup · e8e13b15
      Jyri Sarha 提交于
      Cleanup overly complex omap_modeset_init(). The function is trying to
      support many unusual configuration, that have never been tested and
      are not supported by other parts of the dirver.
      
      After cleanup the init function creates exactly one connector,
      encoder, crtc, and primary plane per each connected dss-device. Each
      connector->encoder->crtc chain is expected to be separate and each
      crtc is connect to a single dss-channel. If the configuration does not
      match the expectations or exceeds the available resources, the
      configuration is rejected.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      e8e13b15
    • T
      drm/omap: use dispc_ops · 9f759225
      Tomi Valkeinen 提交于
      Change omapdrm to get dispc_ops and use that to call the dispc functions
      instead or direct function calls.
      
      The change is very straightforward.
      
      The only problem was in omap_crtc_init() which calls pipe2vbl(crtc), and
      at that point of time the crtc->dev link, which is used to get the
      dispc_ops, has not been set up yet. This patch makes omap_crtc_init()
      skip the call to pipe2vbl() and instead calls
      dispc_ops->mgr_get_vsync_irq() directly.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      9f759225
  2. 25 2月, 2017 1 次提交
  3. 09 2月, 2017 1 次提交
  4. 27 1月, 2017 1 次提交
  5. 19 12月, 2016 10 次提交
  6. 08 12月, 2016 1 次提交
    • T
      drm/omap: fix primary-plane's possible_crtcs · e43f2c33
      Tomi Valkeinen 提交于
      We set the possible_crtc for all planes to "(1 << priv->num_crtcs) - 1",
      which is fine as the HW planes can be used fro all crtcs. However, when
      we're doing that, we are still incrementing 'num_crtcs', and we'll end
      up with bad possible_crtcs, preventing the use of the primary planes.
      
      This patch passes a possible_crtcs mask to plane init function so that
      we get correct possible_crtc.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      e43f2c33
  7. 02 11月, 2016 1 次提交
  8. 06 6月, 2016 4 次提交
  9. 03 6月, 2016 1 次提交
  10. 17 5月, 2016 1 次提交
  11. 03 3月, 2016 3 次提交
  12. 08 2月, 2016 1 次提交
  13. 31 12月, 2015 3 次提交
  14. 24 11月, 2015 1 次提交
  15. 06 10月, 2015 1 次提交
    • T
      drm/irq: Use unsigned int pipe in public API · 88e72717
      Thierry Reding 提交于
      This continues the pattern started in commit cc1ef118 ("drm/irq:
      Make pipe unsigned and name consistent"). This is applied to the public
      APIs and driver callbacks, so pretty much all drivers need to be updated
      to match the new prototypes.
      
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Inki Dae <inki.dae@samsung.com>
      Cc: Jianwei Wang <jianwei.wang.chn@gmail.com>
      Cc: Alison Wang <alison.wang@freescale.com>
      Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Mark Yao <mark.yao@rock-chips.com>
      Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
      Cc: Vincent Abriou <vincent.abriou@st.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      88e72717
  16. 02 7月, 2015 3 次提交
    • T
      drm/omap: fix align_pitch() for 24 bits per pixel · d642d3ac
      Tomi Valkeinen 提交于
      align_pitch() uses ALIGN() to ensure the pitch is aligned to SGX's
      requirement of 8 pixels. However, ALIGN() expects the alignment value to
      be a power of two, which is not the case for 24 bits per pixels.
      
      Use roundup() instead, which works for all alignments.
      
      This fixes the error seen with 24 bits per pixel modes:
      
      "buffer pitch (2176 bytes) is not a multiple of pixel size (3 bytes)"
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      d642d3ac
    • T
      drm/omap: fix omap_gem_put_paddr() error handling · 393a949f
      Tomi Valkeinen 提交于
      If tiler_unpin() call in omap_gem_put_paddr() fails,
      omap_gem_put_paddr() will immediately stop processing and return an
      error.
      
      This patch remoes that error checking, and also removes
      omap_gem_put_paddr()'s return value, because:
      
       * The caller of omap_gem_put_paddr() can do nothing if an error
         happens, so it's pointless to return an error value
      
       * If tiler_unpin() fails, the GEM object will possibly be left in an
         undefined state, where the DMM mapping may have been removed, but the
         GEM object still thinks everything is as it should be, leading to
         crashes later.
      
       * There's no point in returning an error from a "free" call, as the
         caller can do nothing about it. So it's better to clean up as much as
         possible.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      393a949f
    • T
      drm/omap: fix omap_framebuffer_unpin() error handling · 9c368506
      Tomi Valkeinen 提交于
      omap_framebuffer_unpin() check the return value of omap_gem_put_paddr()
      and return immediately if omap_gem_put_paddr() fails.
      
      This patch removes the check for the return value, and also removes the
      return value of omap_framebuffer_unpin(), because:
      
       * Nothing checks the return value of omap_framebuffer_unpin(), and even
         something did check it, there's nothing the caller can do to handle
         the error.
      
       * If a omap_gem_put_paddr() fails, the framebuffer's other planes will
         be left unreleased. So it's better to call omap_gem_put_paddr() for
         all the planes, even if one would fail.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      9c368506
  17. 13 6月, 2015 5 次提交
    • T
      drm: omapdrm: new vblank and event handling · 5f741b39
      Tomi Valkeinen 提交于
      Rework the crtc event/flip_wait system as follows:
      
      - If we enable a crtc (full modeset), we set omap_crtc->pending and
        register vblank irq.
      
      - If we need to set GO bit (page flip), we do the same but also set the
        GO bit.
      
      - On vblank we unregister the irq, clear the 'pending' flag, send vblank
        event to userspace if crtc->state->event != NULL, and wake up
        'pending_wait' wq.
      
      - In omap_atomic_complete() we wait for the 'pending' flag to get reset
        for all enabled crtcs  using 'pending_wait' wq.
      
      The above ensures that we send the events to userspace in vblank, and
      that after the wait in omap_atomic_complete() everything for the
      affected crtcs has been completed.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      5f741b39
    • L
      drm: omapdrm: Don't setup planes manually from CRTC .enable()/.disable() · 0dce4d75
      Laurent Pinchart 提交于
      Planes setup is handled by the DRM core through the atomic helpers,
      there's no need to duplicate the code in the CRTC .enable() and
      .disable() operations.
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      0dce4d75
    • L
      drm: omapdrm: Move encoder setup to encoder operations · 4029755e
      Laurent Pinchart 提交于
      Now that the driver is fully converted to atomic operations, and that
      the atomic helpers call the operations in the right order, we can move
      encoder setup to where it belongs, in the encoder operations.
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      4029755e
    • L
      drm: omapdrm: Support unlinking page flip events prematurely · 1cfe19aa
      Laurent Pinchart 提交于
      DRM page flip vblank events requested by page flips or atomic commits
      are created by the DRM core and then passed to driver through CRTC
      states (for atomic commit) or directly to the page flip handler (for
      legacy page flips). The events are then kept aside until the page flip
      completes, at which point drivers queue them for delivery with a call to
      drm_send_vblank_event().
      
      When a DRM file handle is closed events pending for delivery are cleaned
      up automatically by the DRM core. Events that have been passed to the
      driver but haven't completed yet, however, are not handled by the DRM
      core. Drivers are responsible for destroying them and must not attempt
      to queue them for delivery. This is usually handled by drivers'
      preclose() handlers that cancel and destroy page flip events that
      reference the file handle being closed.
      
      With asynchronous atomic updates the story becomes more complex. Several
      asynchronous atomic updates can be pending, each of them carrying
      per-CRTC events. As the atomic_commit() operation doesn't receive a file
      handle context, drivers can't know which file handle a pending update
      refers to, making it difficult to cancel or wait for completion of
      updates related to the file handle being closed.
      
      It should be noted that cancelling page flips or waiting for atomic
      updates completion isn't required by the DRM core when closing a file
      handle. The only requirement is that no event gets queued for delivery
      after the preclose() operation returns. This can easily be achieved by
      storing events for atomic commits in a list, unlinking events from the
      file handle being closed by setting the file_priv field to NULL, and
      skipping delivery of unlinked events.
      
      This logic replaces the page flip cancellation completely.
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      1cfe19aa
    • L
      drm: omapdrm: Make the omap_crtc_flush function static · bec10a2a
      Laurent Pinchart 提交于
      The function isn't used outside of its compilation unit, make it static.
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      bec10a2a