Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a009085 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge branch 'drm/for-next' of git://anongit.freedesktop.org/tegra/linux into drm-next

These changes are mostly minor fixes to things introduced in 3.10. The
biggest chunk is updates to the host1x firewall which checks job
submissions from userspace and wasn't working properly. All other
patches are mostly one-liners. Nothing new or too exciting this time
around.

* 'drm/for-next' of git://anongit.freedesktop.org/tegra/linux:
  gpu: host1x: Rework CPU syncpoint increment
  gpu: host1x: Fix client_managed type
  gpu: host1x: Fix memory access in syncpt request
  gpu: host1x: Copy gathers before verification
  gpu: host1x: Don't reset firewall between gathers
  gpu: host1x: Check reloc table before usage
  gpu: host1x: Check INCR opcode correctly
  drm/tegra: Remove DRIVER_BUS_PLATFORM from driver_features
  drm/tegra: Fix return value
  drm/tegra: Include header drm/drm.h
  MAINTAINERS: Update Tegra DRM entry
  drm/tegra: fix error return code in gr2d_submit()
  drm/tegra: fix missing unlock on error
  drm/tegra: Honor pixel-format changes
  drm/tegra: Explicitly set irq_enabled
  drm/tegra: Don't disable unused planes
parents c0a60802 ebae30b1
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -2697,12 +2697,14 @@ F: include/drm/exynos*
F:	include/uapi/drm/exynos*

DRM DRIVERS FOR NVIDIA TEGRA
M:	Thierry Reding <thierry.reding@avionic-design.de>
M:	Thierry Reding <thierry.reding@gmail.com>
M:	Terje Bergström <tbergstrom@nvidia.com>
L:	dri-devel@lists.freedesktop.org
L:	linux-tegra@vger.kernel.org
T:	git git://gitorious.org/thierryreding/linux.git
T:	git git://anongit.freedesktop.org/tegra/linux.git
S:	Maintained
F:	drivers/gpu/drm/tegra/
F:	drivers/gpu/host1x/
F:	include/uapi/drm/tegra_drm.h
F:	Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt

DSBR100 USB FM RADIO DRIVER
+4 −4
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ struct host1x_syncpt_ops {
	void (*restore_wait_base)(struct host1x_syncpt *syncpt);
	void (*load_wait_base)(struct host1x_syncpt *syncpt);
	u32 (*load)(struct host1x_syncpt *syncpt);
	void (*cpu_incr)(struct host1x_syncpt *syncpt);
	int (*cpu_incr)(struct host1x_syncpt *syncpt);
	int (*patch_wait)(struct host1x_syncpt *syncpt, void *patch_addr);
};

@@ -157,10 +157,10 @@ static inline u32 host1x_hw_syncpt_load(struct host1x *host,
	return host->syncpt_op->load(sp);
}

static inline void host1x_hw_syncpt_cpu_incr(struct host1x *host,
static inline int host1x_hw_syncpt_cpu_incr(struct host1x *host,
					    struct host1x_syncpt *sp)
{
	host->syncpt_op->cpu_incr(sp);
	return host->syncpt_op->cpu_incr(sp);
}

static inline int host1x_hw_syncpt_patch_wait(struct host1x *host,
+5 −0
Original line number Diff line number Diff line
@@ -79,6 +79,9 @@ static int tegra_plane_disable(struct drm_plane *plane)
	struct tegra_plane *p = to_tegra_plane(plane);
	unsigned long value;

	if (!plane->crtc)
		return 0;

	value = WINDOW_A_SELECT << p->index;
	tegra_dc_writel(dc, value, DC_CMD_DISPLAY_WINDOW_HEADER);

@@ -140,6 +143,7 @@ static int tegra_dc_add_planes(struct drm_device *drm, struct tegra_dc *dc)
static int tegra_dc_set_base(struct tegra_dc *dc, int x, int y,
			     struct drm_framebuffer *fb)
{
	unsigned int format = tegra_dc_format(fb->pixel_format);
	struct tegra_bo *bo = tegra_fb_get_plane(fb, 0);
	unsigned long value;

@@ -150,6 +154,7 @@ static int tegra_dc_set_base(struct tegra_dc *dc, int x, int y,

	tegra_dc_writel(dc, bo->paddr + value, DC_WINBUF_START_ADDR);
	tegra_dc_writel(dc, fb->pitches[0], DC_WIN_LINE_STRIDE);
	tegra_dc_writel(dc, format, DC_WIN_COLOR_DEPTH);

	value = GENERAL_UPDATE | WIN_A_UPDATE;
	tegra_dc_writel(dc, value, DC_CMD_STATE_CONTROL);
+11 −3
Original line number Diff line number Diff line
@@ -148,6 +148,7 @@ int host1x_drm_init(struct host1x_drm *host1x, struct drm_device *drm)
				dev_err(host1x->dev,
					"DRM setup failed for %s: %d\n",
					dev_name(client->dev), err);
				mutex_unlock(&host1x->clients_lock);
				return err;
			}
		}
@@ -175,6 +176,7 @@ int host1x_drm_exit(struct host1x_drm *host1x)
				dev_err(host1x->dev,
					"DRM cleanup failed for %s: %d\n",
					dev_name(client->dev), err);
				mutex_unlock(&host1x->clients_lock);
				return err;
			}
		}
@@ -257,6 +259,13 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags)
	if (err < 0)
		return err;

	/*
	 * We don't use the drm_irq_install() helpers provided by the DRM
	 * core, so we need to set this manually in order to allow the
	 * DRM_IOCTL_WAIT_VBLANK to operate correctly.
	 */
	drm->irq_enabled = 1;

	err = drm_vblank_init(drm, drm->mode_config.num_crtc);
	if (err < 0)
		return err;
@@ -378,8 +387,7 @@ static int tegra_syncpt_incr(struct drm_device *drm, void *data,
	if (!sp)
		return -EINVAL;

	host1x_syncpt_incr(sp);
	return 0;
	return host1x_syncpt_incr(sp);
}

static int tegra_syncpt_wait(struct drm_device *drm, void *data,
@@ -605,7 +613,7 @@ static void tegra_debugfs_cleanup(struct drm_minor *minor)
#endif

struct drm_driver tegra_drm_driver = {
	.driver_features = DRIVER_BUS_PLATFORM | DRIVER_MODESET | DRIVER_GEM,
	.driver_features = DRIVER_MODESET | DRIVER_GEM,
	.load = tegra_drm_load,
	.unload = tegra_drm_unload,
	.open = tegra_drm_open,
+8 −4
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ static struct host1x_bo *host1x_bo_lookup(struct drm_device *drm,

	gem = drm_gem_object_lookup(drm, file, handle);
	if (!gem)
		return 0;
		return NULL;

	mutex_lock(&drm->struct_mutex);
	drm_gem_object_unreference(gem);
@@ -135,8 +135,10 @@ static int gr2d_submit(struct host1x_drm_context *context,
			goto fail;

		bo = host1x_bo_lookup(drm, file, cmdbuf.handle);
		if (!bo)
		if (!bo) {
			err = -ENOENT;
			goto fail;
		}

		host1x_job_add_gather(job, bo, cmdbuf.words, cmdbuf.offset);
		num_cmdbufs--;
@@ -158,9 +160,11 @@ static int gr2d_submit(struct host1x_drm_context *context,
		reloc->cmdbuf = cmdbuf;
		reloc->target = target;

		if (!reloc->target || !reloc->cmdbuf)
		if (!reloc->target || !reloc->cmdbuf) {
			err = -ENOENT;
			goto fail;
		}
	}

	err = copy_from_user(job->waitchk, waitchks,
			     sizeof(*waitchks) * num_waitchks);
@@ -281,7 +285,7 @@ static int gr2d_probe(struct platform_device *pdev)
	if (!gr2d->channel)
		return -ENOMEM;

	*syncpts = host1x_syncpt_request(dev, 0);
	*syncpts = host1x_syncpt_request(dev, false);
	if (!(*syncpts)) {
		host1x_channel_free(gr2d->channel);
		return -ENOMEM;
Loading