From patchwork Fri Mar 25 17:14:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume Ranquet X-Patchwork-Id: 12791792 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8F9FC4332F for ; Fri, 25 Mar 2022 17:18:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=k8V84UfRWslOy9meqQBkVvPxF091pe/hG1d3SMrj078=; b=TMJ61CEc4nP9pI y13GDs+aIC/AbYtS2Uls4hiLqPNniVhCMd+nw1dEQq6GYwiVswVUmRjk/D1gcJsRm1ZL8sxn9W9hq 7WwoxR9xSXdJBKqw1I1wM9H73FuZlS0/8Pg37CD7Vu4esUsQRHSsNB04msfQdATPhzLMY68+S0FEu UuGgJ1yBmLwAldcMVSuvAQDA34976OKRlzWTRpBCangmS+roJ3yQEbGfNSUL6cPyV+A7IFjGGW7XE VQij6+FxfHpaCowFQHYfKuIeP5dXteX9I+DRAEnWHKgefezwjKnHBR1g8V1E9Y9DUOlfUWAA4tfHr 4tbnJi2vF3cIBfIZgV4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nXnYS-002hSi-Gz; Fri, 25 Mar 2022 17:16:52 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nXnYK-002hMP-TE for linux-arm-kernel@lists.infradead.org; Fri, 25 Mar 2022 17:16:48 +0000 Received: by mail-wm1-x329.google.com with SMTP id bi13-20020a05600c3d8d00b0038c2c33d8f3so9384845wmb.4 for ; Fri, 25 Mar 2022 10:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ttvVODLTTBaqB4olSje/RjnCtKXgr801DvSo2q2eG0E=; b=N1CIxrPllldGtyrr6zpOrMX0FXbRkN9jSKNyyoOnpgzvf3oO00M6yzMIR/NdW3SJ1m tZDvFwFHCU0wiAvTdbmuCf6VURSMugIOFNr9ByRJR0ccKWPVhDJ7OExv6Yl/GbZu2pNx DFDfr7MvT/GIw1bYXLKZB5vruoRQkJsBGc5R6DF2aFSuHAmh0nlo2LSe6a8nhmC2xaav EgQhahyI4MwTpYQ1VKfoG4vl0ZOx69Oca5bEdc+a5E3kKOyNye+xSmu/v+bAY0WrrMKO 66HRHMw6d8lSFlB4Oacgo6ig6bCAad0RlRsdWosVOW5xo2PQC/W6/hpVr/LU68aFVsKX Qz7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ttvVODLTTBaqB4olSje/RjnCtKXgr801DvSo2q2eG0E=; b=XhVY8n/E5wDTUPX2gH7H4pyE8xrt0CvXPN2X2ikHwjSqb7dXThsD8WTw/PNqLjKsL8 fmizf/xTOVNv+mbonO23jjU8YFzsDKGXAcvbBsIA7lCB5/sKEfQ6U61mTeXhIFC3sXBN gVodsQYUYylBlX9Z12h/aWMqx2OX4oyxZ57p8KowdFrF2AfuDRtLnG/fcY95Ay4RTD2Z 5wAPCDJxzZwbatd+JZ+baB2b9F16bHjkVik7DdlRAewtaayu1mlzSZFk9qiyu9QiI2Hn v4rL/RUTdoaWxHvdZ6Rq8xrwn4VMsPPAjHry6dZsTef6ltP9/ewdOhP5XfTKU0iJlbwb eMdw== X-Gm-Message-State: AOAM531Ua2tTrYcXuUVA3BlMYdZbIknIk2PXWJW/SdbB6TbJfrQfu6os jcKQ/j68EaAHvWqi53liolEHjA== X-Google-Smtp-Source: ABdhPJxYt+gdFp9cOKWjwZsLb/u9lRiQpwwVDTh6wjY60qcTISWQeI+ehBpxnSUzrqMg6tzyAQdKCA== X-Received: by 2002:a05:600c:19ce:b0:38c:dcc1:4cf3 with SMTP id u14-20020a05600c19ce00b0038cdcc14cf3mr6782388wmq.126.1648228602590; Fri, 25 Mar 2022 10:16:42 -0700 (PDT) Received: from localhost.localdomain (2a02-8440-6240-cc41-3074-96af-9642-0003.rev.sfr.net. [2a02:8440:6240:cc41:3074:96af:9642:3]) by smtp.gmail.com with ESMTPSA id p16-20020a5d6390000000b00203ffebddf3sm7547464wru.99.2022.03.25.10.16.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 10:16:42 -0700 (PDT) From: Guillaume Ranquet To: chunkuang.hu@kernel.org, p.zabel@pengutronix.de, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, matthias.bgg@gmail.com, chunfeng.yun@mediatek.com, kishon@ti.com, vkoul@kernel.org, deller@gmx.de, ck.hu@mediatek.com, jitao.shi@mediatek.com, angelogioacchino.delregno@collabora.com Cc: dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-fbdev@vger.kernel.org, markyacoub@google.com Subject: [PATCH 00/22] drm/mediatek: Add mt8195 DisplayPort driver Date: Fri, 25 Mar 2022 18:14:49 +0100 Message-Id: <20220325171511.23493-1-granquet@baylibre.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220325_101645_062915_03FCECFA X-CRM114-Status: GOOD ( 23.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org this series is built around the DisplayPort driver. The dpi/dpintf driver and the added helper functions are required for the DisplayPort driver to work. This v9 is not quite ready yet, as project constraints forces me to publish v9 this week, I'm sorry if it's not standard practice. Moreover, it is still un-tested on a recent kernel. The integration kernel we are using is still based on 5.10... but we are actively working on bringing up a mt8195 integration branch on 5.17. The patches have been rebased on top of next-20220301 and have been tested to build sucessfully (no functional testing). Changes from v8: - The DP-Phy now has its own dt-bindings and now shares a regmap using the syscon facility with the DP driver. - hot plug detection has been removed from the Embedded Display Port. patch and moved to the patch adding External Display Port support. - started working on better error handling for the mtk_dp driver. - rebased on linux-next. - removal of tvd pll clocks re-introduced by mistake. - various coding style fixes. Things that are in my todolist for v10: - fixing the train_handler in the mtk_dp driver, as I haven't been able to reproduce locally (hopefully migrating to running the tests on a more recent kernel will help) - explaining the various sleep/delays introduced in the drivers - explaining some of the differences between mt8195 and "legacy" - retrieve CK/DE support from panel driver instead of hardcoding it into the dpi driver. - better error handling/reporting in mtk_dp - look into re-implementing mtk_dp_aux_transfer() using drm_dp_dpcd_read and drm_dp_dpcd_write as suggested by Rex. Older revisions: RFC - https://lore.kernel.org/linux-mediatek/20210816192523.1739365-1-msp@baylibre.com/ v1 - https://lore.kernel.org/linux-mediatek/20210906193529.718845-1-msp@baylibre.com/ v2 - https://lore.kernel.org/linux-mediatek/20210920084424.231825-1-msp@baylibre.com/ v3 - https://lore.kernel.org/linux-mediatek/20211001094443.2770169-1-msp@baylibre.com/ v4 - https://lore.kernel.org/linux-mediatek/20211011094624.3416029-1-msp@baylibre.com/ v5 - https://lore.kernel.org/all/20211021092707.3562523-1-msp@baylibre.com/ v6 - https://lore.kernel.org/linux-mediatek/20211110130623.20553-1-granquet@baylibre.com/ v7 - https://lore.kernel.org/linux-mediatek/20211217150854.2081-1-granquet@baylibre.com/ v8 - https://lore.kernel.org/linux-mediatek/20220218145437.18563-1-granquet@baylibre.com/ Functional dependencies are: - Add Mediatek Soc DRM (vdosys0) support for mt8195 https://lore.kernel.org/all/20211026155911.17651-1-jason-jh.lin@mediatek.com/ - Add MediaTek SoC DRM (vdosys1) support for mt8195 https://lore.kernel.org/all/20211029075203.17093-1-nancy.lin@mediatek.com/ Guillaume Ranquet (15): dt-bindings: mediatek,dp_phy: Add Display Port PHY binding drm/edid: Convert cea_sad helper struct to kernelDoc drm/edid: Add cea_sad helpers for freq/length drm/mediatek: dpi: move dpi limits to SoC config drm/mediatek: dpi: implement a CK/DE pol toggle in SoC config drm/mediatek: dpi: implement a swap_input toggle in SoC config drm/mediatek: dpi: move dimension mask to SoC config drm/mediatek: dpi: move hvsize_mask to SoC config drm/mediatek: dpi: move swap_shift to SoC config drm/mediatek: dpi: move the yuv422_en_bit to SoC config drm/mediatek: dpi: move the csc_enable bit to SoC config drm/mediatek: dpi: Add dpintf support drm/meditek: dpi: Add matrix_sel helper drm/mediatek: Add mt8195 External DisplayPort support drm/mediatek: DP audio support for mt8195 Jitao Shi (2): drm/mediatek: add hpd debounce drm/mediatek: change the aux retries times when receiving AUX_DEFER Markus Schneider-Pargmann (5): dt-bindings: mediatek,dpi: Add DP_INTF compatible dt-bindings: mediatek,dp: Add Display Port binding video/hdmi: Add audio_infoframe packing for DP phy: phy-mtk-dp: Add driver for DP phy drm/mediatek: Add mt8195 Embedded DisplayPort driver .../display/mediatek/mediatek,dp.yaml | 97 + .../display/mediatek/mediatek,dpi.yaml | 11 +- .../bindings/phy/mediatek,dp-phy.yaml | 43 + MAINTAINERS | 1 + drivers/gpu/drm/drm_edid.c | 74 + drivers/gpu/drm/mediatek/Kconfig | 8 + drivers/gpu/drm/mediatek/Makefile | 2 + drivers/gpu/drm/mediatek/mtk_dp.c | 3204 +++++++++++++++++ drivers/gpu/drm/mediatek/mtk_dp_reg.h | 568 +++ drivers/gpu/drm/mediatek/mtk_dpi.c | 222 +- drivers/gpu/drm/mediatek/mtk_dpi_regs.h | 38 + drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 8 + drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 1 + drivers/gpu/drm/mediatek/mtk_drm_drv.c | 6 +- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 1 + drivers/phy/mediatek/Kconfig | 8 + drivers/phy/mediatek/Makefile | 1 + drivers/phy/mediatek/phy-mtk-dp.c | 202 ++ drivers/video/hdmi.c | 82 +- include/drm/dp/drm_dp_helper.h | 2 + include/drm/drm_edid.h | 25 +- include/linux/hdmi.h | 7 +- include/linux/soc/mediatek/mtk-mmsys.h | 3 +- 23 files changed, 4541 insertions(+), 73 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,dp.yaml create mode 100644 Documentation/devicetree/bindings/phy/mediatek,dp-phy.yaml create mode 100644 drivers/gpu/drm/mediatek/mtk_dp.c create mode 100644 drivers/gpu/drm/mediatek/mtk_dp_reg.h create mode 100644 drivers/phy/mediatek/phy-mtk-dp.c