Commit 0c312793 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm/tegra/for-5.17-rc6' of https://gitlab.freedesktop.org/drm/tegra into drm-fixes



drm/tegra: Fixes for v5.17-rc6

Contains a couple of fixes for Tegra186 suspend/resume, syncpoint
waiting, a build warning and eDP on older Tegra devices.

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Thierry Reding <thierry.reding@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220223161903.293392-1-thierry.reding@gmail.com
parents 753a64c7 8913e1ae
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ config DRM_TEGRA
	depends on COMMON_CLK
	depends on DRM
	depends on OF
	select DRM_DP_AUX_BUS
	select DRM_KMS_HELPER
	select DRM_MIPI_DSI
	select DRM_PANEL
+7 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <linux/workqueue.h>

#include <drm/drm_dp_helper.h>
#include <drm/drm_dp_aux_bus.h>
#include <drm/drm_panel.h>

#include "dp.h"
@@ -570,6 +571,12 @@ static int tegra_dpaux_probe(struct platform_device *pdev)
	list_add_tail(&dpaux->list, &dpaux_list);
	mutex_unlock(&dpaux_lock);

	err = devm_of_dp_aux_populate_ep_devices(&dpaux->aux);
	if (err < 0) {
		dev_err(dpaux->dev, "failed to populate AUX bus: %d\n", err);
		return err;
	}

	return 0;
}

+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ static void falcon_copy_firmware_image(struct falcon *falcon,

	/* copy the whole thing taking into account endianness */
	for (i = 0; i < firmware->size / sizeof(u32); i++)
		virt[i] = le32_to_cpu(((u32 *)firmware->data)[i]);
		virt[i] = le32_to_cpu(((__le32 *)firmware->data)[i]);
}

static int falcon_parse_firmware_image(struct falcon *falcon)
+10 −25
Original line number Diff line number Diff line
@@ -137,8 +137,15 @@ void host1x_syncpt_restore(struct host1x *host)
	struct host1x_syncpt *sp_base = host->syncpt;
	unsigned int i;

	for (i = 0; i < host1x_syncpt_nb_pts(host); i++)
	for (i = 0; i < host1x_syncpt_nb_pts(host); i++) {
		/*
		 * Unassign syncpt from channels for purposes of Tegra186
		 * syncpoint protection. This prevents any channel from
		 * accessing it until it is reassigned.
		 */
		host1x_hw_syncpt_assign_to_channel(host, sp_base + i, NULL);
		host1x_hw_syncpt_restore(host, sp_base + i);
	}

	for (i = 0; i < host1x_syncpt_nb_bases(host); i++)
		host1x_hw_syncpt_restore_wait_base(host, sp_base + i);
@@ -227,27 +234,12 @@ int host1x_syncpt_wait(struct host1x_syncpt *sp, u32 thresh, long timeout,
	void *ref;
	struct host1x_waitlist *waiter;
	int err = 0, check_count = 0;
	u32 val;

	if (value)
		*value = 0;

	/* first check cache */
	if (host1x_syncpt_is_expired(sp, thresh)) {
	if (value)
		*value = host1x_syncpt_load(sp);

	if (host1x_syncpt_is_expired(sp, thresh))
		return 0;
	}

	/* try to read from register */
	val = host1x_hw_syncpt_load(sp->host, sp);
	if (host1x_syncpt_is_expired(sp, thresh)) {
		if (value)
			*value = val;

		goto done;
	}

	if (!timeout) {
		err = -EAGAIN;
@@ -352,13 +344,6 @@ int host1x_syncpt_init(struct host1x *host)
	for (i = 0; i < host->info->nb_pts; i++) {
		syncpt[i].id = i;
		syncpt[i].host = host;

		/*
		 * Unassign syncpt from channels for purposes of Tegra186
		 * syncpoint protection. This prevents any channel from
		 * accessing it until it is reassigned.
		 */
		host1x_hw_syncpt_assign_to_channel(host, &syncpt[i], NULL);
	}

	for (i = 0; i < host->info->nb_bases; i++)