An error occurred fetching the project authors.
  1. 11 May, 2018 1 commit
    • Ankit Nautiyal's avatar
      drm: Handle aspect ratio info in legacy modeset path · ace5bf0e
      Ankit Nautiyal authored
      If the user-space does not support aspect-ratio, and requests for a
      modeset with mode having aspect ratio bits set, then the given
      user-mode must be rejected. Secondly, while preparing a user-mode from
      kernel mode, the aspect-ratio info must not be given, if aspect-ratio
      is not supported by the user.
      
      This patch:
      1. rejects the modes with aspect-ratio info, during modeset, if the
         user does not support aspect ratio.
      2. does not load the aspect-ratio info in user-mode structure, if
         aspect ratio is not supported.
      3. adds helper functions for determining if aspect-ratio is expected
         in user-mode and for allowing/disallowing the aspect-ratio, if its
         not expected.
      Signed-off-by: default avatarAnkit Nautiyal <ankit.k.nautiyal@intel.com>
      
      V3: Addressed review comments from Ville:
          Do not corrupt the current crtc state by updating aspect-ratio on
          the fly.
      V4: rebase
      V5: As suggested by Ville, rejected the modeset calls for modes with
          aspect ratio, if the user does not set aspect-ratio cap.
      V6: Used the helper functions for determining if aspect-ratio is
          expected in the user-mode.
      V7: rebase
      V8: rebase
      V9: rebase
      V10: Modified the commit-message
      V11: rebase
      V12: Merged the patch for adding aspect-ratio helper functions
           with this patch.
      V13: Minor modifications as suggested by Ville.
      V14: Removed helper functions, as they were used only once in legacy
           modeset path, as suggested by Daniel Vetter.
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1525777785-9740-8-git-send-email-ankit.k.nautiyal@intel.com
      ace5bf0e
  2. 03 May, 2018 2 commits
  3. 29 Mar, 2018 4 commits
  4. 26 Feb, 2018 1 commit
  5. 29 Jan, 2018 2 commits
  6. 12 Oct, 2017 1 commit
  7. 13 Sep, 2017 1 commit
  8. 08 Aug, 2017 2 commits
    • Daniel Vetter's avatar
      drm: Handle properties in the core for atomic drivers · 144a7999
      Daniel Vetter authored
      The reason behind the original indirection through the helper
      functions was to allow existing drivers to overwrite how they handle
      properties. For example when a vendor-specific userspace had
      expectations that didn't match atomic. That seemed likely, since
      atomic is standardizing a _lot_ more of the behaviour of a kms driver.
      
      But 20 drivers later there's no such need at all. Worse, this forces
      all drivers to hook up the default behaviour, breaking userspace if
      they forget to do that. And it forces us to export a bunch of core
      function just for those helpers.
      
      And finally, these helpers are the last places using
      drm_atomic_legacy_backoff() and the implicit acquire_ctx.
      
      This patch here just implements the new behaviour and updates the
      docs. Follow-up patches will garbage-collect all the dead code.
      
      v2: Fixup docs even better!
      
      v3: Make it actually work ...
      
      v4: Drop the uses_atomic_modeset() checks from the previous patch
      again, since they're now moved up in the callchain.
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: Archit Taneja <architt@codeaurora.org> (v3)
      Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170725120204.2107-1-daniel.vetter@ffwll.ch
      144a7999
    • Daniel Vetter's avatar
      drm: Don't update property values for atomic drivers · 4a97a3da
      Daniel Vetter authored
      Atomic drivers only use the property value store for immutable (i.e.
      can't be set by userspace, but the kernel can still adjust it)
      properties. The only tricky part is the removal of the update in
      drm_atomic_helper_update_legacy_modeset_state().
      
      This was added in
      
      commit 8c10342c (tag: topic/drm-misc-2015-07-28)
      Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Date:   Mon Jul 27 13:24:29 2015 +0200
      
          drm/atomic: Update legacy DPMS state during modesets, v3.
      
      by copying it from the i915 code, where it was originally added in
      
      commit 68d34720
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Thu Sep 6 22:08:35 2012 +0200
      
          drm/i915: update dpms property in set_mode
      
      for the legacy modeset code. The reason we needed this hack was that
      i915 didn't yet set DRIVER_ATOMIC, and we checked for that instead of
      the newer-ish drm_drv_uses_atomic_modeset(), which avoids such
      troubles. With the correct feature checks this isn't needed anymore at
      all.
      
      Also make sure that drivers don't accidentally get this wrong by
      making the exported version of drm_object_property_get_value() only
      work for legacy drivers. Only gma500 uses it anyway.
      
      v2: Fixup the uses_atomic_modeset() checks (Maarten)
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170725120137.1903-1-daniel.vetter@ffwll.ch
      4a97a3da
  9. 06 Apr, 2017 1 commit
  10. 29 Mar, 2017 5 commits
  11. 27 Mar, 2017 1 commit
  12. 28 Feb, 2017 3 commits
  13. 26 Jan, 2017 1 commit
  14. 25 Jan, 2017 2 commits
  15. 09 Jan, 2017 1 commit
  16. 30 Dec, 2016 1 commit
  17. 15 Dec, 2016 1 commit
    • Ville Syrjälä's avatar
      drm: Nuke fb->pixel_format · 438b74a5
      Ville Syrjälä authored
      Replace uses of fb->pixel_format with fb->format->format.
      Less duplicated information is a good thing.
      
      Note that coccinelle failed to eliminate the
      "/* fourcc format */" comment from drm_framebuffer.h, so I had
      to do that part manually.
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
       drm_helper_mode_fill_fb_struct(...) {
      	...
      -	FB->pixel_format = E;
      	...
       }
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
       i9xx_get_initial_plane_config(...) {
      	...
      -	FB->pixel_format = E;
      	...
       }
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
       ironlake_get_initial_plane_config(...) {
      	...
      -	FB->pixel_format = E;
      	...
       }
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
       skylake_get_initial_plane_config(...) {
      	...
      -	FB->pixel_format = E;
      	...
       }
      
      @@
      struct drm_framebuffer *a;
      struct drm_framebuffer b;
      @@
      (
      - a->pixel_format
      + a->format->format
      |
      - b.pixel_format
      + b.format->format
      )
      
      @@
      struct drm_plane_state *a;
      struct drm_plane_state b;
      @@
      (
      - a->fb->pixel_format
      + a->fb->format->format
      |
      - b.fb->pixel_format
      + b.fb->format->format
      )
      
      @@
      struct drm_crtc *CRTC;
      @@
      (
      - CRTC->primary->fb->pixel_format
      + CRTC->primary->fb->format->format
      |
      - CRTC->primary->state->fb->pixel_format
      + CRTC->primary->state->fb->format->format
      )
      
      @@
      struct drm_mode_set *set;
      @@
      (
      - set->fb->pixel_format
      + set->fb->format->format
      |
      - set->crtc->primary->fb->pixel_format
      + set->crtc->primary->fb->format->format
      )
      
      @@
      @@
       struct drm_framebuffer {
      	 ...
      -	 uint32_t pixel_format;
      	 ...
       };
      
      v2: Fix commit message (Laurent)
          Rebase due to earlier removal of many fb->pixel_format uses,
          including the 'fb->format = drm_format_info(fb->format->format);'
          snafu
      v3: Adjusted the semantic patch a bit and regenerated due to code
          changes
      
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
      Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1481751175-18463-1-git-send-email-ville.syrjala@linux.intel.com
      438b74a5
  18. 13 Dec, 2016 1 commit
  19. 07 Dec, 2016 1 commit
  20. 16 Nov, 2016 2 commits
    • Gustavo Padovan's avatar
      drm/fence: add out-fences support · beaf5af4
      Gustavo Padovan authored
      Support DRM out-fences by creating a sync_file with a fence for each CRTC
      that sets the OUT_FENCE_PTR property.
      
      We use the out_fence pointer received in the OUT_FENCE_PTR prop to send
      the sync_file fd back to userspace.
      
      The sync_file and fd are allocated/created before commit, but the
      fd_install operation only happens after we know that commit succeed.
      
      v2: Comment by Rob Clark:
      	- Squash commit that adds DRM_MODE_ATOMIC_OUT_FENCE flag here.
      
          Comment by Daniel Vetter:
      	- Add clean up code for out_fences
      
      v3: Comments by Daniel Vetter:
      	- create DRM_MODE_ATOMIC_EVENT_MASK
      	- userspace should fill out_fences_ptr with the crtc_ids for which
      	it wants fences back.
      
      v4: Create OUT_FENCE_PTR properties and remove old approach.
      
      v5: Comments by Brian Starkey:
      	- Remove extra fence_get() in atomic_ioctl()
      	- Check ret before iterating on the crtc_state
      	- check ret before fd_install
      	- set fence_state to NULL at the beginning
      	- check fence_state->out_fence_ptr before put_user()
      	- change order of fput() and put_unused_fd() on failure
      
           - Add access_ok() check to the out_fence_ptr received
           - Rebase after fence -> dma_fence rename
           - Store out_fence_ptr in the drm_atomic_state
           - Split crtc_setup_out_fence()
           - return -1 as out_fence with TEST_ONLY flag
      
      v6: Comments by Daniel Vetter
      	- Add prepare/unprepare_crtc_signaling()
      	- move struct drm_out_fence_state to drm_atomic.c
      	- mark get_crtc_fence() as static
      
          Comments by Brian Starkey
      	- proper set fence_ptr fence_state array
      	- isolate fence_idx increment
      
          - improve error handling
      
      v7: Comments by Daniel Vetter
      	- remove prefix from internal functions
      	- make out_fence_ptr an s64 pointer
      	- degrade DRM_INFO to DRM_DEBUG_ATOMIC when put_user fail
      	- fix doc issues
      	- filter out OUT_FENCE_PTR == NULL and do not fail in this case
      	- add complete_crtc_signalling()
      	- krealloc fence_state on demand
      
          Comment by Brian Starkey
      	- remove unused crtc_state arg from get_out_fence()
      
      v8: Comment by Brian Starkey
      	- cancel events before check for !fence_state
      	- convert a few lefovers u64 types for out_fence_ptr
      	- fix memleak by assign fence_state earlier after realloc
      	- proper accout num_fences in case of error
      
      v9: Comment by Brian Starkey
      	- memset last position of fence_state after krealloc
          Comments by Sean Paul
      	- pass install_fds in complete_crtc_signaling() instead of ret
      
           - put_user(-1, fence_ptr) when decoding props
      
      v10: Comment by Brian Starkey
      	- remove unneeded num_fences increment on error path
      	- kfree fence_state after installing fences fd
      
      v11: rebase against latest drm-misc
      
      v12: rebase again against latest drm-misc
      Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Reviewed-by: Brian Starkey <brian.starkey@arm.com> (v10)
      Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
      Tested-by: Robert Foss <robert.foss@collabora.com> (v10)
      [danvet: Appease checkpatch.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1479301221-13056-1-git-send-email-gustavo@padovan.org
      beaf5af4
    • Gustavo Padovan's avatar
      drm/fence: add fence timeline to drm_crtc · 6d6003c4
      Gustavo Padovan authored
      Create one timeline context for each CRTC to be able to handle out-fences
      and signal them. It adds a few members to struct drm_crtc: fence_context,
      where we store the context we get from fence_context_alloc(), the
      fence seqno and the fence lock, that we pass in fence_init() to be
      used by the fence.
      
      v2: Comment by Daniel Stone:
      	- add BUG_ON() to fence_to_crtc() macro
      
      v3: Comment by Ville Syrjälä
      	- Use more meaningful name as crtc timeline name
      
      v4: Comments by Brian Starkey
      	- Use even more meaninful name for the crtc timeline
      	- add doc for timeline_name
          Comment by Daniel Vetter
      	- use in-line style for comments
      
          - rebase after fence -> dma_fence rename
      
      v5: Comment by Daniel Vetter
      	- Add doc for drm_crtc_fence_ops
      
      v6: Comment by Chris Wilson
      	- Move fence_to_crtc to drm_crtc.c
      	- Move export of drm_crtc_fence_ops to drm_crtc_internal.h
      
          - rebase against latest drm-misc
      Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v5)
      Reviewed-by: Sean Paul <seanpaul@chromium.org> (v5)
      Tested-by: Robert Foss <robert.foss@collabora.com> (v5)
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1479220628-10204-1-git-send-email-gustavo@padovan.org
      6d6003c4
  21. 15 Nov, 2016 4 commits
  22. 12 Nov, 2016 1 commit
  23. 08 Nov, 2016 1 commit