1. 03 4月, 2017 2 次提交
  2. 16 2月, 2017 2 次提交
  3. 09 2月, 2017 1 次提交
  4. 08 2月, 2017 1 次提交
  5. 27 1月, 2017 1 次提交
  6. 09 1月, 2017 1 次提交
  7. 19 12月, 2016 3 次提交
  8. 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
  9. 22 10月, 2016 2 次提交
  10. 17 10月, 2016 1 次提交
  11. 29 8月, 2016 1 次提交
  12. 09 8月, 2016 1 次提交
  13. 22 6月, 2016 1 次提交
    • D
      drm: Lobotomize set_busid nonsense for !pci drivers · a3257256
      Daniel Vetter 提交于
      We already have a fallback in place to fill out the unique from
      dev->unique, which is set to something reasonable in drm_dev_alloc.
      
      Which means we only need to have a special set_busid for pci devices,
      to be able to care the backwards compat code for drm 1.1 around, which
      libdrm still needs.
      
      While developing and testing this patch things blew up in really
      interesting ways, and the code is rather confusing in naming things
      between the kernel code, ioctl #defines and libdrm. For the next brave
      dragon slayer, document all this madness properly in the userspace
      interface section of gpu.tmpl.
      
      v2: Make drm_dev_set_unique static and update kerneldoc.
      
      v3: Entire rewrite, plus document what's going on for posterity in the
      gpu docbook uapi section.
      
      v4: Drop accidental amdgpu hunk (Emil).
      
      v5: Drop accidental omapdrm vblank counter change (Emil).
      
      v6: Rebase on top of the sphinx conversion.
      
      Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
      Cc: Emil Velikov <emil.l.velikov@gmail.com>
      Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> (virt_gpu)
      Reviewed-by: NEmil Velikov <emil.l.velikov@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      a3257256
  14. 10 6月, 2016 1 次提交
  15. 06 6月, 2016 1 次提交
  16. 02 6月, 2016 1 次提交
  17. 17 5月, 2016 1 次提交
  18. 02 5月, 2016 1 次提交
  19. 03 3月, 2016 2 次提交
    • T
      drm/omap: remove use of omapdss_find_mgr_from_display() · 179df15f
      Tomi Valkeinen 提交于
      In order to remove uses of 'struct omap_overlay_manager' we need to get
      rid of using omapdss_find_mgr_from_display() when initializing omapdrm.
      
      Instead of using omapdss_find_mgr_from_display() and mgr->id to find the
      dispc channel used for the given display, we can instead use
      omapdss_find_output_from_display(), and get the output->dispc_channel
      from there.
      
      We can also remove omapdss_find_mgr_from_display() as it's no longer
      used.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      179df15f
    • T
      drm/omap: fix suspend/resume handling · 92bf0f9e
      Tomi Valkeinen 提交于
      For legacy reasons omapdss handles system suspend/resume via PM notifier
      callback, where the driver disables/resumes all the outputs.
      
      This doesn't work well with omapdrm. What happens on suspend is that the
      omapdss disables the displays while omapdrm is still happily continuing
      its work, possibly waiting for an vsync irq, which will never come if
      the display output is disabled, leading to timeouts and errors sent to
      userspace.
      
      This patch moves the suspend/resume handling to omapdrm, and the
      suspend/resume is now done safely inside modeset lock.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      92bf0f9e
  20. 08 2月, 2016 1 次提交
  21. 31 12月, 2015 4 次提交
  22. 16 10月, 2015 1 次提交
  23. 07 10月, 2015 1 次提交
  24. 25 9月, 2015 1 次提交
  25. 08 9月, 2015 1 次提交
    • D
      drm/atomic-helper: Add option to update planes only on active crtc · aef9dbb8
      Daniel Vetter 提交于
      With drivers supporting runtime pm it's generally not a good idea to
      touch the hardware when it's off. Add an option to the commit_planes
      helper to support this case.
      
      Note that the helpers already add all planes on a crtc when a modeset
      happens, hence plane updates will not be lost if drivers set this to
      true.
      
      v2: Check for NULL state->crtc before chasing the pointer. Also check
      both old and new crtc if there's a switch. Finally just outright
      disallow switching crtcs for a plane if the plane is in active use, on
      most hardware that doesn't make sense.
      
      v3: Since commit_planes(active_only = true) is for enabling things
      only after all the crtc are on we should only look at the new crtc to
      decide whether to call the plane hooks - if the current CRTC isn't on
      then skip. If the old crtc (when moving a plane) went down then the
      plane should have been disabled as part of the pipe shutdown work
      already. For which there's currently no helper really unfortunately.
      Also move the check for wether a plane gets a new CRTC assigned while
      still in active use out of this patch.
      
      v4: Rebase over exynos changes.
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Thierry Reding <treding@nvidia.com>
      Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Reviewed-by: NThierry Reding <treding@nvidia.com>
      Tested-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      aef9dbb8
  26. 13 6月, 2015 6 次提交
    • 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: Simplify DSS power management · 69fb7c85
      Laurent Pinchart 提交于
      Instead of sprinkling dispc_runtime_get() and dispc_runtime_put() calls
      in various CRTC operations, move all power management code to the atomic
      commit function.
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      69fb7c85
    • 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: Implement asynchronous commit support · 748471a5
      Laurent Pinchart 提交于
      Implement a custom .atomic_commit() handler that supports asynchronous
      commits using a work queue. This can be used for userspace-driven
      asynchronous commits, as well as for an atomic page flip implementation.
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      748471a5
    • L
      drm: omapdrm: Switch plane update to atomic helpers · cef77d40
      Laurent Pinchart 提交于
      This removes the legacy plane update code. Wire up the default atomic
      check and atomic commit mode config helpers as needed by the plane
      update atomic helpers.
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      cef77d40
    • L
      drm: omapdrm: Wire up atomic state object scaffolding · 69a12263
      Laurent Pinchart 提交于
      Hook up the default .reset(), .atomic_duplicate_state() and
      .atomic_free_state() helpers to ensure that state objects are properly
      created and destroyed, and call drm_mode_config_reset() at init time to
      create the initial state objects.
      
      Framebuffer reference count also gets maintained automatically by the
      transitional helpers except for the legacy page flip operation. Maintain
      it explicitly there.
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      69a12263