diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/cde.c | 10 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/cde.h | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ce2.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/channel.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/channel.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_channel.c | 12 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c | 2 |
7 files changed, 25 insertions, 15 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/cde.c b/drivers/gpu/nvgpu/common/linux/cde.c index e5441ac9..aefef882 100644 --- a/drivers/gpu/nvgpu/common/linux/cde.c +++ b/drivers/gpu/nvgpu/common/linux/cde.c | |||
@@ -748,7 +748,7 @@ deinit_image: | |||
748 | } | 748 | } |
749 | 749 | ||
750 | static int gk20a_cde_execute_buffer(struct gk20a_cde_ctx *cde_ctx, | 750 | static int gk20a_cde_execute_buffer(struct gk20a_cde_ctx *cde_ctx, |
751 | u32 op, struct nvgpu_fence *fence, | 751 | u32 op, struct nvgpu_channel_fence *fence, |
752 | u32 flags, struct gk20a_fence **fence_out) | 752 | u32 flags, struct gk20a_fence **fence_out) |
753 | { | 753 | { |
754 | struct nvgpu_os_linux *l = cde_ctx->l; | 754 | struct nvgpu_os_linux *l = cde_ctx->l; |
@@ -975,7 +975,7 @@ int gk20a_cde_convert(struct nvgpu_os_linux *l, | |||
975 | struct dma_buf *compbits_scatter_buf, | 975 | struct dma_buf *compbits_scatter_buf, |
976 | u64 compbits_byte_offset, | 976 | u64 compbits_byte_offset, |
977 | u64 scatterbuffer_byte_offset, | 977 | u64 scatterbuffer_byte_offset, |
978 | struct nvgpu_fence *fence, | 978 | struct nvgpu_channel_fence *fence, |
979 | u32 __flags, struct gk20a_cde_param *params, | 979 | u32 __flags, struct gk20a_cde_param *params, |
980 | int num_params, struct gk20a_fence **fence_out) | 980 | int num_params, struct gk20a_fence **fence_out) |
981 | __acquires(&l->cde_app->mutex) | 981 | __acquires(&l->cde_app->mutex) |
@@ -1482,7 +1482,7 @@ static int gk20a_buffer_convert_gpu_to_cde_v1( | |||
1482 | u64 offset, u64 compbits_hoffset, u64 compbits_voffset, | 1482 | u64 offset, u64 compbits_hoffset, u64 compbits_voffset, |
1483 | u64 scatterbuffer_offset, | 1483 | u64 scatterbuffer_offset, |
1484 | u32 width, u32 height, u32 block_height_log2, | 1484 | u32 width, u32 height, u32 block_height_log2, |
1485 | u32 submit_flags, struct nvgpu_fence *fence_in, | 1485 | u32 submit_flags, struct nvgpu_channel_fence *fence_in, |
1486 | struct gk20a_buffer_state *state) | 1486 | struct gk20a_buffer_state *state) |
1487 | { | 1487 | { |
1488 | struct gk20a *g = &l->g; | 1488 | struct gk20a *g = &l->g; |
@@ -1624,7 +1624,7 @@ static int gk20a_buffer_convert_gpu_to_cde( | |||
1624 | u64 offset, u64 compbits_hoffset, u64 compbits_voffset, | 1624 | u64 offset, u64 compbits_hoffset, u64 compbits_voffset, |
1625 | u64 scatterbuffer_offset, | 1625 | u64 scatterbuffer_offset, |
1626 | u32 width, u32 height, u32 block_height_log2, | 1626 | u32 width, u32 height, u32 block_height_log2, |
1627 | u32 submit_flags, struct nvgpu_fence *fence_in, | 1627 | u32 submit_flags, struct nvgpu_channel_fence *fence_in, |
1628 | struct gk20a_buffer_state *state) | 1628 | struct gk20a_buffer_state *state) |
1629 | { | 1629 | { |
1630 | struct gk20a *g = &l->g; | 1630 | struct gk20a *g = &l->g; |
@@ -1656,7 +1656,7 @@ int gk20a_prepare_compressible_read( | |||
1656 | u64 compbits_hoffset, u64 compbits_voffset, | 1656 | u64 compbits_hoffset, u64 compbits_voffset, |
1657 | u64 scatterbuffer_offset, | 1657 | u64 scatterbuffer_offset, |
1658 | u32 width, u32 height, u32 block_height_log2, | 1658 | u32 width, u32 height, u32 block_height_log2, |
1659 | u32 submit_flags, struct nvgpu_fence *fence, | 1659 | u32 submit_flags, struct nvgpu_channel_fence *fence, |
1660 | u32 *valid_compbits, u32 *zbc_color, | 1660 | u32 *valid_compbits, u32 *zbc_color, |
1661 | struct gk20a_fence **fence_out) | 1661 | struct gk20a_fence **fence_out) |
1662 | { | 1662 | { |
diff --git a/drivers/gpu/nvgpu/common/linux/cde.h b/drivers/gpu/nvgpu/common/linux/cde.h index 115558dc..9ff142ea 100644 --- a/drivers/gpu/nvgpu/common/linux/cde.h +++ b/drivers/gpu/nvgpu/common/linux/cde.h | |||
@@ -44,7 +44,7 @@ struct device; | |||
44 | struct nvgpu_os_linux; | 44 | struct nvgpu_os_linux; |
45 | struct gk20a; | 45 | struct gk20a; |
46 | struct gk20a_fence; | 46 | struct gk20a_fence; |
47 | struct nvgpu_fence; | 47 | struct nvgpu_channel_fence; |
48 | struct channel_gk20a; | 48 | struct channel_gk20a; |
49 | struct vm_gk20a; | 49 | struct vm_gk20a; |
50 | struct nvgpu_gpfifo; | 50 | struct nvgpu_gpfifo; |
@@ -306,7 +306,7 @@ int gk20a_cde_convert(struct nvgpu_os_linux *l, | |||
306 | struct dma_buf *compbits_buf, | 306 | struct dma_buf *compbits_buf, |
307 | u64 compbits_byte_offset, | 307 | u64 compbits_byte_offset, |
308 | u64 scatterbuffer_byte_offset, | 308 | u64 scatterbuffer_byte_offset, |
309 | struct nvgpu_fence *fence, | 309 | struct nvgpu_channel_fence *fence, |
310 | u32 __flags, struct gk20a_cde_param *params, | 310 | u32 __flags, struct gk20a_cde_param *params, |
311 | int num_params, struct gk20a_fence **fence_out); | 311 | int num_params, struct gk20a_fence **fence_out); |
312 | 312 | ||
@@ -315,7 +315,7 @@ int gk20a_prepare_compressible_read( | |||
315 | u64 compbits_hoffset, u64 compbits_voffset, | 315 | u64 compbits_hoffset, u64 compbits_voffset, |
316 | u64 scatterbuffer_offset, | 316 | u64 scatterbuffer_offset, |
317 | u32 width, u32 height, u32 block_height_log2, | 317 | u32 width, u32 height, u32 block_height_log2, |
318 | u32 submit_flags, struct nvgpu_fence *fence, | 318 | u32 submit_flags, struct nvgpu_channel_fence *fence, |
319 | u32 *valid_compbits, u32 *zbc_color, | 319 | u32 *valid_compbits, u32 *zbc_color, |
320 | struct gk20a_fence **fence_out); | 320 | struct gk20a_fence **fence_out); |
321 | int gk20a_mark_compressible_write( | 321 | int gk20a_mark_compressible_write( |
diff --git a/drivers/gpu/nvgpu/common/linux/ce2.c b/drivers/gpu/nvgpu/common/linux/ce2.c index 7cb39382..d1f0ad63 100644 --- a/drivers/gpu/nvgpu/common/linux/ce2.c +++ b/drivers/gpu/nvgpu/common/linux/ce2.c | |||
@@ -56,7 +56,7 @@ int gk20a_ce_execute_ops(struct gk20a *g, | |||
56 | u32 cmd_buf_read_offset; | 56 | u32 cmd_buf_read_offset; |
57 | u32 dma_copy_class; | 57 | u32 dma_copy_class; |
58 | struct nvgpu_gpfifo gpfifo; | 58 | struct nvgpu_gpfifo gpfifo; |
59 | struct nvgpu_fence fence = {0,0}; | 59 | struct nvgpu_channel_fence fence = {0, 0}; |
60 | struct gk20a_fence *ce_cmd_buf_fence_out = NULL; | 60 | struct gk20a_fence *ce_cmd_buf_fence_out = NULL; |
61 | 61 | ||
62 | if (!ce_app->initialised ||ce_app->app_state != NVGPU_CE_ACTIVE) | 62 | if (!ce_app->initialised ||ce_app->app_state != NVGPU_CE_ACTIVE) |
diff --git a/drivers/gpu/nvgpu/common/linux/channel.c b/drivers/gpu/nvgpu/common/linux/channel.c index dc35fbc0..ad127606 100644 --- a/drivers/gpu/nvgpu/common/linux/channel.c +++ b/drivers/gpu/nvgpu/common/linux/channel.c | |||
@@ -416,7 +416,7 @@ static void trace_write_pushbuffer_range(struct channel_gk20a *c, | |||
416 | * Handle the submit synchronization - pre-fences and post-fences. | 416 | * Handle the submit synchronization - pre-fences and post-fences. |
417 | */ | 417 | */ |
418 | static int gk20a_submit_prepare_syncs(struct channel_gk20a *c, | 418 | static int gk20a_submit_prepare_syncs(struct channel_gk20a *c, |
419 | struct nvgpu_fence *fence, | 419 | struct nvgpu_channel_fence *fence, |
420 | struct channel_gk20a_job *job, | 420 | struct channel_gk20a_job *job, |
421 | struct priv_cmd_entry **wait_cmd, | 421 | struct priv_cmd_entry **wait_cmd, |
422 | struct priv_cmd_entry **incr_cmd, | 422 | struct priv_cmd_entry **incr_cmd, |
@@ -663,7 +663,7 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, | |||
663 | struct nvgpu_submit_gpfifo_args *args, | 663 | struct nvgpu_submit_gpfifo_args *args, |
664 | u32 num_entries, | 664 | u32 num_entries, |
665 | u32 flags, | 665 | u32 flags, |
666 | struct nvgpu_fence *fence, | 666 | struct nvgpu_channel_fence *fence, |
667 | struct gk20a_fence **fence_out, | 667 | struct gk20a_fence **fence_out, |
668 | bool force_need_sync_fence, | 668 | bool force_need_sync_fence, |
669 | struct fifo_profile_gk20a *profile) | 669 | struct fifo_profile_gk20a *profile) |
diff --git a/drivers/gpu/nvgpu/common/linux/channel.h b/drivers/gpu/nvgpu/common/linux/channel.h index 35be425a..85be581a 100644 --- a/drivers/gpu/nvgpu/common/linux/channel.h +++ b/drivers/gpu/nvgpu/common/linux/channel.h | |||
@@ -24,7 +24,7 @@ | |||
24 | struct channel_gk20a; | 24 | struct channel_gk20a; |
25 | struct nvgpu_gpfifo; | 25 | struct nvgpu_gpfifo; |
26 | struct nvgpu_submit_gpfifo_args; | 26 | struct nvgpu_submit_gpfifo_args; |
27 | struct nvgpu_fence; | 27 | struct nvgpu_channel_fence; |
28 | struct gk20a_fence; | 28 | struct gk20a_fence; |
29 | struct fifo_profile_gk20a; | 29 | struct fifo_profile_gk20a; |
30 | struct nvgpu_os_linux; | 30 | struct nvgpu_os_linux; |
@@ -75,7 +75,7 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, | |||
75 | struct nvgpu_submit_gpfifo_args *args, | 75 | struct nvgpu_submit_gpfifo_args *args, |
76 | u32 num_entries, | 76 | u32 num_entries, |
77 | u32 flags, | 77 | u32 flags, |
78 | struct nvgpu_fence *fence, | 78 | struct nvgpu_channel_fence *fence, |
79 | struct gk20a_fence **fence_out, | 79 | struct gk20a_fence **fence_out, |
80 | bool force_need_sync_fence, | 80 | bool force_need_sync_fence, |
81 | struct fifo_profile_gk20a *profile); | 81 | struct fifo_profile_gk20a *profile); |
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c index 9b5a850a..c75c9244 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c | |||
@@ -614,6 +614,14 @@ static void nvgpu_get_gpfifo_args( | |||
614 | alloc_gpfifo_args->flags); | 614 | alloc_gpfifo_args->flags); |
615 | } | 615 | } |
616 | 616 | ||
617 | static void nvgpu_get_fence_args( | ||
618 | struct nvgpu_fence *fence_args_in, | ||
619 | struct nvgpu_channel_fence *fence_args_out) | ||
620 | { | ||
621 | fence_args_out->id = fence_args_in->id; | ||
622 | fence_args_out->value = fence_args_in->value; | ||
623 | } | ||
624 | |||
617 | static int gk20a_channel_wait_semaphore(struct channel_gk20a *ch, | 625 | static int gk20a_channel_wait_semaphore(struct channel_gk20a *ch, |
618 | ulong id, u32 offset, | 626 | ulong id, u32 offset, |
619 | u32 payload, u32 timeout) | 627 | u32 payload, u32 timeout) |
@@ -760,6 +768,7 @@ static int gk20a_ioctl_channel_submit_gpfifo( | |||
760 | struct channel_gk20a *ch, | 768 | struct channel_gk20a *ch, |
761 | struct nvgpu_submit_gpfifo_args *args) | 769 | struct nvgpu_submit_gpfifo_args *args) |
762 | { | 770 | { |
771 | struct nvgpu_channel_fence fence; | ||
763 | struct gk20a_fence *fence_out; | 772 | struct gk20a_fence *fence_out; |
764 | struct fifo_profile_gk20a *profile = NULL; | 773 | struct fifo_profile_gk20a *profile = NULL; |
765 | 774 | ||
@@ -779,8 +788,9 @@ static int gk20a_ioctl_channel_submit_gpfifo( | |||
779 | !capable(CAP_SYS_NICE)) | 788 | !capable(CAP_SYS_NICE)) |
780 | return -EPERM; | 789 | return -EPERM; |
781 | 790 | ||
791 | nvgpu_get_fence_args(&args->fence, &fence); | ||
782 | ret = gk20a_submit_channel_gpfifo(ch, NULL, args, args->num_entries, | 792 | ret = gk20a_submit_channel_gpfifo(ch, NULL, args, args->num_entries, |
783 | args->flags, &args->fence, | 793 | args->flags, &fence, |
784 | &fence_out, false, profile); | 794 | &fence_out, false, profile); |
785 | 795 | ||
786 | if (ret) | 796 | if (ret) |
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c index c37f45dd..3392b6fa 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c | |||
@@ -339,7 +339,7 @@ static int gk20a_ctrl_prepare_compressible_read( | |||
339 | 339 | ||
340 | #ifdef CONFIG_NVGPU_SUPPORT_CDE | 340 | #ifdef CONFIG_NVGPU_SUPPORT_CDE |
341 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); | 341 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); |
342 | struct nvgpu_fence fence; | 342 | struct nvgpu_channel_fence fence; |
343 | struct gk20a_fence *fence_out = NULL; | 343 | struct gk20a_fence *fence_out = NULL; |
344 | int flags = args->submit_flags; | 344 | int flags = args->submit_flags; |
345 | 345 | ||