1. 03 4月, 2017 5 次提交
    • P
      drm/omap: Use omapdss_stack_is_ready() to check that the display stack is up · a09d2bc1
      Peter Ujfalusi 提交于
      Instead of 'guessing' based on aliases of the status of the DSS drivers,
      use the new interface to check that all needed drivers are loaded.
      In this way we can be sure that all needed drivers are loaded so it is
      safe to continue the probing of omapdrm.
      This method will allow the omapdrm to be probed 'headless', without
      outputs.
      Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      a09d2bc1
    • 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
    • T
      drm/omap: move dispc related dss-feat funcs to dispc · c283400a
      Tomi Valkeinen 提交于
      omapdrm still uses a few non-dispc functions: dss_feat_get_num_mgrs(),
      dss_feat_get_num_ovls() and  dss_feat_get_supported_color_modes(). We
      want to provide omapdrm a single dispc_ops function pointer struct so
      that omapdrm will use either the current omapdss or the new omapdss6
      driver depending on the platform.
      
      Those three functions are really dispc functions, but are located in the
      dss_features.c for legacy reasons.
      
      This patch adds similar functionss to the dispc, and changes omapdrm to
      use those new functions. Underneath the functions still call the
      functions from dss_feature.c.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      c283400a
    • H
      drm/omap: Add support for render nodes · 5f6ab8ca
      Hemant Hariyani 提交于
      Add support for render nodes in omap driver and allow required
      ioctls to be accessible via render nodes.
      
      This enables unprivileged clients to allocate resources like GEM buffers
      for rendering their content into. Mode setting (KMS ioctls) is not
      allowed using render nodes. These buffers are then shared with
      a previleged process (e.g compositor) that has mode setting access.
      
      An example of this use case is Android where the hardware composer is
      the only master and has mode setting access. Every other client then
      uses render node(e.g /dev/dri/renderD128 to allocate and use its buffers.
      Signed-off-by: NHemant Hariyani <hemanthariyani@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      5f6ab8ca
    • T
      drm/omap: decrease min width & height · 1e90711d
      Tomi Valkeinen 提交于
      mode_config's min_width and min_height are both set to 32, which is
      overly restrictive.
      
      The real limits depend on whether we're configuring a crtc or a plane,
      but a limit of 8x2 is safe for both cases.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      1e90711d
  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 3 次提交
    • 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