Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: Add acquire ctx parameter to ->page_flip(_target)

Again just going through the motions, no functional changes in here.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>t
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-12-daniel.vetter@ffwll.ch

+43 -21
+2 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
··· 311 311 struct drm_framebuffer *fb, 312 312 struct drm_pending_vblank_event *event, 313 313 uint32_t page_flip_flags, 314 - uint32_t target) 314 + uint32_t target, 315 + struct drm_modeset_acquire_ctx *ctx) 315 316 { 316 317 struct amdgpu_bo *new_abo; 317 318 struct amdgpu_flip_work *work;
+2 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
··· 594 594 int amdgpu_crtc_page_flip_target(struct drm_crtc *crtc, 595 595 struct drm_framebuffer *fb, 596 596 struct drm_pending_vblank_event *event, 597 - uint32_t page_flip_flags, uint32_t target); 597 + uint32_t page_flip_flags, uint32_t target, 598 + struct drm_modeset_acquire_ctx *ctx); 598 599 void amdgpu_crtc_cleanup_flip_ctx(struct amdgpu_flip_work *work, 599 600 struct amdgpu_bo *new_abo); 600 601 int amdgpu_crtc_prepare_flip(struct drm_crtc *crtc,
+2 -1
drivers/gpu/drm/armada/armada_crtc.c
··· 1027 1027 * and a mode_set. 1028 1028 */ 1029 1029 static int armada_drm_crtc_page_flip(struct drm_crtc *crtc, 1030 - struct drm_framebuffer *fb, struct drm_pending_vblank_event *event, uint32_t page_flip_flags) 1030 + struct drm_framebuffer *fb, struct drm_pending_vblank_event *event, uint32_t page_flip_flags, 1031 + struct drm_modeset_acquire_ctx *ctx) 1031 1032 { 1032 1033 struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc); 1033 1034 struct armada_frame_work *work;
+2 -1
drivers/gpu/drm/bochs/bochs_kms.c
··· 96 96 static int bochs_crtc_page_flip(struct drm_crtc *crtc, 97 97 struct drm_framebuffer *fb, 98 98 struct drm_pending_vblank_event *event, 99 - uint32_t page_flip_flags) 99 + uint32_t page_flip_flags, 100 + struct drm_modeset_acquire_ctx *ctx) 100 101 { 101 102 struct bochs_device *bochs = 102 103 container_of(crtc, struct bochs_device, crtc);
+6 -2
drivers/gpu/drm/drm_atomic_helper.c
··· 2859 2859 * @fb: DRM framebuffer 2860 2860 * @event: optional DRM event to signal upon completion 2861 2861 * @flags: flip flags for non-vblank sync'ed updates 2862 + * @ctx: lock acquisition context 2862 2863 * 2863 2864 * Provides a default &drm_crtc_funcs.page_flip implementation 2864 2865 * using the atomic driver interface. ··· 2873 2872 int drm_atomic_helper_page_flip(struct drm_crtc *crtc, 2874 2873 struct drm_framebuffer *fb, 2875 2874 struct drm_pending_vblank_event *event, 2876 - uint32_t flags) 2875 + uint32_t flags, 2876 + struct drm_modeset_acquire_ctx *ctx) 2877 2877 { 2878 2878 struct drm_plane *plane = crtc->primary; 2879 2879 struct drm_atomic_state *state; ··· 2922 2920 * @event: optional DRM event to signal upon completion 2923 2921 * @flags: flip flags for non-vblank sync'ed updates 2924 2922 * @target: specifying the target vblank period when the flip to take effect 2923 + * @ctx: lock acquisition context 2925 2924 * 2926 2925 * Provides a default &drm_crtc_funcs.page_flip_target implementation. 2927 2926 * Similar to drm_atomic_helper_page_flip() with extra parameter to specify ··· 2936 2933 struct drm_framebuffer *fb, 2937 2934 struct drm_pending_vblank_event *event, 2938 2935 uint32_t flags, 2939 - uint32_t target) 2936 + uint32_t target, 2937 + struct drm_modeset_acquire_ctx *ctx) 2940 2938 { 2941 2939 struct drm_plane *plane = crtc->primary; 2942 2940 struct drm_atomic_state *state;
+4 -2
drivers/gpu/drm/drm_plane.c
··· 932 932 if (crtc->funcs->page_flip_target) 933 933 ret = crtc->funcs->page_flip_target(crtc, fb, e, 934 934 page_flip->flags, 935 - target_vblank); 935 + target_vblank, 936 + &ctx); 936 937 else 937 - ret = crtc->funcs->page_flip(crtc, fb, e, page_flip->flags); 938 + ret = crtc->funcs->page_flip(crtc, fb, e, page_flip->flags, 939 + &ctx); 938 940 if (ret) { 939 941 if (page_flip->flags & DRM_MODE_PAGE_FLIP_EVENT) 940 942 drm_event_cancel_free(dev, &e->base);
+2 -1
drivers/gpu/drm/nouveau/nouveau_display.c
··· 792 792 793 793 int 794 794 nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, 795 - struct drm_pending_vblank_event *event, u32 flags) 795 + struct drm_pending_vblank_event *event, u32 flags, 796 + struct drm_modeset_acquire_ctx *ctx) 796 797 { 797 798 const int swap_interval = (flags & DRM_MODE_PAGE_FLIP_ASYNC) ? 0 : 1; 798 799 struct drm_device *dev = crtc->dev;
+2 -1
drivers/gpu/drm/nouveau/nouveau_display.h
··· 76 76 77 77 int nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, 78 78 struct drm_pending_vblank_event *event, 79 - uint32_t page_flip_flags); 79 + uint32_t page_flip_flags, 80 + struct drm_modeset_acquire_ctx *ctx); 80 81 int nouveau_finish_page_flip(struct nouveau_channel *, 81 82 struct nouveau_page_flip_state *); 82 83
+2 -1
drivers/gpu/drm/radeon/radeon_display.c
··· 485 485 struct drm_framebuffer *fb, 486 486 struct drm_pending_vblank_event *event, 487 487 uint32_t page_flip_flags, 488 - uint32_t target) 488 + uint32_t target, 489 + struct drm_modeset_acquire_ctx *ctx) 489 490 { 490 491 struct drm_device *dev = crtc->dev; 491 492 struct radeon_device *rdev = dev->dev_private;
+2 -1
drivers/gpu/drm/shmobile/shmob_drm_crtc.c
··· 449 449 static int shmob_drm_crtc_page_flip(struct drm_crtc *crtc, 450 450 struct drm_framebuffer *fb, 451 451 struct drm_pending_vblank_event *event, 452 - uint32_t page_flip_flags) 452 + uint32_t page_flip_flags, 453 + struct drm_modeset_acquire_ctx *ctx) 453 454 { 454 455 struct shmob_drm_crtc *scrtc = to_shmob_crtc(crtc); 455 456 struct drm_device *dev = scrtc->crtc.dev;
+2 -1
drivers/gpu/drm/udl/udl_modeset.c
··· 361 361 static int udl_crtc_page_flip(struct drm_crtc *crtc, 362 362 struct drm_framebuffer *fb, 363 363 struct drm_pending_vblank_event *event, 364 - uint32_t page_flip_flags) 364 + uint32_t page_flip_flags, 365 + struct drm_modeset_acquire_ctx *ctx) 365 366 { 366 367 struct udl_framebuffer *ufb = to_udl_fb(fb); 367 368 struct drm_device *dev = crtc->dev;
+3 -2
drivers/gpu/drm/vc4/vc4_crtc.c
··· 807 807 static int vc4_page_flip(struct drm_crtc *crtc, 808 808 struct drm_framebuffer *fb, 809 809 struct drm_pending_vblank_event *event, 810 - uint32_t flags) 810 + uint32_t flags, 811 + struct drm_modeset_acquire_ctx *ctx) 811 812 { 812 813 if (flags & DRM_MODE_PAGE_FLIP_ASYNC) 813 814 return vc4_async_page_flip(crtc, fb, event, flags); 814 815 else 815 - return drm_atomic_helper_page_flip(crtc, fb, event, flags); 816 + return drm_atomic_helper_page_flip(crtc, fb, event, flags, ctx); 816 817 } 817 818 818 819 static struct drm_crtc_state *vc4_crtc_duplicate_state(struct drm_crtc *crtc)
+2 -1
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
··· 395 395 static int vmw_sou_crtc_page_flip(struct drm_crtc *crtc, 396 396 struct drm_framebuffer *fb, 397 397 struct drm_pending_vblank_event *event, 398 - uint32_t flags) 398 + uint32_t flags, 399 + struct drm_modeset_acquire_ctx *ctx) 399 400 { 400 401 struct vmw_private *dev_priv = vmw_priv(crtc->dev); 401 402 struct drm_framebuffer *old_fb = crtc->primary->fb;
+2 -1
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
··· 649 649 static int vmw_stdu_crtc_page_flip(struct drm_crtc *crtc, 650 650 struct drm_framebuffer *new_fb, 651 651 struct drm_pending_vblank_event *event, 652 - uint32_t flags) 652 + uint32_t flags, 653 + struct drm_modeset_acquire_ctx *ctx) 653 654 654 655 { 655 656 struct vmw_private *dev_priv = vmw_priv(crtc->dev);
+4 -2
include/drm/drm_atomic_helper.h
··· 125 125 int drm_atomic_helper_page_flip(struct drm_crtc *crtc, 126 126 struct drm_framebuffer *fb, 127 127 struct drm_pending_vblank_event *event, 128 - uint32_t flags); 128 + uint32_t flags, 129 + struct drm_modeset_acquire_ctx *ctx); 129 130 int drm_atomic_helper_page_flip_target( 130 131 struct drm_crtc *crtc, 131 132 struct drm_framebuffer *fb, 132 133 struct drm_pending_vblank_event *event, 133 134 uint32_t flags, 134 - uint32_t target); 135 + uint32_t target, 136 + struct drm_modeset_acquire_ctx *ctx); 135 137 int drm_atomic_helper_connector_dpms(struct drm_connector *connector, 136 138 int mode); 137 139 struct drm_encoder *
+4 -2
include/drm/drm_crtc.h
··· 405 405 int (*page_flip)(struct drm_crtc *crtc, 406 406 struct drm_framebuffer *fb, 407 407 struct drm_pending_vblank_event *event, 408 - uint32_t flags); 408 + uint32_t flags, 409 + struct drm_modeset_acquire_ctx *ctx); 409 410 410 411 /** 411 412 * @page_flip_target: ··· 424 423 int (*page_flip_target)(struct drm_crtc *crtc, 425 424 struct drm_framebuffer *fb, 426 425 struct drm_pending_vblank_event *event, 427 - uint32_t flags, uint32_t target); 426 + uint32_t flags, uint32_t target, 427 + struct drm_modeset_acquire_ctx *ctx); 428 428 429 429 /** 430 430 * @set_property: