1. 17 11月, 2015 2 次提交
  2. 25 9月, 2015 1 次提交
  3. 08 9月, 2015 1 次提交
    • D
      drm/atomic: refuse changing CRTC for planes directly · f8aeb41c
      Daniel Vetter 提交于
      Very strictly speaking this is possible if you have special hw and
      genlocked CRTCs. In general switching a plane between two active CRTC
      just won't work so well and is probably not tested at all. Just forbid
      it.
      
      I've put this into the core since right now no helper or driver copes
      with it, no userspace has code for it and no one asks for it. Yes
      there's piles of corner-cases where this would be possible to do this
      like:
      - switch from inactive crtc to active crtc
      - switch from active crtc to inactive crtc
      - genlocked display
      - invisible plane (to do whatever)
      - idle plane hw due to dsi cmd mode/psr
      - whatever
      but looking at details it's not that easy to implement this correctly.
      Hence just put it into the core and add a comment, since the only
      userspace we have right now for atomic (weston) doesn't want to use
      direct plane switching either.
      
      v2: don't bother with complexity and just outright disallow plane
      switching without the intermediate OFF state. Simplifies drivers, we
      don't have any hw that could do it anyway and current atomic userspace
      (weston) works like this already anyway.
      
      v3: Bikeshed function name (Ville) and add comment (Rob).
      
      v4: Also bikeshed commit message (Rob).
      
      v5: Fix compile warnings reported by 0-day.
      
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Daniel Stone <daniels@collabora.com>
      Acked-by: NDaniel Stone <daniels@collabora.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Acked-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      f8aeb41c
  4. 01 9月, 2015 1 次提交
  5. 25 8月, 2015 1 次提交
  6. 11 8月, 2015 2 次提交
  7. 22 7月, 2015 1 次提交
    • D
      drm: Roll out drm_for_each_connector more · 9a9f5ce8
      Daniel Vetter 提交于
      Now that we also grab the connection_mutex and so fixed the race with
      atomic modeset we can use the iterator there too.
      
      The other special case is drm_connector_unplug_all which would have a
      locking inversion with the sysfs store/show functions if we'd grab the
      mode_config.mutex around the unplug. We could just grab
      connection_mutex instead, but that's a bit too much a dirty trick for
      my taste. Also it's only used by udl, which doesn't do any other kind
      of connector hotplugging, so should be race-free. Hence just stick
      with a comment for now.
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      9a9f5ce8
  8. 07 7月, 2015 1 次提交
  9. 02 7月, 2015 1 次提交
  10. 19 6月, 2015 1 次提交
  11. 26 5月, 2015 3 次提交
  12. 21 5月, 2015 1 次提交
  13. 18 5月, 2015 1 次提交
  14. 13 5月, 2015 1 次提交
  15. 12 4月, 2015 1 次提交
  16. 07 4月, 2015 1 次提交
  17. 30 3月, 2015 2 次提交
  18. 23 3月, 2015 2 次提交
  19. 10 3月, 2015 2 次提交
  20. 23 2月, 2015 1 次提交
    • D
      drm: Add DRM_DEBUG_ATOMIC · 17a38d9c
      Daniel Vetter 提交于
      Atomic state handling adds a lot of indirection and complexity between
      simple updates and drivers. For easier debugging the diagnostic output
      is therefore rather chatty. Which is great for tracking down atomic
      issues, but really annoying otherwise.
      
      Add a new DRM_DEBUG_ATOMIC to be able to filter this out.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      17a38d9c
  21. 27 1月, 2015 3 次提交
    • A
      drm/atomic: Fix potential use of state after free · 9469244d
      Ander Conselvan de Oliveira 提交于
      The atomic helpers rely on drm_atomic_state_clear() to reset an atomic
      state if a retry is needed due to the w/w mutexes. The subsequent calls
      to drm_atomic_get_{crtc,plane,...}_state() would then return the stale
      pointers in state->{crtc,plane,...}_states.
      Signed-off-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9469244d
    • D
      drm/atomic: Add drm_crtc_state->active · eab3bbef
      Daniel Vetter 提交于
      This is the infrastructure for DPMS ported to the atomic world.
      Fundamental changes compare to legacy DPMS are:
      
      - No more per-connector dpms state, instead there's just one per each
        display pipeline. So if you clone either you have to unclone first
        if you only want to switch off one screen, or you just switch of
        everything (like all desktops do). This massively reduces complexity
        for cloning since now there's no more half-enabled cloned configs to
        consider.
      
      - Only on/off, dpms standby/suspend are as dead as real CRTs. Again
        reduces complexity a lot.
      
      Now especially for backwards compat the really important part for dpms
      support is that dpms on always succeeds (except for hw death and
      unplugged cables ofc). Which means everything that could fail (like
      configuration checking, resources assignments and buffer management)
      must be done irrespective from ->active. ->active is really only a
      toggle to change the hardware state. More precisely:
      
      - Drivers MUST NOT look at ->active in their ->atomic_check callbacks.
        Changes to ->active MUST always suceed if nothing else changes.
      
      - Drivers using the atomic helpers MUST NOT look at ->active anywhere,
        period. The helpers will take care of calling the respective
        enable/modeset/disable hooks as necessary. As before the helpers
        will carefully keep track of the state and not call any hooks
        unecessarily, so still no double-disables or enables like with crtc
        helpers.
      
      - ->mode_set hooks are only called when the mode or output
        configuration changes, not for changes in ->active state.
      
      - Drivers which reconstruct the state objects in their ->reset hooks
        or through some other hw state readout infrastructure must ensure
        that ->active reflects actual hw state.
      
      This just implements the core bits and helper logic, a subsequent
      patch will implement the helper code to implement legacy dpms with
      this.
      
      v2: Rebase on top of the drm ioctl work:
      - Move crtc checks to the core check function.
      - Also check for ->active_changed when deciding whether a modeset
        might happen (for the ALLOW_MODESET mode).
      - Expose the ->active state with an atomic prop.
      
      v3: Review from Rob
      - Spelling fix in comment.
      - Extract needs_modeset helper to consolidate the ->mode_changed ||
        ->active_changed checks.
      
      v4: Fixup fumble between crtc->state and crtc_state.
      
      Cc: Rob Clark <robdclark@gmail.com>
      Reviewed-by: NThierry Reding <treding@nvidia.com>
      Tested-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      eab3bbef
    • M
      drm: Add rotation value to plane state · 1da30627
      Matt Roper 提交于
      The rotation property is shared by multiple drivers, so it makes sense
      to store the rotation value (for atomic-converted drivers) in the common
      plane state so that core code can eventually access it as well.
      
      Cc: dri-devel@lists.freedesktop.org
      Suggested-by: NDaniel Vetter <daniel@ffwll.ch>
      Reviewed-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      1da30627
  22. 21 1月, 2015 1 次提交
  23. 05 1月, 2015 6 次提交
  24. 19 12月, 2014 2 次提交
  25. 18 12月, 2014 1 次提交
    • D
      drm/atomic: Introduce state->obj backpointers · 07cc0ef6
      Daniel Vetter 提交于
      Useful since this way we can pass around just the state objects and
      will get ther real object, too.
      
      Specifically this allows us to again simplify the parameters for
      set_crtc_for_plane.
      
      v2: msm already has it's own specific plane_reset hook, don't forget
      that one!
      
      v3: Fixup kerneldoc, reported by 0-day builder.
      
      Cc: Rob Clark <robdclark@gmail.com>
      Reviewed-by: Rob Clark <robdclark@gmail.com> (v2)
      Tested-by: Rob Clark <robdclark@gmail.com> (v2)
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      07cc0ef6