ac: add radeon_info::has_sync_file
authorMarek Olšák <marek.olsak@amd.com>
Tue, 12 Sep 2017 18:06:37 +0000 (20:06 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 12 Oct 2017 19:04:56 +0000 (21:04 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/amd/common/ac_gpu_info.c
src/amd/common/ac_gpu_info.h
src/gallium/drivers/radeon/r600_pipe_common.c

index d10b0eb0af957d4ca98463dadcc996a6091111a7..82ff18d4366f5b08916d2f017ad0531dbbce4233 100644 (file)
@@ -269,6 +269,7 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev,
                vce.available_rings ? vce_version : 0;
        info->has_userptr = true;
        info->has_syncobj = has_syncobj(fd);
+       info->has_sync_file = info->has_syncobj && info->drm_minor >= 21;
        info->num_render_backends = amdinfo->rb_pipes;
        info->clock_crystal_freq = amdinfo->gpu_counter_freq;
        if (!info->clock_crystal_freq) {
index 5722709d24f97ac952fa70001f6f655030a6e4bc..960fd74fcf04b12b86f69f676ee89dcf0f015f2f 100644 (file)
@@ -81,6 +81,7 @@ struct radeon_info {
        uint32_t                    drm_patchlevel;
        bool                        has_userptr;
        bool                        has_syncobj;
+       bool                        has_sync_file;
 
        /* Shader cores. */
        uint32_t                    r600_max_quad_pipes; /* wave size / 16 */
index 44ff5890356380fb2575cbc41e8f9c5303731f8f..6d28cda277126d3d11809409693f434dbe17e911 100644 (file)
@@ -1361,6 +1361,7 @@ bool si_common_screen_init(struct r600_common_screen *rscreen,
                       rscreen->info.drm_minor, rscreen->info.drm_patchlevel);
                printf("has_userptr = %i\n", rscreen->info.has_userptr);
                printf("has_syncobj = %u\n", rscreen->info.has_syncobj);
+               printf("has_sync_file = %u\n", rscreen->info.has_sync_file);
 
                printf("r600_max_quad_pipes = %i\n", rscreen->info.r600_max_quad_pipes);
                printf("max_shader_clock = %i\n", rscreen->info.max_shader_clock);