1. 08 9月, 2015 1 次提交
  2. 12 8月, 2015 1 次提交
  3. 06 8月, 2015 1 次提交
  4. 27 7月, 2015 1 次提交
  5. 22 7月, 2015 6 次提交
  6. 07 7月, 2015 2 次提交
    • Z
      drm: add a check for x/y in drm_mode_setcrtc · 01447e9f
      Zhao Junwang 提交于
      legacy setcrtc ioctl does take a 32 bit value which might indeed
      overflow
      
      the checks of crtc_req->x > INT_MAX and crtc_req->y > INT_MAX aren't
      needed any more with this
      
      v2: -polish the annotation according to Daniel's comment
      
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NZhao Junwang <zhjwpku@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      01447e9f
    • D
      drm: Update plane->fb also for page_flip · 3cb43cc0
      Daniel Vetter 提交于
      The legacy page_flip driver entry point is the only one left which
      requires drivers to update plane->fb themselves. All the other entry
      hooks will patch things up for the driver as needed since no one seems
      to reliable get this right, see e.g. drm_mode_set_config_internal or
      the plane->fb/old_fb handling in drm_mode_atomic_ioctl.
      
      Therefore unify things, which allows us to ditch a TODO from
      drm_atomic_helper_page_flip.
      
      This should also help the atomic transition in i915 since we keep a
      bit of legacy cruft only around because of this special behaviour in
      ->page_flip.
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      3cb43cc0
  7. 06 7月, 2015 1 次提交
  8. 04 7月, 2015 1 次提交
  9. 02 7月, 2015 1 次提交
  10. 12 6月, 2015 1 次提交
  11. 26 5月, 2015 3 次提交
  12. 22 5月, 2015 6 次提交
  13. 12 5月, 2015 1 次提交
  14. 08 5月, 2015 2 次提交
  15. 07 5月, 2015 1 次提交
  16. 14 4月, 2015 1 次提交
    • M
      drm: Make integer overflow checking cover universal cursor updates (v2) · 3968be94
      Matt Roper 提交于
      Our legacy SetPlane updates perform integer overflow checking on a
      plane's destination rectangle in drm_mode_setplane(), and atomic updates
      handled as part of a drm_atomic_state transaction do the same checking
      in drm_atomic_plane_check().  However legacy cursor updates that get
      routed through universal plane interfaces may bypass this overflow
      checking if the driver's .update_plane is serviced by the transitional
      plane helpers rather than the full atomic plane helpers.
      
      Move the check for destination rectangle integer overflow from the
      drm_mode_setplane() to __setplane_internal() so that it also covers
      cursor operations.
      
      This fixes an issue first noticed with i915 commit:
      
              commit ff42e093
              Author: Daniel Vetter <daniel.vetter@ffwll.ch>
              Date:   Mon Mar 2 16:35:20 2015 +0100
      
                  Revert "drm/i915: Switch planes from transitional helpers to full
                  atomic helpers"
      
      The above revert switched us from full atomic helpers back to the
      transitional helpers, and in doing so we lost the overflow checking here
      for universal cursor updates.  Even though such extreme cursor positions
      are unlikely to actually happen in the wild, we still don't want there
      to be a change of behavior when drivers switch from transitional helpers
      to full helpers.
      
      v2: Move check from setplane ioctl to setplane_internal rather than
          adding an additional copy of the checks to the transitional plane
          helpers.  (Daniel)
      
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Testcase: igt/kms_cursor_crc
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84269Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3968be94
  17. 10 4月, 2015 1 次提交
  18. 08 4月, 2015 1 次提交
  19. 02 4月, 2015 1 次提交
  20. 24 3月, 2015 1 次提交
    • D
      drm: Fixup racy refcounting in plane_force_disable · 8218c3f4
      Daniel Vetter 提交于
      Originally it was impossible to be dropping the last refcount in this
      function since there was always one around still from the idr. But in
      
      commit 83f45fc3
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Wed Aug 6 09:10:18 2014 +0200
      
          drm: Don't grab an fb reference for the idr
      
      we've switched to weak references, broke that assumption but forgot to
      fix it up.
      
      Since we still force-disable planes it's only possible to hit this
      when racing multiple rmfb with fbdev restoring or similar evil things.
      As long as userspace is nice it's impossible to hit the BUG_ON.
      
      But the BUG_ON would most likely be hit from fbdev code, which usually
      invovles the console_lock besides all modeset locks. So very likely
      we'd never get the bug reports if this was hit in the wild, hence
      better be safe than sorry and backport.
      
      Spotted by Matt Roper while reviewing other patches.
      
      [airlied: pull this back into 4.0 - the oops happens there]
      
      Cc: stable@vger.kernel.org
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      8218c3f4
  21. 17 3月, 2015 1 次提交
  22. 10 3月, 2015 5 次提交
    • L
      drm: Check in setcrtc if the primary plane supports the fb pixel format · 7eb5f302
      Laurent Pinchart 提交于
      Drivers implementing the universal planes API report the list of
      supported pixel formats for the primary plane. Make sure the fb passed
      to the setcrtc ioctl is compatible.
      
      Drivers not implementing the universal planes API will have no format
      reported for the primary plane, skip the check in that case.
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7eb5f302
    • L
      drm: Share plane pixel format check code between legacy and atomic · ead8610d
      Laurent Pinchart 提交于
      Both the legacy and atomic helpers need to check whether a plane
      supports a given pixel format. The code is currently duplicated, share
      it.
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      [danvet: Slightly extend the docbook.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ead8610d
    • D
      drm: Fixup racy refcounting in plane_force_disable · 220dd2bc
      Daniel Vetter 提交于
      Originally it was impossible to be dropping the last refcount in this
      function since there was always one around still from the idr. But in
      
      commit 83f45fc3
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Wed Aug 6 09:10:18 2014 +0200
      
          drm: Don't grab an fb reference for the idr
      
      we've switched to weak references, broke that assumption but forgot to
      fix it up.
      
      Since we still force-disable planes it's only possible to hit this
      when racing multiple rmfb with fbdev restoring or similar evil things.
      As long as userspace is nice it's impossible to hit the BUG_ON.
      
      But the BUG_ON would most likely be hit from fbdev code, which usually
      invovles the console_lock besides all modeset locks. So very likely
      we'd never get the bug reports if this was hit in the wild, hence
      better be safe than sorry and backport.
      
      Spotted by Matt Roper while reviewing other patches.
      
      Cc: stable@vger.kernel.org
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      220dd2bc
    • D
      drm: Remove redundant code in the getencoder ioctl · 84428531
      Daniel Vetter 提交于
      When enabling atomic state object for this ioctl in
      
      commit abd69c55
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Tue Nov 25 23:50:05 2014 +0100
      
          drm: Handle atomic state properly in kms getfoo ioctl
      
      I've forgotten to remove this hunk in one of the later revisions.
      drm_encoder_get_crtc already does this.
      
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      84428531
    • C
      drm: Don't assign fbs for universal cursor support to files · 9a6f5130
      Chris Wilson 提交于
      The internal framebuffers we create to remap legacy cursor ioctls to
      plane operations for the universal plane support shouldn't be linke to
      the file like normal userspace framebuffers. This bug goes back to the
      original universal cursor plane support introduced in
      
      commit 161d0dc1
      Author: Matt Roper <matthew.d.roper@intel.com>
      Date:   Tue Jun 10 08:28:10 2014 -0700
      
          drm: Support legacy cursor ioctls via universal planes when possible (v4)
      
      The isn't too disastrous since fbs are small, we only create one when the
      cursor bo gets changed and ultimately they'll be reaped when the window
      server restarts.
      
      Conceptually we'd want to just pass NULL for file_priv when creating it,
      but the driver needs the file to lookup the underlying buffer object for
      cursor id. Instead let's move the file_priv linking out of
      add_framebuffer_internal() into the addfb ioctl implementation, which is
      the only place it is needed. And also rename the function for a more
      accurate since it only creates the fb, but doesn't add it anywhere.
      
      Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> (fix & commit msg)
      Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (provider of lipstick)
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      9a6f5130