mirror of
https://github.com/strongtz/i915-sriov-dkms.git
synced 2026-05-06 21:53:25 +08:00
drm/i915: Disable i915_gem_set_tiling_ioctl and i915_gem_get_tiling_ioctl in VF
PF: i915_gem_get_tiling_ioctl returns 0 with tiling_mode=2, swizzle_mode=0, phys_swizzle_mode=0 VF: i915_gem_get_tiling_ioctl returns 0 with tiling_mode=0, swizzle_mode=0, phys_swizzle_mode=0 The tiling_mode is lost on the VF. By disabling these ioctls, users should fallback to default values. This fixes the blocky artifact when sharing surfaces between VAAPI and OpenCL. I’m not sure if this is the correct way to do it, but it works. There may be unknown side effects, so further testing is still needed... Signed-off-by: bbaa <bbaa@bbaa.fun>
This commit is contained in:
@@ -347,7 +347,7 @@ i915_gem_set_tiling_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_i915_gem_object *obj;
|
||||
int err;
|
||||
|
||||
if (!to_gt(i915)->ggtt->num_fences && !IS_SRIOV_VF(i915))
|
||||
if (!to_gt(i915)->ggtt->num_fences || IS_SRIOV_VF(i915))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
obj = i915_gem_object_lookup(file, args->handle);
|
||||
@@ -430,7 +430,7 @@ i915_gem_get_tiling_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_i915_gem_object *obj;
|
||||
int err = -ENOENT;
|
||||
|
||||
if (!to_gt(i915)->ggtt->num_fences && !IS_SRIOV_VF(i915))
|
||||
if (!to_gt(i915)->ggtt->num_fences || IS_SRIOV_VF(i915))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
Reference in New Issue
Block a user