~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/intel/vulkan_hasvk/anv_gem.c

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
225
225
anv_gem_set_tiling(struct anv_device *device,
226
226
                   uint32_t gem_handle, uint32_t stride, uint32_t tiling)
227
227
{
228
 
   int ret;
229
 
 
230
228
   /* On discrete platforms we don't have DRM_IOCTL_I915_GEM_SET_TILING. So
231
229
    * nothing needs to be done.
232
230
    */
236
234
   /* set_tiling overwrites the input on the error path, so we have to open
237
235
    * code intel_ioctl.
238
236
    */
239
 
   do {
240
 
      struct drm_i915_gem_set_tiling set_tiling = {
241
 
         .handle = gem_handle,
242
 
         .tiling_mode = tiling,
243
 
         .stride = stride,
244
 
      };
245
 
 
246
 
      ret = ioctl(device->fd, DRM_IOCTL_I915_GEM_SET_TILING, &set_tiling);
247
 
   } while (ret == -1 && (errno == EINTR || errno == EAGAIN));
248
 
 
249
 
   return ret;
 
237
   struct drm_i915_gem_set_tiling set_tiling = {
 
238
      .handle = gem_handle,
 
239
      .tiling_mode = tiling,
 
240
      .stride = stride,
 
241
   };
 
242
 
 
243
   return intel_ioctl(device->fd, DRM_IOCTL_I915_GEM_SET_TILING, &set_tiling);
250
244
}
251
245
 
252
246
bool