From patchwork Fri Oct 15 14:11:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 12562085 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89F1CC433EF for ; Fri, 15 Oct 2021 14:23:23 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5498661037 for ; Fri, 15 Oct 2021 14:23:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5498661037 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=DTi8YufNlhpdWBFxcieR7QYRDymuxfh9AxRtuC+Y8LA=; b=zVhkqE8laSwL1+ ecYZwv0+JQX0BEkf/Hx1dgwhMipN6ahjRGbx12OzJwe1Tn/3QoEWY512VqI3+eHS0qzbema036Wxc WO4kv4YaAjdp3pOxIQSmeRN41+heGqxWNY/5f8ZUTGA98a+Smk3Oc6yyHwt2anjN5yPzu5Mex6EHf bIQLb6Hrq0tCDFzvMIHkk1tcLBp6slCTYGGcuby1eGAXD7sOQKaj7KHJleiVonq/1jnkVYkPlzgx4 agSSbbL+tKRS51bVdjNAaApdDENkqVO8Z8H65zT6UVvjdRB1MRBRatAQbsCfUWIhr8pnmpcnh1UO+ 9nzmvcRYJsOroFDcKHTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbO5b-007YIK-J8; Fri, 15 Oct 2021 14:21:40 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbNvU-007Tpl-PK for linux-arm-kernel@lists.infradead.org; Fri, 15 Oct 2021 14:11:18 +0000 Received: by mail-wr1-x429.google.com with SMTP id e3so26534016wrc.11 for ; Fri, 15 Oct 2021 07:11:11 -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=SK5WSwXHZWoI/1ZBUvfDbCPhpcOUhghwxwipgWWDC98=; b=8B6JOltmwuzEfGkzrOKCjgmb6sk8JOnMULoXp871nvfb8vFUJ2EdlOZtTK7G4JrJcw eyBOHEMW5X/iGMIw6FR33U2jt+wak87HGpcNSIYzSFI3tRZUJ1lk2RvMtcy74/87tNFR ePFhvcDSKBfjBjTlE+CjEzSFbIP2aXyZslhj+ysU4Ie/YamccgSLDOeQ3d7dsvpsGWGO HoGNxI3wMYWQCUm2UjCG7kjyojNGGylze+ZNWWdhMzR10cLd6MocYdXwBnP8cqRDGz6B 4rVVW77uPZ5I2YVVjmu2W3UanuyGTAkeUKVAXrlAcuNpTtNcBzlKmKZ/K85fT5YWNmY6 VySQ== 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=SK5WSwXHZWoI/1ZBUvfDbCPhpcOUhghwxwipgWWDC98=; b=J/qSgMGcF/nq0d7MdL9W+pl11ItJ4EL3gjfWe2PXxBaWB7jOjA1gLfkDcJwBcg4MxL o70U1YWoZuLmY6v1QYDULxzzFB2kaqv3RKMiBGHACRt0zt5AKGoBwLenrW0WPLaNR75x /oXf3YmP9aAXm2xEic3sYeX0vDmiXT9Tlfsh17uZQwEfrGEJlAsplfPrT87Wvg5cJyb4 nrG9WjDaxzHMKEBhg2Gmy8iyijTJ+3aDNszGLueWTBxuhE9mT0Vbz/aBAEtYmOXMyceo 5jiIrLgYMU/3nawaa6VoE/t9CDj9+XWmsKVSUcn9bNVouV4UbKFfn3rkLwGZGAI7yEuh rOrg== X-Gm-Message-State: AOAM533GCUq5opP+rtDm5OyIotBKVOPr5V9JyWrD0DwoEJ0ObIJK4iKU r2yvyUexkF2pPCFzngkbpq80bg== X-Google-Smtp-Source: ABdhPJw/1LkkObJ3ghkbZlL8mXeEQ65q7HmlYnmT+4W1ZJ1xvKR2Kc179nzGYBN3EYBY+dBTEAhtGA== X-Received: by 2002:a5d:6d8c:: with SMTP id l12mr14612259wrs.80.1634307070511; Fri, 15 Oct 2021 07:11:10 -0700 (PDT) Received: from localhost.localdomain ([2001:861:44c0:66c0:f6e3:13bd:45ae:5eeb]) by smtp.gmail.com with ESMTPSA id f15sm4971434wrt.38.2021.10.15.07.11.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 07:11:10 -0700 (PDT) From: Neil Armstrong To: daniel@ffwll.ch, Laurent.pinchart@ideasonboard.com, sam@ravnborg.org Cc: martin.blumenstingl@googlemail.com, dri-devel@lists.freedesktop.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong Subject: [PATCH v2 0/6] drm/meson: rework encoders to pass ATTACH_NO_CONNECTOR Date: Fri, 15 Oct 2021 16:11:01 +0200 Message-Id: <20211015141107.2430800-1-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2607; h=from:subject; bh=fTkgFMlSB5Ej7MF+TequNqhZSjRHV4SIxj9PjVk81iE=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBhaYoipSArcNV7nFCbup2fdmzNK3qHxA1qegi12EUX 2eGrp7SJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCYWmKIgAKCRB33NvayMhJ0dkcD/ 9qlX4Gb1Is7ynKt7PiVlO7GkGeshsI29vfmJIFP6+ArJtfQIqxGFcFobg23cGo8fvZ4wX8UoXB+8C9 8MsuVXqNOoZnAmr2igGcYO2TvbazqG74mqzkStuvbmGEDLepBT315heMyfyDlyT0K/2pRu2MmNjINM mnT1zHtaNmS6gBH0zp+vGzojAIrhJMg7BzCEqDZ/3enp3saAazHP7+3fVcKf0KLOaXpzeZeRSfWlnp y11/5Gfx1PPbqLsQdb/pRHQrZGsvOxzgASt6l8A8UiGek3YD6CJqjmiejllwolyrkWl69zbpDqqbZC Y7RgjOhMcEMMls1oeLdikoSBtLAkasX+qzjlmjQzGbjVITun55XaFcRkqnnH9Xskkm85UF1PJk+WzT IpLxhMsvnrlGQw9JqHOdTYdzNLnZCeaRRpKq8sSwUAWmwEbRMkehxmMIhm87dG2mYDIWt8sh4hKSzj ks0VptYcTWLlMQlDxZRd7mgd3O/fxnP3nBGgHEbg9PdItyacSU5/FeMx5lwnvAnW2nK9kIESAduVFy cGK0TXiMG7qOpLzvLt/h8rCCPwxcmENXjHM6J8oKH5Wq+0vx948FXlmY5+afSZ9Ws+nOQkjAWHuBPh EVbGkLFvuTvjD59SJmDvli1PlO858luVua+adFk2PE3FKK6nMpD3N3p2tfFA== X-Developer-Key: i=narmstrong@baylibre.com; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211015_071112_861637_9D151A83 X-CRM114-Status: GOOD ( 11.93 ) 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 serie finnally reworks the drm/meson driver by extracting the encoders in their own file and moves to bridge-only callbacks. This permits passing the ATTACH_NO_CONNECTOR bridge attach flag and finally use the CVBS & HDMI display-connector driver. This will ease Martin Blumenstingl writing the HDMI transceiver driver for the older Meson8/8b SoCs, and sets the proper architecture for the work in progress MIPI-DSI support. Finally, this serie will path the way to a removal of the device component and use the drmm memory management. Changes since v1 at [1]; - patch 1: added sam's review tag, fixed include order, fixed doc wording - patch 2: added sam's ack tag, switched to dev_dbg() - patch 3: moved mode_set to atomic_enable, removed DRM_DEBUG, fixed include order - patch 4: added sam's ack tag & applied to drm-misc-next - patch 5 & 6: added sam's ack tag - patch 7: added sam's review tag, stopped saving connector, moved mode_set to atomic_enable, added missing atomic state callbacks, fixed include order, switched to dev_dbg/dev_err [1] https://lore.kernel.org/r/20211014152606.2289528-1-narmstrong@baylibre.com Neil Armstrong (6): drm/bridge: display-connector: implement bus fmts callbacks drm/meson: remove useless recursive components matching drm/meson: split out encoder from meson_dw_hdmi drm/meson: encoder_hdmi: switch to bridge DRM_BRIDGE_ATTACH_NO_CONNECTOR drm/meson: rename venc_cvbs to encoder_cvbs drm/meson: encoder_cvbs: switch to bridge with ATTACH_NO_CONNECTOR drivers/gpu/drm/bridge/display-connector.c | 86 ++++ drivers/gpu/drm/meson/Kconfig | 2 + drivers/gpu/drm/meson/Makefile | 3 +- drivers/gpu/drm/meson/meson_drv.c | 71 ++- drivers/gpu/drm/meson/meson_dw_hdmi.c | 342 +------------ drivers/gpu/drm/meson/meson_encoder_cvbs.c | 291 +++++++++++ ...meson_venc_cvbs.h => meson_encoder_cvbs.h} | 2 +- drivers/gpu/drm/meson/meson_encoder_hdmi.c | 452 ++++++++++++++++++ drivers/gpu/drm/meson/meson_encoder_hdmi.h | 12 + drivers/gpu/drm/meson/meson_venc_cvbs.c | 293 ------------ 10 files changed, 894 insertions(+), 660 deletions(-) create mode 100644 drivers/gpu/drm/meson/meson_encoder_cvbs.c rename drivers/gpu/drm/meson/{meson_venc_cvbs.h => meson_encoder_cvbs.h} (92%) create mode 100644 drivers/gpu/drm/meson/meson_encoder_hdmi.c create mode 100644 drivers/gpu/drm/meson/meson_encoder_hdmi.h delete mode 100644 drivers/gpu/drm/meson/meson_venc_cvbs.c base-commit: f6632721cd6231e1bf28b5317dcc7543e43359f7