anv/dg1: Don't use SET_TILING kernel uapi.

It is not available on discrete platforms anymore.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4956>
This commit is contained in:
Rafael Antognolli
2020-04-27 22:54:51 +00:00
committed by Jordan Justen
parent e658835436
commit 37a724e4ae
2 changed files with 20 additions and 4 deletions

View File

@@ -227,6 +227,11 @@ anv_gem_get_tiling(struct anv_device *device, uint32_t gem_handle)
.handle = gem_handle,
};
/* FIXME: On discrete platforms we don't have DRM_IOCTL_I915_GEM_GET_TILING
* anymore, so we will need another way to get the tiling. Apparently this
* is only used in Android code, so we may need some other way to
* communicate the tiling mode.
*/
if (gen_ioctl(device->fd, DRM_IOCTL_I915_GEM_GET_TILING, &get_tiling)) {
assert(!"Failed to get BO tiling");
return -1;
@@ -241,6 +246,12 @@ anv_gem_set_tiling(struct anv_device *device,
{
int ret;
/* On discrete platforms we don't have DRM_IOCTL_I915_GEM_SET_TILING. So
* nothing needs to be done.
*/
if (!device->info.has_tiling_uapi)
return 0;
/* set_tiling overwrites the input on the error path, so we have to open
* code gen_ioctl.
*/