Skip to content
Snippets Groups Projects
Commit bd14b2cf authored by Keith Packard's avatar Keith Packard Committed by Emma Anholt
Browse files

intel: return error status from drm_intel_gem_bo_map


Applications may actually care if the mapping operation failed, so when
it happens, return an error indication. errno is probably trashed by
fprintf though.

Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent b13f4e1a
No related branches found
No related tags found
No related merge requests found
......@@ -544,6 +544,8 @@ drm_intel_gem_bo_map(drm_intel_bo *bo, int write_enable)
fprintf(stderr, "%s:%d: Error mapping buffer %d (%s): %s .\n",
__FILE__, __LINE__,
bo_gem->gem_handle, bo_gem->name, strerror(errno));
pthread_mutex_unlock(&bufmgr_gem->lock);
return ret;
}
bo_gem->virtual = (void *)(uintptr_t)mmap_arg.addr_ptr;
bo_gem->swrast = 0;
......@@ -566,6 +568,8 @@ drm_intel_gem_bo_map(drm_intel_bo *bo, int write_enable)
if (ret != 0) {
fprintf (stderr, "%s:%d: Error setting swrast %d: %s\n",
__FILE__, __LINE__, bo_gem->gem_handle, strerror (errno));
pthread_mutex_unlock(&bufmgr_gem->lock);
return ret;
}
bo_gem->swrast = 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment