1. 01 6月, 2016 1 次提交
    • T
      drm: add missing drm_mode_set_crtcinfo call · b201e743
      Tomi Valkeinen 提交于
      When setting mode via MODE_ID property,
      drm_atomic_set_mode_prop_for_crtc() does not call
      drm_mode_set_crtcinfo() which possibly causes:
      
      "[drm:drm_calc_timestamping_constants [drm]] *ERROR* crtc 32: Can't
      calculate constants, dotclock = 0!"
      
      Whether the error is seen depends on the previous data in state->mode,
      as state->mode is not cleared when setting new mode.
      
      This patch adds drm_mode_set_crtcinfo() call to
      drm_mode_convert_umode(), which is called in both legacy and atomic
      paths. This should be fine as there's no reason to call
      drm_mode_convert_umode() without also setting the crtc related fields.
      
      drm_mode_set_crtcinfo() is removed from the legacy drm_mode_setcrtc() as
      that is no longer needed.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      b201e743
  2. 18 5月, 2016 1 次提交
  3. 05 5月, 2016 2 次提交
  4. 28 4月, 2016 2 次提交
  5. 27 4月, 2016 3 次提交
    • D
      drm: Switch blobs to the new generic modeset obj refcounting · 152ef5fa
      Daniel Vetter 提交于
      Need to move the free function around a bit, but otherwise mostly
      just removing code.
      
      Specifically we can nuke all the _locked variants since the weak idr
      reference is now protected by the idr_mutex, which we never hold
      anywhere expect in the lookup/reg/unreg functions. And those never
      call anything else.
      
      Another benefit of this is that this patch switches the weak reference
      logic from kref_put_mutex to kref_get_unless_zero. And the later is in
      general more flexible wrt accomodating multiple weak references
      protected by different locks, which might or might not come handy
      eventually.
      
      But one consequence of that switch is that we need to acquire the
      blob_lock from the free function for the list_del calls. That's a bit
      tricky to pull off, but works well if we pick the exact same scheme as
      is already used for framebuffers. Most important changes:
      
      - filp list is maintainer by create/destroy_blob ioctls directly
        (already the case, so we can just remove the redundant list_del from
        the free function).
      
      - filp close handler walks the filp-private list lockless - works
        because we know no one else can access it. I copied the same comment
        from the fb code over to explain this.
      
      - Otherwise we need to sufficiently restrict blob_lock critical
        sections to avoid all the unreference calls. Easy to do once the
        blob_lock only protects the list, and no longer the weak reference.
      
      Cc: Dave Airlie <airlied@gmail.com>
      Cc: Daniel Stone <daniels@collabora.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      152ef5fa
    • D
      drm: Fix fb leaks and WARN spew in get/set_prop ioctls · 1649c33b
      Daniel Vetter 提交于
      Dave Airlie had at least the refcount leak fixed in a later patch (but
      that patch does other things which need a bit more work). But we still
      have the trouble that silly userspace could hit the WARN_ON in
      drm_mode_object_find.
      
      Fix this all up to make sure we don't leak objects, and don't spew
      into demsg.
      
      Fixes: d0f37cf6 ("drm/mode: move framebuffer reference into object.")
      Testcase: igt/kms_addfb_basic/invalid-*-prop*
      Cc: Dave Airlie <airlied@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      1649c33b
    • D
      drm: Improve kerneldoc for new mode object refcounting · 05981422
      Daniel Vetter 提交于
      Slipped through the cracks in my review. The one issue I spotted
      is that drm_mode_object_find now acquires references and can be
      used on FB objects, which caused follow-on bugs in get/set_prop ioctls.
      Follow-up patches will fix that.
      
      [airlied: fixup some incr fb/decr object mixups]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      05981422
  6. 22 4月, 2016 11 次提交
  7. 21 4月, 2016 1 次提交
  8. 20 4月, 2016 1 次提交
  9. 12 4月, 2016 1 次提交
  10. 01 4月, 2016 1 次提交
    • E
      drm: Add an encoder and connector type enum for DPI. · 0b27c02a
      Eric Anholt 提交于
      Right now exynos is exposing DPI as a TMDS encoder and VGA connector,
      which seems rather misleading.  This isn't just an internal detail,
      since xrandr actually exposes "VGA" as the output name.  Define some
      new enums so that vc4's DPI can have a more informative name.
      
      I considered other names for the connector as well.  For VC4, the
      Adafruit DPI kippah takes the 28 GPIO pins and routes them to a
      standard-ish 40-pin FPC connector, but "40-pin FPC" doesn't uniquely
      identify an ordering of pins (apparently some other orderings exist),
      doesn't explain things as well for the user (who, if anything, knows
      their product is a DPI kippah/panel combo), and actually doesn't have
      to exist (one could connect the 28 GPIOs directly to something else).
      Simply "DPI" seems like a good compromise name to distinguish from the
      HDMI, DSI, and TV connectors .
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0b27c02a
  11. 29 3月, 2016 1 次提交
  12. 08 3月, 2016 1 次提交
  13. 01 3月, 2016 1 次提交
  14. 19 2月, 2016 1 次提交
    • M
      drm/atomic: Allow for holes in connector state, v2. · 5fff80bb
      Maarten Lankhorst 提交于
      Because we record connector_mask using 1 << drm_connector_index now
      the connector_mask should stay the same even when other connectors
      are removed. This was not the case with MST, in that case when removing
      a connector all other connectors may change their index.
      
      This is fixed by waiting until the first get_connector_state to allocate
      connector_state, and force reallocation when state is too small.
      
      As a side effect connector arrays no longer have to be preallocated,
      and can be allocated on first use which means a less allocations in
      the page flip only path.
      
      Changes since v1:
      - Whitespace. (Ville)
      - Call ida_remove when destroying the connector. (Ville)
      - u32 alloc -> int. (Ville)
      
      Fixes: 14de6c44 ("drm/atomic: Remove drm_atomic_connectors_for_crtc.")
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NLyude <cpaul@redhat.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      5fff80bb
  15. 09 2月, 2016 2 次提交
  16. 25 1月, 2016 1 次提交
  17. 13 1月, 2016 1 次提交
  18. 11 12月, 2015 6 次提交
  19. 08 12月, 2015 1 次提交
  20. 24 11月, 2015 1 次提交