1. 29 4月, 2014 5 次提交
  2. 24 4月, 2014 2 次提交
    • D
      drm: Handle ->disable_plane failures correctly · 731cce48
      Daniel Vetter 提交于
      The ->disable_plane hook always had a return value, but only since the
      introduction of primary planes was there any implementation that
      actually failed.
      
      So handle such failures correctly.
      
      Note that drm_plane_force_disable is special: In the modeset cleanup
      case we first disable all crtc, so primary planes should all be freed
      already. And in the fb helper we only reset non-primary planes. Still
      better be paranoid and add an early return.
      
      I don't see how this could happen, but it might fix the fb refcount
      underrun Thierry is seeing. Matt Roper spotted this issue.
      
      Cc: Thierry Reding <treding@nvidia.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      731cce48
    • D
      drm: Simplify fb refcounting rules around ->update_plane · 0fe27f06
      Daniel Vetter 提交于
      The introduction of primary planes has apparently caused a bit of fb
      refcounting fun for people. That makes it a good time to clean up the
      arcane rules and slight differences between ->update_plane and
      ->set_config. The new rules are:
      
      - The core holds a reference for both the new and the old fb (if
        they're non-NULL of course) while calling into the driver through
        either ->update_plane or ->set_config.
      
      - Drivers may not clobber plane->fb if their callback fails. If they
        do that, they need to store a pointer to the old fb in it again.
        When calling into the driver plane->fb still points at the current
        (old) framebuffer.
      
      - The core will update the plane->fb pointer on success. Drivers can
        do that themselves too, but aren't required to any more for the
        primary plane.
      
      - The core will update fb refcounts for the plane->fb pointer,
        presuming the drivers hold up their end of the bargain.
      
      v2: Remove now unused tmpfb (Thierry)
      
      v3: Drop broken changes from drm_mode_setplane (Ville). Also polish
      the commit message a bit.
      
      v4: Also fix up the handling of ->disable_plane in
      drm_plane_force_disable. The issue was that we didn't save plane->fb
      over the ->disable_plane call. Just paranoia, nothing relies on this.
      
      v5: Keep still useful comments about directly calling ->set_config,
      which I should have done for v4 already. Requested by Matt.
      
      Cc: Thierry Reding <treding@nvidia.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0fe27f06
  3. 22 4月, 2014 5 次提交
  4. 19 4月, 2014 2 次提交
  5. 18 4月, 2014 14 次提交
  6. 17 4月, 2014 12 次提交