1. 30 6月, 2018 1 次提交
  2. 12 6月, 2018 2 次提交
  3. 22 3月, 2018 4 次提交
  4. 21 3月, 2018 1 次提交
    • T
      drm/vmwgfx: Fix a destoy-while-held mutex problem. · 73a88250
      Thomas Hellstrom 提交于
      When validating legacy surfaces, the backup bo might be destroyed at
      surface validate time. However, the kms resource validation code may have
      the bo reserved, so we will destroy a locked mutex. While there shouldn't
      be any other users of that mutex when it is destroyed, it causes a lock
      leak and thus throws a lockdep error.
      
      Fix this by having the kms resource validation code hold a reference to
      the bo while we have it reserved. We do this by introducing a validation
      context which might come in handy when the kms code is extended to validate
      multiple resources or buffers.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
      Reviewed-by: NBrian Paul <brianp@vmware.com>
      Reviewed-by: NSinclair Yeh <syeh@vmware.com>
      73a88250
  5. 09 1月, 2018 1 次提交
    • T
      drm/vmwgfx: Don't cache framebuffer maps · 98648ae6
      Thomas Hellstrom 提交于
      Buffer objects need to be either pinned or reserved while a map is active,
      that's not the case here, so avoid caching the framebuffer map.
      This will cause increasing mapping activity mainly when we don't do
      page flipping.
      
      This fixes occasional garbage filled screens when the framebuffer has been
      evicted after the map.
      
      Since in-kernel mapping of whole buffer objects is error-prone on 32-bit
      architectures and also quite inefficient, we will revisit this later.
      Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
      Reviewed-by: NSinclair Yeh <syeh@vmware.com>
      Cc: <stable@vger.kernel.org>
      98648ae6
  6. 21 10月, 2017 1 次提交
    • K
      drm: Reorganize drm_pending_event to support future event types [v2] · bd386e51
      Keith Packard 提交于
      Place drm_event_vblank in a new union that includes that and a bare
      drm_event structure. This will allow new members of that union to be
      added in the future without changing code related to the existing vbl
      event type.
      
      Assignments to the crtc_id field are now done when the event is
      allocated, rather than when delievered. This way, delivery doesn't
      need to have the crtc ID available.
      
      v2:
       * Remove 'dev' argument from create_vblank_event
      
      	It wasn't being used anyways, and if we need it in the future,
      	we can always get it from crtc->dev.
      
       * Check for MODESETTING before looking for crtc in queue_vblank_event
      
      	UMS drivers will oops if we try to get a crtc, so make sure
      	we're modesetting before we try to find a crtc_id to fill into
      	the event.
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      (cherry picked from commit dc695b85fde88eca3ef3b03fcd82f15b6bc6e462)
      bd386e51
  7. 02 8月, 2017 1 次提交
    • B
      drm: Plumb modifiers through plane init · e6fc3b68
      Ben Widawsky 提交于
      This is the plumbing for supporting fb modifiers on planes. Modifiers
      have already been introduced to some extent, but this series will extend
      this to allow querying modifiers per plane. Based on this, the client to
      enable optimal modifications for framebuffers.
      
      This patch simply allows the DRM drivers to initialize their list of
      supported modifiers upon initializing the plane.
      
      v2: A minor addition from Daniel
      
      v3:
      * Updated commit message
      * s/INVALID/DRM_FORMAT_MOD_INVALID (Liviu)
      * Remove some excess newlines (Liviu)
      * Update comment for > 64 modifiers (Liviu)
      
      v4: Minor comment adjustments (Liviu)
      
      v5: Some new platforms added due to rebase
      
      v6: Add some missed plane inits (or maybe they're new - who knows at
      this point) (Daniel)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: Daniel Stone <daniels@collabora.com> (v2)
      Reviewed-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Signed-off-by: NDaniel Stone <daniels@collabora.com>
      e6fc3b68
  8. 18 7月, 2017 1 次提交
  9. 30 6月, 2017 2 次提交
  10. 28 6月, 2017 1 次提交
  11. 27 6月, 2017 1 次提交
  12. 07 6月, 2017 2 次提交
  13. 01 4月, 2017 12 次提交
  14. 29 3月, 2017 2 次提交
  15. 15 12月, 2016 1 次提交
    • V
      drm: Nuke fb->bits_per_pixel · 272725c7
      Ville Syrjälä 提交于
      Replace uses of fb->bits_per_pixel with fb->format->cpp[0]*8.
      Less duplicated information is a good thing.
      
      Note that I didn't put parens around the cpp*8 in the below cocci script,
      on account of not wanting spurious parens all over the place. Instead I
      did the unsafe way, and tried to look over the entire diff to spot if
      any dangerous expressions were produced. I didn't see any.
      
      There are some cases where previously the code did X*bpp/8, so the
      division happened after the multiplication. Those are now just X*cpp
      so the division effectively happens before the multiplication,
      but that is perfectly fine since bpp is always a multiple of 8.
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
       drm_helper_mode_fill_fb_struct(...) {
      	...
      -	FB->bits_per_pixel = E;
      	...
       }
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
       i9xx_get_initial_plane_config(...) {
      	...
      -	FB->bits_per_pixel = E;
      	...
       }
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
       ironlake_get_initial_plane_config(...) {
      	...
      -	FB->bits_per_pixel = E;
      	...
       }
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
       skylake_get_initial_plane_config(...) {
      	...
      -	FB->bits_per_pixel = E;
      	...
       }
      
      @@
      struct drm_framebuffer FB;
      expression E;
      @@
      (
      - E * FB.bits_per_pixel / 8
      + E * FB.format->cpp[0]
      |
      - FB.bits_per_pixel / 8
      + FB.format->cpp[0]
      |
      - E * FB.bits_per_pixel >> 3
      + E * FB.format->cpp[0]
      |
      - FB.bits_per_pixel >> 3
      + FB.format->cpp[0]
      |
      - (FB.bits_per_pixel + 7) / 8
      + FB.format->cpp[0]
      |
      - FB.bits_per_pixel
      + FB.format->cpp[0] * 8
      |
      - FB.format->cpp[0] * 8 != 8
      + FB.format->cpp[0] != 1
      )
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
      (
      - E * FB->bits_per_pixel / 8
      + E * FB->format->cpp[0]
      |
      - FB->bits_per_pixel / 8
      + FB->format->cpp[0]
      |
      - E * FB->bits_per_pixel >> 3
      + E * FB->format->cpp[0]
      |
      - FB->bits_per_pixel >> 3
      + FB->format->cpp[0]
      |
      - (FB->bits_per_pixel + 7) / 8
      + FB->format->cpp[0]
      |
      - FB->bits_per_pixel
      + FB->format->cpp[0] * 8
      |
      - FB->format->cpp[0] * 8 != 8
      + FB->format->cpp[0] != 1
      )
      
      @@
      struct drm_plane_state *state;
      expression E;
      @@
      (
      - E * state->fb->bits_per_pixel / 8
      + E * state->fb->format->cpp[0]
      |
      - state->fb->bits_per_pixel / 8
      + state->fb->format->cpp[0]
      |
      - E * state->fb->bits_per_pixel >> 3
      + E * state->fb->format->cpp[0]
      |
      - state->fb->bits_per_pixel >> 3
      + state->fb->format->cpp[0]
      |
      - (state->fb->bits_per_pixel + 7) / 8
      + state->fb->format->cpp[0]
      |
      - state->fb->bits_per_pixel
      + state->fb->format->cpp[0] * 8
      |
      - state->fb->format->cpp[0] * 8 != 8
      + state->fb->format->cpp[0] != 1
      )
      
      @@
      @@
      - (8 * 8)
      + 8 * 8
      
      @@
      struct drm_framebuffer FB;
      @@
      - (FB.format->cpp[0])
      + FB.format->cpp[0]
      
      @@
      struct drm_framebuffer *FB;
      @@
      - (FB->format->cpp[0])
      + FB->format->cpp[0]
      
      @@
      @@
       struct drm_framebuffer {
      	 ...
      -	 int bits_per_pixel;
      	 ...
       };
      
      v2: Clean up the 'cpp*8 != 8' and '(8 * 8)' cases (Laurent)
      v3: Adjusted the semantic patch a bit and regenerated due to code
          changes
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
      Link: http://patchwork.freedesktop.org/patch/msgid/1481751140-18352-1-git-send-email-ville.syrjala@linux.intel.com
      272725c7
  16. 16 8月, 2016 1 次提交
  17. 02 7月, 2016 1 次提交
    • T
      drm/vmwgfx: Fix corner case screen target management · beca4cf5
      Thomas Hellstrom 提交于
      When the surface backing a framebuffer doesn't match the framebuffer's
      dimensions, the screen target code would test the framebuffer dimensions
      rather than the surface dimensions when deciding whether to bind the
      surface as a screen target directly. This causes a screen target -
      surface dimension mismatch and a subsequent device error.
      
      Fix this by testing against the surface dimension.
      
      v2: Fix review comments by Sinclair Yeh.
      Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
      Reviewed-by: NSinclair Yeh <syeh@vmware.com>
      Cc: <stable@vger.kernel.org>
      beca4cf5
  18. 20 5月, 2016 1 次提交
  19. 14 3月, 2016 4 次提交