Revert "drm/gem: Warn on illegal use of the dumb buffer interface v2"
This reverts commit 355a701838
.
This had some bad side effects under normal operation, and should
have been dropped earlier.
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
0d83b72acd
commit
da6b51d007
9 changed files with 12 additions and 74 deletions
|
@ -394,10 +394,9 @@ int radeon_gem_set_domain_ioctl(struct drm_device *dev, void *data,
|
|||
return r;
|
||||
}
|
||||
|
||||
static int radeon_mode_mmap(struct drm_file *filp,
|
||||
struct drm_device *dev,
|
||||
uint32_t handle, bool dumb,
|
||||
uint64_t *offset_p)
|
||||
int radeon_mode_dumb_mmap(struct drm_file *filp,
|
||||
struct drm_device *dev,
|
||||
uint32_t handle, uint64_t *offset_p)
|
||||
{
|
||||
struct drm_gem_object *gobj;
|
||||
struct radeon_bo *robj;
|
||||
|
@ -406,14 +405,6 @@ static int radeon_mode_mmap(struct drm_file *filp,
|
|||
if (gobj == NULL) {
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
/*
|
||||
* We don't allow dumb mmaps on objects created using another
|
||||
* interface.
|
||||
*/
|
||||
WARN_ONCE(dumb && !(gobj->dumb || gobj->import_attach),
|
||||
"Illegal dumb map of GPU buffer.\n");
|
||||
|
||||
robj = gem_to_radeon_bo(gobj);
|
||||
if (radeon_ttm_tt_has_userptr(robj->tbo.ttm)) {
|
||||
drm_gem_object_unreference_unlocked(gobj);
|
||||
|
@ -424,20 +415,12 @@ static int radeon_mode_mmap(struct drm_file *filp,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int radeon_mode_dumb_mmap(struct drm_file *filp,
|
||||
struct drm_device *dev,
|
||||
uint32_t handle, uint64_t *offset_p)
|
||||
{
|
||||
return radeon_mode_mmap(filp, dev, handle, true, offset_p);
|
||||
}
|
||||
|
||||
int radeon_gem_mmap_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *filp)
|
||||
{
|
||||
struct drm_radeon_gem_mmap *args = data;
|
||||
|
||||
return radeon_mode_mmap(filp, dev, args->handle, false,
|
||||
&args->addr_ptr);
|
||||
return radeon_mode_dumb_mmap(filp, dev, args->handle, &args->addr_ptr);
|
||||
}
|
||||
|
||||
int radeon_gem_busy_ioctl(struct drm_device *dev, void *data,
|
||||
|
@ -763,7 +746,6 @@ int radeon_mode_dumb_create(struct drm_file *file_priv,
|
|||
return -ENOMEM;
|
||||
|
||||
r = drm_gem_handle_create(file_priv, gobj, &handle);
|
||||
gobj->dumb = true;
|
||||
/* drop reference from allocate - handle holds it now */
|
||||
drm_gem_object_unreference_unlocked(gobj);
|
||||
if (r) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue