[Mesa-dev] [PATCH] ac: rename has_sync_file to has_fence_to_handle.
Marek Olšák
maraeo at gmail.com
Wed Jan 3 23:52:34 UTC 2018
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Thu, Jan 4, 2018 at 12:24 AM, Bas Nieuwenhuizen
<bas at basnieuwenhuizen.nl> wrote:
> sync_files are in linux since 4.7, while the amdgpu fence_to_handle
> ioctl is only in 4.15.
>
> In particular we don't need it for sync_file in radv, because
> everything happens via syncobjs, which got support earlier than
> fence_to_handle.
> ---
> src/amd/common/ac_gpu_info.c | 4 ++--
> src/amd/common/ac_gpu_info.h | 2 +-
> src/gallium/drivers/radeonsi/si_fence.c | 4 ++--
> src/gallium/drivers/radeonsi/si_get.c | 2 +-
> 4 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c
> index 2599fb6164..6d9dcb5c56 100644
> --- a/src/amd/common/ac_gpu_info.c
> +++ b/src/amd/common/ac_gpu_info.c
> @@ -278,7 +278,7 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev,
> info->has_userptr = true;
> info->has_syncobj = has_syncobj(fd);
> info->has_syncobj_wait_for_submit = info->has_syncobj && info->drm_minor >= 20;
> - info->has_sync_file = info->has_syncobj && info->drm_minor >= 21;
> + info->has_fence_to_handle = info->has_syncobj && info->drm_minor >= 21;
> info->has_ctx_priority = info->drm_minor >= 22;
> info->num_render_backends = amdinfo->rb_pipes;
> info->clock_crystal_freq = amdinfo->gpu_counter_freq;
> @@ -392,7 +392,7 @@ void ac_print_gpu_info(struct radeon_info *info)
> info->drm_minor, info->drm_patchlevel);
> printf("has_userptr = %i\n", info->has_userptr);
> printf("has_syncobj = %u\n", info->has_syncobj);
> - printf("has_sync_file = %u\n", info->has_sync_file);
> + printf("has_fence_to_handle = %u\n", info->has_fence_to_handle);
>
> printf("r600_max_quad_pipes = %i\n", info->r600_max_quad_pipes);
> printf("max_shader_clock = %i\n", info->max_shader_clock);
> diff --git a/src/amd/common/ac_gpu_info.h b/src/amd/common/ac_gpu_info.h
> index 235cc245bd..cca3e98d36 100644
> --- a/src/amd/common/ac_gpu_info.h
> +++ b/src/amd/common/ac_gpu_info.h
> @@ -82,7 +82,7 @@ struct radeon_info {
> bool has_userptr;
> bool has_syncobj;
> bool has_syncobj_wait_for_submit;
> - bool has_sync_file;
> + bool has_fence_to_handle;
> bool has_ctx_priority;
>
> /* Shader cores. */
> diff --git a/src/gallium/drivers/radeonsi/si_fence.c b/src/gallium/drivers/radeonsi/si_fence.c
> index 3c4d75462a..5f320803aa 100644
> --- a/src/gallium/drivers/radeonsi/si_fence.c
> +++ b/src/gallium/drivers/radeonsi/si_fence.c
> @@ -306,7 +306,7 @@ static void si_create_fence_fd(struct pipe_context *ctx,
>
> *pfence = NULL;
>
> - if (!sscreen->info.has_sync_file)
> + if (!sscreen->info.has_fence_to_handle)
> return;
>
> rfence = si_create_multi_fence();
> @@ -330,7 +330,7 @@ static int si_fence_get_fd(struct pipe_screen *screen,
> struct si_multi_fence *rfence = (struct si_multi_fence *)fence;
> int gfx_fd = -1, sdma_fd = -1;
>
> - if (!sscreen->info.has_sync_file)
> + if (!sscreen->info.has_fence_to_handle)
> return -1;
>
> util_queue_fence_wait(&rfence->ready);
> diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c
> index fd42adbcae..9b5a03edaf 100644
> --- a/src/gallium/drivers/radeonsi/si_get.c
> +++ b/src/gallium/drivers/radeonsi/si_get.c
> @@ -278,7 +278,7 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
> return 0;
>
> case PIPE_CAP_NATIVE_FENCE_FD:
> - return sscreen->info.has_sync_file;
> + return sscreen->info.has_fence_to_handle;
>
> case PIPE_CAP_QUERY_BUFFER_OBJECT:
> return si_have_tgsi_compute(sscreen);
> --
> 2.15.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list