1. 16 6月, 2015 1 次提交
  2. 25 5月, 2015 3 次提交
  3. 03 3月, 2015 1 次提交
    • L
      drm: rcar-du: Fix race condition in hardware plane allocator · 5ee5a81d
      Laurent Pinchart 提交于
      The plane allocator has been inherently racy since the beginning of the
      transition to atomic updates, as the allocator lock is released between
      free plane check (at .atomic_check() time) and the reservation (at
      .atomic_update() time).
      
      To fix it, create a new allocator solely based on the atomic plane
      states without keeping any external state and perform allocation in the
      .atomic_check() handler. The core idea is to replace the free planes
      bitmask with a collective knowledge based on the allocated hardware
      plane(s) for each KMS plane. The allocator then loops over all plane
      states to compute the free planes bitmask, allocates hardware planes
      based on that bitmask, and stores the result back in the plane states.
      
      For this to work we need to access the current state of planes not
      touched by the atomic update. To ensure that it won't be modified, we
      need to lock all planes using drm_atomic_get_plane_state(). This
      effectively serializes atomic updates from .atomic_check() up to
      completion, either when swapping the states if the check step has
      succeeded, or when freeing the states if the check step has failed.
      Suggested-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      5ee5a81d
  4. 15 9月, 2014 1 次提交
  5. 10 8月, 2013 4 次提交