mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
iris/bufmgr: Use intel_ioctl() helper for GEM_SET_TILING
Replace opencoded ioctl() usage with a common intel_ioctl() helper. Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23399>
This commit is contained in:
parent
5140ff1948
commit
2d3c1707fa
1 changed files with 6 additions and 8 deletions
|
|
@ -1825,15 +1825,13 @@ iris_gem_set_tiling(struct iris_bo *bo, const struct isl_surf *surf)
|
|||
/* GEM_SET_TILING is slightly broken and overwrites the input on the
|
||||
* error path, so we have to open code intel_ioctl().
|
||||
*/
|
||||
do {
|
||||
struct drm_i915_gem_set_tiling set_tiling = {
|
||||
.handle = bo->gem_handle,
|
||||
.tiling_mode = tiling_mode,
|
||||
.stride = surf->row_pitch_B,
|
||||
};
|
||||
ret = ioctl(bufmgr->fd, DRM_IOCTL_I915_GEM_SET_TILING, &set_tiling);
|
||||
} while (ret == -1 && (errno == EINTR || errno == EAGAIN));
|
||||
struct drm_i915_gem_set_tiling set_tiling = {
|
||||
.handle = bo->gem_handle,
|
||||
.tiling_mode = tiling_mode,
|
||||
.stride = surf->row_pitch_B,
|
||||
};
|
||||
|
||||
ret = intel_ioctl(bufmgr->fd, DRM_IOCTL_I915_GEM_SET_TILING, &set_tiling);
|
||||
if (ret) {
|
||||
DBG("gem_set_tiling failed for BO %u: %s\n",
|
||||
bo->gem_handle, strerror(errno));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue