1. 14 6月, 2019 1 次提交
  2. 08 6月, 2019 1 次提交
  3. 28 5月, 2019 1 次提交
  4. 29 4月, 2019 1 次提交
  5. 11 12月, 2018 1 次提交
  6. 05 12月, 2018 1 次提交
  7. 08 11月, 2018 3 次提交
  8. 03 11月, 2018 1 次提交
    • R
      drm: Add connector property to limit max bpc · 47e22ff1
      Radhakrishna Sripada 提交于
      At times 12bpc HDMI cannot be driven due to faulty cables, dongles
      level shifters etc. To workaround them we may need to drive the output
      at a lower bpc. Currently the user space does not have a way to limit
      the bpc. The default bpc to be programmed is decided by the driver and
      is run against connector limitations.
      
      Creating a new connector property "max bpc" in order to limit the bpc.
      xrandr can make use of this connector property to make sure that bpc does
      not exceed the configured value. This property can be used by userspace to
      set the bpc.
      
      V2: Initialize max_bpc to satisfy kms_properties
      V3: Move the property to drm_connector
      V4: Split drm and i915 components(Ville)
      V5: Make the property per connector(Ville)
      V6: Compare the requested bpc to connector bpc(Daniel)
          Move the attach_property function to core(Ville)
      V7: Fix checkpatch warnings
      V8: Simplify the connector check code(Ville)
      V9: Const display_info(Ville)
      V10,V11: Fix CI issues.
      V12: Add the Kernel documentation(Daniel)
      V14: Crossreference the function name in the doc(Daniel)
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Kishore Kadiyala <kishore.kadiyala@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Manasi Navare <manasi.d.navare@intel.com>
      Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Cc: Sunpeng Li <sunpeng.li@amd.com>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NRadhakrishna Sripada <radhakrishna.sripada@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181012184233.29250-1-radhakrishna.sripada@intel.com
      47e22ff1
  9. 19 10月, 2018 1 次提交
    • L
      drm: Get ref on CRTC commit object when waiting for flip_done · 4364bcb2
      Leo Li 提交于
      This fixes a general protection fault, caused by accessing the contents
      of a flip_done completion object that has already been freed. It occurs
      due to the preemption of a non-blocking commit worker thread W by
      another commit thread X. X continues to clear its atomic state at the
      end, destroying the CRTC commit object that W still needs. Switching
      back to W and accessing the commit objects then leads to bad results.
      
      Worker W becomes preemptable when waiting for flip_done to complete. At
      this point, a frequently occurring commit thread X can take over. Here's
      an example where W is a worker thread that flips on both CRTCs, and X
      does a legacy cursor update on both CRTCs:
      
              ...
           1. W does flip work
           2. W runs commit_hw_done()
           3. W waits for flip_done on CRTC 1
           4. > flip_done for CRTC 1 completes
           5. W finishes waiting for CRTC 1
           6. W waits for flip_done on CRTC 2
      
           7. > Preempted by X
           8. > flip_done for CRTC 2 completes
           9. X atomic_check: hw_done and flip_done are complete on all CRTCs
          10. X updates cursor on both CRTCs
          11. X destroys atomic state
          12. X done
      
          13. > Switch back to W
          14. W waits for flip_done on CRTC 2
          15. W raises general protection fault
      
      The error looks like so:
      
          general protection fault: 0000 [#1] PREEMPT SMP PTI
          **snip**
          Call Trace:
           lock_acquire+0xa2/0x1b0
           _raw_spin_lock_irq+0x39/0x70
           wait_for_completion_timeout+0x31/0x130
           drm_atomic_helper_wait_for_flip_done+0x64/0x90 [drm_kms_helper]
           amdgpu_dm_atomic_commit_tail+0xcae/0xdd0 [amdgpu]
           commit_tail+0x3d/0x70 [drm_kms_helper]
           process_one_work+0x212/0x650
           worker_thread+0x49/0x420
           kthread+0xfb/0x130
           ret_from_fork+0x3a/0x50
          Modules linked in: x86_pkg_temp_thermal amdgpu(O) chash(O)
          gpu_sched(O) drm_kms_helper(O) syscopyarea sysfillrect sysimgblt
          fb_sys_fops ttm(O) drm(O)
      
      Note that i915 has this issue masked, since hw_done is signaled after
      waiting for flip_done. Doing so will block the cursor update from
      happening until hw_done is signaled, preventing the cursor commit from
      destroying the state.
      
      v2: The reference on the commit object needs to be obtained before
          hw_done() is signaled, since that's the point where another commit
          is allowed to modify the state. Assuming that the
          new_crtc_state->commit object still exists within flip_done() is
          incorrect.
      
          Fix by getting a reference in setup_commit(), and releasing it
          during default_clear().
      Signed-off-by: NLeo Li <sunpeng.li@amd.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NHarry Wentland <harry.wentland@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1539611200-6184-1-git-send-email-sunpeng.li@amd.com
      4364bcb2
  10. 18 9月, 2018 1 次提交
  11. 09 9月, 2018 2 次提交
  12. 25 8月, 2018 1 次提交
    • L
      drm: Add per-plane pixel blend mode property · a5ec8332
      Lowry Li 提交于
      Pixel blend modes represent the alpha blending equation
      selection, describing how the pixels from the current
      plane are composited with the background.
      
      Adds a pixel_blend_mode to drm_plane_state and a
      blend_mode_property to drm_plane, and related support
      functions.
      
      Defines three blend modes in drm_blend.h.
      
      Changes since v1:
       - Moves the blending equation into the DOC comment
       - Refines the comments of drm_plane_create_blend_mode_property to not
         enumerate the #defines, but instead the string values
       - Uses fg.* instead of pixel.* and plane_alpha instead of plane.alpha
      Changes since v2:
       - Refines the comments of drm_plane_create_blend_mode_property:
            1) Puts the descriptions (after the ":") on a new line
            2) Adds explaining why @supported_modes need PREMUL as default
      Changes since v3:
       - Refines drm_plane_create_blend_mode_property(). drm_property_add_enum()
         can calculate the index itself just fine, so no point in having the
         caller pass it in.
       - Since the current DRM assumption is that alpha is premultiplied
         as default, define DRM_MODE_BLEND_PREMULTI as 0 will be better.
       - Refines some comments.
      Changes since v4:
       - Adds comments in drm_blend.h.
       - Removes setting default value in drm_plane_create_blend_mode_property()
         as it is already in __drm_atomic_helper_plane_reset().
       - Fixes to use state->pixel_blend_mode instead of using
         plane->state->pixel_blend_mode in reset function.
       - Rebases on drm-misc-next.
      Reviewed-by: NLiviu Dudau <liviu.dudau@arm.com>
      Signed-off-by: NLowry Li <lowry.li@arm.com>
      Signed-off-by: NAyan Kumar Halder <ayan.halder@arm.com>
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/245734/
      a5ec8332
  13. 07 7月, 2018 1 次提交
  14. 06 7月, 2018 1 次提交
  15. 05 7月, 2018 1 次提交
    • B
      drm: mali-dp: Add writeback connector · 8cbc5caf
      Brian Starkey 提交于
      Mali-DP has a memory writeback engine which can be used to write the
      composition result to a memory buffer. Expose this functionality as a
      DRM writeback connector on supported hardware.
      
      Changes since v1:
       Daniel Vetter:
       - Don't require a modeset when writeback routing changes
       - Make writeback connector always disconnected
      
      Changes since v2:
       - Rebase onto new drm_writeback_connector
       - Add reset callback, allocating subclassed state
       Daniel Vetter:
       - Squash out-fence support into this commit
       Gustavo Padovan:
       - Don't signal fence directly from driver (and drop malidp_mw_job)
      
      Changes since v3:
       - Modifications to fit with Mali-DP commit tail changes
      Signed-off-by: NBrian Starkey <brian.starkey@arm.com>
      [rebased and fixed conflicts]
      Signed-off-by: NMihail Atanassov <mihail.atanassov@arm.com>
      Signed-off-by: NLiviu Dudau <liviu.dudau@arm.com>
      8cbc5caf
  16. 02 7月, 2018 2 次提交
  17. 20 6月, 2018 2 次提交
    • B
      drm: writeback: Add out-fences for writeback connectors · b13cc8dd
      Brian Starkey 提交于
      Add the WRITEBACK_OUT_FENCE_PTR property to writeback connectors, to
      enable userspace to get a fence which will signal once the writeback is
      complete. It is not allowed to request an out-fence without a
      framebuffer attached to the connector.
      
      A timeline is added to drm_writeback_connector for use by the writeback
      out-fences.
      
      In the case of a commit failure or DRM_MODE_ATOMIC_TEST_ONLY, the fence
      is set to -1.
      
      Changes from v2:
       - Rebase onto Gustavo Padovan's v9 explicit sync series
       - Change out_fence_ptr type to s32 __user *
       - Set *out_fence_ptr to -1 in drm_atomic_connector_set_property
       - Store fence in drm_writeback_job
       Gustavo Padovan:
       - Move out_fence_ptr out of connector_state
       - Signal fence from drm_writeback_signal_completion instead of
         in driver directly
      
      Changes from v3:
       - Rebase onto commit 7e9081c5 ("drm/fence: fix memory overwrite
         when setting out_fence fd") (change out_fence_ptr to s32 __user *,
         for real this time.)
       - Update documentation around WRITEBACK_OUT_FENCE_PTR
      Signed-off-by: NBrian Starkey <brian.starkey@arm.com>
      [rebased and fixed conflicts]
      Signed-off-by: NMihail Atanassov <mihail.atanassov@arm.com>
      Signed-off-by: NLiviu Dudau <liviu.dudau@arm.com>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/229036/
      b13cc8dd
    • B
      drm: Add writeback connector type · 935774cd
      Brian Starkey 提交于
      Writeback connectors represent writeback engines which can write the
      CRTC output to a memory framebuffer. Add a writeback connector type and
      related support functions.
      
      Drivers should initialize a writeback connector with
      drm_writeback_connector_init() which takes care of setting up all the
      writeback-specific details on top of the normal functionality of
      drm_connector_init().
      
      Writeback connectors have a WRITEBACK_FB_ID property, used to set the
      output framebuffer, and a WRITEBACK_PIXEL_FORMATS blob used to expose the
      supported writeback formats to userspace.
      
      When a framebuffer is attached to a writeback connector with the
      WRITEBACK_FB_ID property, it is used only once (for the commit in which
      it was included), and userspace can never read back the value of
      WRITEBACK_FB_ID. WRITEBACK_FB_ID can only be set if the connector is
      attached to a CRTC.
      
      Changes since v1:
       - Added drm_writeback.c + documentation
       - Added helper to initialize writeback connector in one go
       - Added core checks
       - Squashed into a single commit
       - Dropped the client cap
       - Writeback framebuffers are no longer persistent
      
      Changes since v2:
       Daniel Vetter:
       - Subclass drm_connector to drm_writeback_connector
       - Relax check to allow CRTC to be set without an FB
       - Add some writeback_ prefixes
       - Drop PIXEL_FORMATS_SIZE property, as it was unnecessary
       Gustavo Padovan:
       - Add drm_writeback_job to handle writeback signalling centrally
      
      Changes since v3:
       - Rebased
       - Rename PIXEL_FORMATS -> WRITEBACK_PIXEL_FORMATS
      
      Chances since v4:
       - Embed a drm_encoder inside the drm_writeback_connector to
         reduce the amount of boilerplate code required from the drivers
         that are using it.
      
      Changes since v5:
       - Added Rob Clark's atomic_commit() vfunc to connector helper
         funcs, so that writeback jobs are committed from atomic helpers
       - Updated create_writeback_properties() signature to return an
         error code rather than a boolean false for failure.
       - Free writeback job with the connector state rather than when
         doing the cleanup_work()
      
      Changes since v7:
       - fix extraneous use of out_fence that is only introduced in a
         subsequent patch.
      
      Changes since v8:
       - whitespace changes pull from subsequent patch
      
      Changes since v9:
       - Revert the v6 changes that free the writeback job in the connector
         state cleanup and return to doing it in the cleanup_work() function
      Signed-off-by: NBrian Starkey <brian.starkey@arm.com>
      [rebased and fixed conflicts]
      Signed-off-by: NMihail Atanassov <mihail.atanassov@arm.com>
      [rebased and added atomic_commit() vfunc for writeback jobs]
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NLiviu Dudau <liviu.dudau@arm.com>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Link: https://patchwork.freedesktop.org/patch/229037/
      935774cd
  18. 16 6月, 2018 3 次提交
  19. 12 6月, 2018 1 次提交
  20. 17 5月, 2018 1 次提交
    • S
      drm: content-type property for HDMI connector · 50525c33
      Stanislav Lisovskiy 提交于
      Added content_type property to drm_connector_state
      in order to properly handle external HDMI TV content-type setting.
      
      v2:
       * Moved helper function which attaches content type property
         to the drm core, as was suggested.
         Removed redundant connector state initialization.
      
      v3:
       * Removed caps in drm_content_type_enum_list.
         After some discussion it turned out that HDMI Spec 1.4
         was wrongly assuming that IT Content(itc) bit doesn't affect
         Content type states, however itc bit needs to be manupulated
         as well. In order to not expose additional property for itc,
         for sake of simplicity it was decided to bind those together
         in same "content type" property.
      
      v4:
       * Added it_content checking in intel_digital_connector_atomic_check.
         Fixed documentation for new content type enum.
      
      v5:
       * Moved patch revision's description to commit messages.
      
      v6:
       * Minor naming fix for the content type enumeration string.
      
      v7:
       * Fix parameter name for documentation and parameter alignment
         in order not to get warning. Added Content Type description to
         new HDMI connector properties section.
      
      v8:
       * Thrown away unneeded numbers from HDMI content-type property
         description. Switch to strings desription instead of plain
         definitions.
      
      v9:
       * Moved away hdmi specific content-type enum from
         drm_connector_state. Content type property should probably not
         be bound to any specific connector interface in
         drm_connector_state.
         Same probably should be done to hdmi_picture_aspect_ration enum
         which is also contained in drm_connector_state. Added special
         helper function to get derive hdmi specific relevant infoframe
         fields.
      
      v10:
       * Added usage description to HDMI properties kernel doc.
      
      v11:
       * Created centralized function for filling HDMI AVI infoframe, based
         on correspondent DRM property value.
      Acked-by: NHans Verkuil <hans.verkuil@cisco.com>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180515135928.31092-2-stanislav.lisovskiy@intel.com
      [vsyrjala: clean up checkpatch multiple blank lines warnings]
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      50525c33
  21. 07 5月, 2018 2 次提交
  22. 03 5月, 2018 1 次提交
  23. 25 4月, 2018 1 次提交
  24. 24 4月, 2018 1 次提交
    • D
      drm/atomic: better doc for implicit vs explicit fencing · 30d23f22
      Daniel Vetter 提交于
      Note that a pile of drivers don't seem to take implicit fencing into
      account, or at least don't call drm_atoimc_set_fence_for_plane().
      Cc'ing relevant people, or at least some. Some drivers also look like
      they don't disable implicit fencing (e.g. amdgpu) because the explicit
      fences and implicit fences are handled by entirely independent code
      paths.
      
      I also wonder whether we shouldn't just make the recommended helpers
      the default ones, since a lot of drivers don't bother to handle the
      implicit fences at all it seems. The helpers won't blow up even for
      non-GEM drivers or GEM drivers which don't fill out the gem bo
      pointers in struct drm_framebuffer.
      
      v2: Comments from Eric.
      
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Harry Wentland <harry.wentland@amd.com>
      Cc: Sinclair Yeh <syeh@vmware.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Cc: Gustavo Padovan <gustavo@padovan.org>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180405154449.23038-7-daniel.vetter@ffwll.ch
      30d23f22
  25. 17 4月, 2018 1 次提交
  26. 16 3月, 2018 2 次提交
  27. 02 3月, 2018 2 次提交
  28. 26 2月, 2018 1 次提交
  29. 30 1月, 2018 2 次提交