1. 02 3月, 2018 1 次提交
  2. 26 2月, 2018 1 次提交
  3. 30 1月, 2018 2 次提交
  4. 09 1月, 2018 1 次提交
    • S
      drm: Add Content Protection property · 24557865
      Sean Paul 提交于
      This patch adds a new optional connector property to allow userspace to enable
      protection over the content it is displaying. This will typically be implemented
      by the driver using HDCP.
      
      The property is a tri-state with the following values:
      - OFF: Self explanatory, no content protection
      - DESIRED: Userspace requests that the driver enable protection
      - ENABLED: Once the driver has authenticated the link, it sets this value
      
      The driver is responsible for downgrading ENABLED to DESIRED if the link becomes
      unprotected. The driver should also maintain the desiredness of protection
      across hotplug/dpms/suspend.
      
      If this looks familiar, I posted [1] this 3 years ago. We have been using this
      in ChromeOS across exynos, mediatek, and rockchip over that time.
      
      Changes in v2:
       - Pimp kerneldoc for content_protection_property (Daniel)
       - Drop sysfs attribute
      Changes in v3:
       - None
      Changes in v4:
      - Changed kerneldoc to recommend userspace polling (Daniel)
      - Changed kerneldoc to briefly describe how to attach the property (Daniel)
      Changes in v5:
      - checkpatch whitespace noise
      - Change DRM_MODE_CONTENT_PROTECTION_OFF to DRM_MODE_CONTENT_PROTECTION_UNDESIRED
      Changes in v6:
      - None
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NSean Paul <seanpaul@chromium.org>
      
      [1] https://lists.freedesktop.org/archives/dri-devel/2014-December/073336.html
      Link: https://patchwork.freedesktop.org/patch/msgid/20180108195545.218615-4-seanpaul@chromium.org
      24557865
  5. 15 12月, 2017 1 次提交
    • D
      drm/atomic: document how to handle driver private objects · da6c0596
      Daniel Vetter 提交于
      DK put some nice docs into the commit introducing driver private
      state, but in the git history alone it'll be lost.
      
      Also, since Ville remove the void* usage it's a good opportunity to
      give the driver private stuff some tlc on the doc front.
      
      Finally try to explain why the "let's just subclass drm_atomic_state"
      approach wasn't the greatest, and annotate all those functions as
      deprecated in favour of more standardized driver private states. Also
      note where we could/should extend driver private states going forward
      (atm neither locking nor synchronization is handled in core/helpers,
      which isn't really all that great).
      
      v2: Spelling and phrasing improvements (Alex, DK).
      
      Cc: Harry Wentland <harry.wentland@amd.com>
      Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Reviewed-by: NDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171214203054.20141-5-daniel.vetter@ffwll.ch
      da6c0596
  6. 11 11月, 2017 1 次提交
  7. 02 11月, 2017 2 次提交
  8. 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
  9. 12 10月, 2017 1 次提交
  10. 06 10月, 2017 1 次提交
  11. 13 9月, 2017 1 次提交
  12. 08 9月, 2017 2 次提交
  13. 15 8月, 2017 1 次提交
    • M
      drm/atomic: If the atomic check fails, return its value first · a0ffc51e
      Maarten Lankhorst 提交于
      The last part of drm_atomic_check_only is testing whether we need to
      fail with -EINVAL when modeset is not allowed, but forgets to return
      the value when atomic_check() fails first.
      
      This results in -EDEADLK being replaced by -EINVAL, and the sanity
      check in drm_modeset_drop_locks kicks in:
      
      [  308.531734] ------------[ cut here ]------------
      [  308.531791] WARNING: CPU: 0 PID: 1886 at drivers/gpu/drm/drm_modeset_lock.c:217 drm_modeset_drop_locks+0x33/0xc0 [drm]
      [  308.531828] Modules linked in:
      [  308.532050] CPU: 0 PID: 1886 Comm: kms_atomic Tainted: G     U  W 4.13.0-rc5-patser+ #5225
      [  308.532082] Hardware name: NUC5i7RYB, BIOS RYBDWi35.86A.0246.2015.0309.1355 03/09/2015
      [  308.532124] task: ffff8800cd9dae00 task.stack: ffff8800ca3b8000
      [  308.532168] RIP: 0010:drm_modeset_drop_locks+0x33/0xc0 [drm]
      [  308.532189] RSP: 0018:ffff8800ca3bf980 EFLAGS: 00010282
      [  308.532211] RAX: dffffc0000000000 RBX: ffff8800ca3bfaf8 RCX: 0000000013a171e6
      [  308.532235] RDX: 1ffff10019477f69 RSI: ffffffffa8ba4fa0 RDI: ffff8800ca3bfb48
      [  308.532258] RBP: ffff8800ca3bf998 R08: 0000000000000000 R09: 0000000000000003
      [  308.532281] R10: 0000000079dbe066 R11: 00000000f760b34b R12: 0000000000000001
      [  308.532304] R13: dffffc0000000000 R14: 00000000ffffffea R15: ffff880096889680
      [  308.532328] FS:  00007ff00959cec0(0000) GS:ffff8800d4e00000(0000) knlGS:0000000000000000
      [  308.532359] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  308.532380] CR2: 0000000000000008 CR3: 00000000ca2e3000 CR4: 00000000003406f0
      [  308.532402] Call Trace:
      [  308.532440]  drm_mode_atomic_ioctl+0x19fa/0x1c00 [drm]
      [  308.532488]  ? drm_atomic_set_property+0x1220/0x1220 [drm]
      [  308.532565]  ? avc_has_extended_perms+0xc39/0xff0
      [  308.532593]  ? lock_downgrade+0x610/0x610
      [  308.532640]  ? drm_atomic_set_property+0x1220/0x1220 [drm]
      [  308.532680]  drm_ioctl_kernel+0x154/0x1a0 [drm]
      [  308.532755]  drm_ioctl+0x624/0x8f0 [drm]
      [  308.532858]  ? drm_atomic_set_property+0x1220/0x1220 [drm]
      [  308.532976]  ? drm_getunique+0x210/0x210 [drm]
      [  308.533061]  do_vfs_ioctl+0xd92/0xe40
      [  308.533121]  ? ioctl_preallocate+0x1b0/0x1b0
      [  308.533160]  ? selinux_capable+0x20/0x20
      [  308.533191]  ? do_fcntl+0x1b1/0xbf0
      [  308.533219]  ? kasan_slab_free+0xa2/0xb0
      [  308.533249]  ? f_getown+0x4b/0xa0
      [  308.533278]  ? putname+0xcf/0xe0
      [  308.533309]  ? security_file_ioctl+0x57/0x90
      [  308.533342]  SyS_ioctl+0x4e/0x80
      [  308.533374]  entry_SYSCALL_64_fastpath+0x18/0xad
      [  308.533405] RIP: 0033:0x7ff00779e4d7
      [  308.533431] RSP: 002b:00007fff66a043d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
      [  308.533481] RAX: ffffffffffffffda RBX: 000000e7c7ca5910 RCX: 00007ff00779e4d7
      [  308.533560] RDX: 00007fff66a04430 RSI: 00000000c03864bc RDI: 0000000000000003
      [  308.533608] RBP: 00007ff007a5fb00 R08: 000000e7c7ca4620 R09: 000000e7c7ca5e60
      [  308.533647] R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000070
      [  308.533685] R13: 0000000000000000 R14: 0000000000000000 R15: 000000e7c7ca5930
      [  308.533770] Code: ff df 55 48 89 e5 41 55 41 54 53 48 89 fb 48 83 c7
      50 48 89 fa 48 c1 ea 03 80 3c 02 00 74 05 e8 94 d4 16 e7 48 83 7b 50 00
      74 02 <0f> ff 4c 8d 6b 58 48 b8 00 00 00 00 00 fc ff df 4c 89 ea 48 c1
      [  308.534086] ---[ end trace 77f11e53b1df44ad ]---
      
      Solve this by adding the missing return.
      
      This is also a bugfix because we could end up rejecting updates with
      -EINVAL because of a early -EDEADLK, while if atomic_check ran to
      completion it might have downgraded the modeset to a fastset.
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Testcase: kms_atomic
      Link: https://patchwork.freedesktop.org/patch/msgid/20170815095706.23624-1-maarten.lankhorst@linux.intel.com
      Fixes: d34f20d6 ("drm: Atomic modeset ioctl")
      Cc: <stable@vger.kernel.org> # v4.0+
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a0ffc51e
  14. 14 8月, 2017 1 次提交
    • M
      drm/atomic: Handle -EDEADLK with out-fences correctly · 7f5d6dac
      Maarten Lankhorst 提交于
      complete_crtc_signaling is freeing fence_state, but when retrying
      num_fences and fence_state are not zero'd. This caused duplicate
      fd's in the fence_state array, followed by a BUG_ON in fs/file.c
      because we reallocate freed memory, and installing over an existing
      fd, or potential other fun.
      
      Zero fence_state and num_fences correctly in the retry loop, which
      allows kms_atomic_transition to pass.
      
      Fixes: beaf5af4 ("drm/fence: add out-fences support")
      Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
      Cc: Brian Starkey <brian.starkey@arm.com> (v10)
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: David Airlie <airlied@linux.ie>
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: <stable@vger.kernel.org> # v4.10+
      Testcase: kms_atomic_transitions.plane-all-modeset-transition-fencing
      (with CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y)
      Link: https://patchwork.freedesktop.org/patch/msgid/20170814100721.13340-1-maarten.lankhorst@linux.intel.com
      Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #intel-gfx on irc
      7f5d6dac
  15. 08 8月, 2017 4 次提交
  16. 14 7月, 2017 3 次提交
  17. 30 6月, 2017 1 次提交
  18. 28 6月, 2017 1 次提交
  19. 16 6月, 2017 1 次提交
  20. 31 5月, 2017 1 次提交
  21. 22 5月, 2017 1 次提交
  22. 08 5月, 2017 2 次提交
  23. 04 5月, 2017 1 次提交
  24. 02 5月, 2017 1 次提交
  25. 13 4月, 2017 1 次提交
  26. 06 4月, 2017 1 次提交
  27. 05 4月, 2017 2 次提交
  28. 06 3月, 2017 1 次提交
  29. 28 2月, 2017 2 次提交