aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/drm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/tegra/drm.c')
-rw-r--r--drivers/gpu/drm/tegra/drm.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index 8e6b18caa706..b59c3bf0df44 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -74,7 +74,7 @@ static void tegra_atomic_work(struct work_struct *work)
}
static int tegra_atomic_commit(struct drm_device *drm,
- struct drm_atomic_state *state, bool async)
+ struct drm_atomic_state *state, bool nonblock)
{
struct tegra_drm *tegra = drm->dev_private;
int err;
@@ -83,7 +83,7 @@ static int tegra_atomic_commit(struct drm_device *drm,
if (err)
return err;
- /* serialize outstanding asynchronous commits */
+ /* serialize outstanding nonblocking commits */
mutex_lock(&tegra->commit.lock);
flush_work(&tegra->commit.work);
@@ -95,7 +95,7 @@ static int tegra_atomic_commit(struct drm_device *drm,
drm_atomic_helper_swap_state(drm, state);
- if (async)
+ if (nonblock)
tegra_atomic_schedule(tegra, state);
else
tegra_atomic_complete(tegra, state);
@@ -180,7 +180,6 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags)
/* syncpoints are used for full 32-bit hardware VBLANK counters */
drm->max_vblank_count = 0xffffffff;
- drm->vblank_disable_allowed = true;
err = drm_vblank_init(drm, drm->mode_config.num_crtc);
if (err < 0)
@@ -268,12 +267,12 @@ static void tegra_drm_lastclose(struct drm_device *drm)
}
static struct host1x_bo *
-host1x_bo_lookup(struct drm_device *drm, struct drm_file *file, u32 handle)
+host1x_bo_lookup(struct drm_file *file, u32 handle)
{
struct drm_gem_object *gem;
struct tegra_bo *bo;
- gem = drm_gem_object_lookup(drm, file, handle);
+ gem = drm_gem_object_lookup(file, handle);
if (!gem)
return NULL;
@@ -311,11 +310,11 @@ static int host1x_reloc_copy_from_user(struct host1x_reloc *dest,
if (err < 0)
return err;
- dest->cmdbuf.bo = host1x_bo_lookup(drm, file, cmdbuf);
+ dest->cmdbuf.bo = host1x_bo_lookup(file, cmdbuf);
if (!dest->cmdbuf.bo)
return -ENOENT;
- dest->target.bo = host1x_bo_lookup(drm, file, target);
+ dest->target.bo = host1x_bo_lookup(file, target);
if (!dest->target.bo)
return -ENOENT;
@@ -363,7 +362,7 @@ int tegra_drm_submit(struct tegra_drm_context *context,
goto fail;
}
- bo = host1x_bo_lookup(drm, file, cmdbuf.handle);
+ bo = host1x_bo_lookup(file, cmdbuf.handle);
if (!bo) {
err = -ENOENT;
goto fail;
@@ -463,7 +462,7 @@ static int tegra_gem_mmap(struct drm_device *drm, void *data,
struct drm_gem_object *gem;
struct tegra_bo *bo;
- gem = drm_gem_object_lookup(drm, file, args->handle);
+ gem = drm_gem_object_lookup(file, args->handle);
if (!gem)
return -EINVAL;
@@ -672,7 +671,7 @@ static int tegra_gem_set_tiling(struct drm_device *drm, void *data,
return -EINVAL;
}
- gem = drm_gem_object_lookup(drm, file, args->handle);
+ gem = drm_gem_object_lookup(file, args->handle);
if (!gem)
return -ENOENT;
@@ -694,7 +693,7 @@ static int tegra_gem_get_tiling(struct drm_device *drm, void *data,
struct tegra_bo *bo;
int err = 0;
- gem = drm_gem_object_lookup(drm, file, args->handle);
+ gem = drm_gem_object_lookup(file, args->handle);
if (!gem)
return -ENOENT;
@@ -736,7 +735,7 @@ static int tegra_gem_set_flags(struct drm_device *drm, void *data,
if (args->flags & ~DRM_TEGRA_GEM_FLAGS)
return -EINVAL;
- gem = drm_gem_object_lookup(drm, file, args->handle);
+ gem = drm_gem_object_lookup(file, args->handle);
if (!gem)
return -ENOENT;
@@ -758,7 +757,7 @@ static int tegra_gem_get_flags(struct drm_device *drm, void *data,
struct drm_gem_object *gem;
struct tegra_bo *bo;
- gem = drm_gem_object_lookup(drm, file, args->handle);
+ gem = drm_gem_object_lookup(file, args->handle);
if (!gem)
return -ENOENT;
@@ -878,7 +877,7 @@ static int tegra_debugfs_framebuffers(struct seq_file *s, void *data)
seq_printf(s, "%3d: user size: %d x %d, depth %d, %d bpp, refcount %d\n",
fb->base.id, fb->width, fb->height, fb->depth,
fb->bits_per_pixel,
- atomic_read(&fb->refcount.refcount));
+ drm_framebuffer_read_refcount(fb));
}
mutex_unlock(&drm->mode_config.fb_lock);
@@ -932,7 +931,7 @@ static struct drm_driver tegra_drm_driver = {
.debugfs_cleanup = tegra_debugfs_cleanup,
#endif
- .gem_free_object = tegra_bo_free_object,
+ .gem_free_object_unlocked = tegra_bo_free_object,
.gem_vm_ops = &tegra_bo_vm_ops,
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,