From patchwork Wed Oct 2 05:33:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kwanghoon Son X-Patchwork-Id: 832905 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 048521862F for ; Wed, 2 Oct 2024 05:33:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.24 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727847238; cv=none; b=XP5cBBG9+iJm3ZAJOXs7o65cqm3WSzSot0evM5HevjOMV8kPWaiYMEJO2bPq8g5L2AUwkijuCKAlpZB70pCLldpJe6FA638UvDsZJ0L9GR9p0qJ60ZKaN1NLAVBbV7GAaFlQI4QCN0WbJbqnFqtQFOIztS1jNBMkAHFNNF8c/po= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727847238; c=relaxed/simple; bh=zD3Fqrdk+2mk+4/FhEqoW9Ka1t9XF5ZY/Jkvbv4kLXk=; h=From:Date:Subject:MIME-Version:Message-Id:In-Reply-To:To:Cc: Content-Type:References; b=Fnu5CYjUY5a6F6zAqMO2+LCBmVa3O62qXTSkaCRkR20yliHwyUdLcPldVpnVl4PvQx1E8xOvag+7pZfFU1/X/pmfRR7elU8FqzNlgNJ/mMC62A/sFTmz/Q+/nTv+eXz/83EnHpwvLBCzzCt3pyCn1qZssez6pNCKgJob0nkInEM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=u6cjT/ET; arc=none smtp.client-ip=203.254.224.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="u6cjT/ET" Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20241002053348epoutp0131fb22d619aea07201e12c97a943e2b2~6i_ZE69X62650226502epoutp01I for ; Wed, 2 Oct 2024 05:33:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20241002053348epoutp0131fb22d619aea07201e12c97a943e2b2~6i_ZE69X62650226502epoutp01I DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1727847228; bh=kFQL8xYZO0lCk/0/PkinzPR6Z+jedHzaBTtn2WRjdQg=; h=From:Date:Subject:In-Reply-To:To:Cc:References:From; b=u6cjT/ET58OQxmPU7gncWmsmWe4LdC4rz7wObXqa/pman7n1kKxxc28MUwuV5czp4 W4FgfgQ9ZmX7EX//146l8JucwdFgeca5AAhlVQpfTFcLZp3AWflS5c5kAF0oYWq40q x0Y6ZXt27X97KEKcr+4WG5+3pfKZdtiEN1qSdijQ= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20241002053347epcas1p3d173cb04844c43dd86b3b54306790dec~6i_Yr1V_K3208932089epcas1p3k; Wed, 2 Oct 2024 05:33:47 +0000 (GMT) Received: from epsmges1p5.samsung.com (unknown [182.195.36.133]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4XJNlG4Sckz4x9Q3; Wed, 2 Oct 2024 05:33:46 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id AB.57.09398.63BDCF66; Wed, 2 Oct 2024 14:33:42 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p4.samsung.com (KnoxPortal) with ESMTPA id 20241002053342epcas1p4ea84fa3c156342a087f77dc2a1fc2bc5~6i_TglJ7y1369513695epcas1p4_; Wed, 2 Oct 2024 05:33:42 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20241002053342epsmtrp21e0c67fb6e75237da715b3890131992f~6i_Tfe3Yn3067930679epsmtrp2S; Wed, 2 Oct 2024 05:33:42 +0000 (GMT) X-AuditID: b6c32a39-39fff700000024b6-88-66fcdb360189 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 50.94.08229.53BDCF66; Wed, 2 Oct 2024 14:33:42 +0900 (KST) Received: from [127.0.1.1] (unknown [10.113.111.204]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20241002053341epsmtip1f50982418579fc737f81d7b640898644~6i_TN5fJP1899818998epsmtip1P; Wed, 2 Oct 2024 05:33:41 +0000 (GMT) From: Kwanghoon Son Date: Wed, 02 Oct 2024 14:33:24 +0900 Subject: [PATCH WIP 4/7] drm/exynos: exynos DPTX hw Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241002-auto9-v1-4-c4dc3385f415@samsung.com> In-Reply-To: <20241002-auto9-v1-0-c4dc3385f415@samsung.com> To: Inki Dae , Krzysztof Kozlowski , Alim Akhtar , David Virag , Sam Protsenko Cc: linux-samsung-soc@vger.kernel.org, Kwanghoon Son X-Mailer: b4 0.14.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkk+LIzCtJLcpLzFFi42LZdlhTV9fs9p80g54f6hYP5m1js5h0fwKL Re+aq0wW589vYLeYcX4fk8XzPiBx/P1jRgd2j52z7rJ7bFrVyeZx59oeNo++LasYPT5vkgtg jcq2yUhNTEktUkjNS85Pyc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c2bc5 X-Msg-Generator: CA CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20241002053342epcas1p4ea84fa3c156342a087f77dc2a1fc2bc5 References: <20241002-auto9-v1-0-c4dc3385f415@samsung.com> I didn't touch codes from vendor kernel. It's really bad form. Signed-off-by: Kwanghoon Son --- drivers/gpu/drm/exynos/exynos_drm_dp.c | 5038 ++++++++++++++++++++ drivers/gpu/drm/exynos/exynos_drm_dp.h | 964 ++++ .../gpu/drm/exynos/exynos_drm_dp_link_training.c | 586 +++ 3 files changed, 6588 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dp.c b/drivers/gpu/drm/exynos/exynos_drm_dp.c new file mode 100644 index 000000000000..920080b15519 --- /dev/null +++ b/drivers/gpu/drm/exynos/exynos_drm_dp.c @@ -0,0 +1,5038 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Samsung ExynosAuto DRM Display Port driver + * + * Copyright (C) 2018 Samsung Electronics Co.Ltd + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include