From patchwork Fri Aug 30 15:21:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shimrra Shai X-Patchwork-Id: 13785251 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 60D30CA0FFF for ; Fri, 30 Aug 2024 15:24:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=jwcy2RWpl0Jy35HmMik2lryKjWDim5fRSydnX94H64Q=; b=iZmuy4V3qL1jqAyi3QczeXvAGy bqkR6emPE71Rx19d7JCXQANDAZV4CCpAJ2rrxCBjN7Pf1oxZWc2GR5naNqnBr1aP0B2i2yi+a8Urt wX6goycz7uv1zLq9bUu3zCgsm0dnvSCM3OFzhJJ+Bg+07GsOUagHDn9DdKDnk5UUffGlLlnJPFz3J C8sJ9fg7D0hUkzHAgKAtIuzJ2r1vmLgLIOesND3EhWdlRKRJkbeJTB5fRCLkxpYuezTu1Wql6HiXM AWKDoGJ57QuHSQC2pm4r11MHHpBD0XqBj6S9JbQiOM0t9ekyDmOTlc/nqY+RFX+viTULtldT7vZ34 +4opn0TA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sk3Tz-00000006lqz-2ETn; Fri, 30 Aug 2024 15:24:15 +0000 Received: from mail-il1-x130.google.com ([2607:f8b0:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sk3Rk-00000006lSZ-2inb; Fri, 30 Aug 2024 15:21:58 +0000 Received: by mail-il1-x130.google.com with SMTP id e9e14a558f8ab-39f37a5a091so6570775ab.1; Fri, 30 Aug 2024 08:21:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725031315; x=1725636115; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jwcy2RWpl0Jy35HmMik2lryKjWDim5fRSydnX94H64Q=; b=ZN2gN2xMo4F/S6Xl3+h50WLzYxvCR31xNTYO8MhFkzCePDBe6P1MQ90g6SgWhfO81Y QiaI0LiMYZeOFHGeE4aycdL805Fg6Q1SGMjUbcGAndS2nbbJ/AUdWZ2RpoFkAge3b3vC PIgY98kJiHdtlgmRwSeg4Oxn8imi7x6Zp60EHIuzQQXcXT88M9opSNCS4BnB0Y7yA459 tCDg6Zy7oNpXnkK9Q/gsLJIKrBIKkuIYAr/fDACxVwF1Uvo/GfrGn3lp9Cj2r1Lxna4x JQkAA16Dr8NTbxZFP2uH94VXmBxRuCodkvyksGJzQv3Zgazm1KMok+5H4bTU6P29yj9e ojbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725031315; x=1725636115; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jwcy2RWpl0Jy35HmMik2lryKjWDim5fRSydnX94H64Q=; b=aoXE1BuracPCKnYt/PNOs2sILNNTrfeHOOm/9TtMka7aVGPfMjwAcgZ8f2cdwEsa3B 9kkhwB+kdTlFfUkhu3fNUqLshaJcxyRes/hpxgKvZabLfYvnJEttn8ke9uGVWgKjkjCJ XRT9DA80HTy9g9HpAmUzMYg4ciqwvM07ow1HBobmI916hd5C20L/Tex/42BxkdO08Ldw lCqZfFWEKL67U9vyCJI2uihsFFK9J6b+j7zh/OVjK1W0/Z26sy+R74fTnE8bekfBSE7f xg95NIBrQFx5cfOC0NAEr7jbbqbROw54sFrw9crINeXxny6Jlv3TRLWFervW4wx6aoQ2 HM6w== X-Forwarded-Encrypted: i=1; AJvYcCVnC935Htv/4t+2QmO0SNk8ArSMxpiluJluvd6Sr6IXvqcyq9nV/FSgwx4qX7v8gyhFwtoPvMN/xOVQHv5hxtM=@lists.infradead.org, AJvYcCWEDmq0G5LP5btQ+Ep49oxPNCJkLoy1uYbbk9KqNG+syZKPIxYQFFJYXJ2NADQT6caFVxkn0C9qHeOnUA5+YsSq@lists.infradead.org X-Gm-Message-State: AOJu0Yxz26SSJzxJwFCYASlP+Jcq6/PkH8OU2FG2IKGtDkuPc2xZNRBQ jrMsZyWXGtCCoEg+TcpcYAiTUTlCPRzQAu/Vcw1wI08QzxxXnnu1 X-Google-Smtp-Source: AGHT+IE6+7F4IwUjoUpungdPIgK7N7zKDEIZ0Pa/PFwI4Lam2pC3QvZ+yFwkBy87CRSIvERTOe7b3Q== X-Received: by 2002:a05:6e02:1d04:b0:39d:286c:5b72 with SMTP id e9e14a558f8ab-39f378acb8emr64753255ab.28.1725031314408; Fri, 30 Aug 2024 08:21:54 -0700 (PDT) Received: from localhost.localdomain (174-20-195-90.mpls.qwest.net. [174.20.195.90]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-39f3af97203sm8826155ab.1.2024.08.30.08.21.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 08:21:53 -0700 (PDT) From: Shimrra Shai To: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, hjc@rock-chips.com, heiko@sntech.de, andy.yan@rock-chips.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, markyao0591@gmail.com, s.hauer@pengutronix.de Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, aarnoud@me.com, ldearquer@gmail.com, algea.cao@rock-chips.com, cristian.ciocaltea@collabora.com, Shimrra Shai Subject: [PATCH v5? 0/6] Tweaked basic Synopsys DW HDMI QP TX driver for Rockchip RK3588 Date: Fri, 30 Aug 2024 10:21:24 -0500 Message-ID: <20240830152132.8894-1-shimrrashai@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240830_082156_710158_25F54EE1 X-CRM114-Status: GOOD ( 18.19 ) 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 Hi, I saw Cristian Ciocaltea's proposed basic driver for the Synopsys DW HDMI QP transmit (TX) facility on the Rockchip RK3588 and noticed that it had seen some critique and thought I'd help it along a little by making some of the changes that others had suggested in the discussion thread. This package is mostly like his(?) original but features the following changes suggested by Conor Dooley and Heiko Stuebner: * Documentation for the device tree bindings specifies the various clocks explicitly in both the general (synopsys,dw-hdmi-qp.yaml) and Rockchip-specific (rockchip,rk3588-dw-hdmi-qp.yaml) files. * Changed the compatibles for the RK3588 VO0 and VO1 GRFs in the Device Trees (rk3588-base.dtsi) to reflect their different natures. and some of my own changes: * Tweaked the driver code slightly - mostly organizational, but also added a mutex around device access in the dw_hdmi_qp_... method that was present in the downstream BSP driver which might have been necessary to prevent thread bugs. * Improved grammar & punctuation in some of the English on the Kconfigs and output messages. Let me know how you like it. I hope this is suitable enough for kernel integration as I'd really like to be able to get some of the newest kernels having video bringup out of the box. I'm testing and developing on the Firefly ITX-3588J board; not sure if this will also work on the Rock 5B too, as I don't have one, but since little was done to the original driver I don't think it should break anything. Moreover, I wanna get the device tree bindings nailed on this point because I'd like to prepare a UEFI firmware package for this board that would be capable of booting mainline kernels from this (or a soon-to-be) version onward, without needing a separate device tree file with the kernel, like a "proper" PC. That naturally implies having at least all basic desktop functionality down, including video output, before the DT is "baked" into the firmware. - Shimrra Shai Signed-off-by: Shimrra Shai --- Link to Cristian's original w/previous versions' history: https://lore.kernel.org/linux-rockchip/20240819-b4-rk3588-bridge-upstream-v4-0-6417c72a2749@collabora.com/ Total changes: Documentation/devicetree/bindings/display/bridge/synopsys,dw-hdmi-qp.yaml | 89 +++++++++++ Documentation/devicetree/bindings/display/rockchip/rockchip,rk3588-dw-hdmi-qp.yaml | 171 ++++++++++++++++++++ Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 6 +- arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 44 ++++- drivers/gpu/drm/bridge/synopsys/Kconfig | 8 + drivers/gpu/drm/bridge/synopsys/Makefile | 1 + drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 780 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.h | 834 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/rockchip/Kconfig | 9 ++ drivers/gpu/drm/rockchip/Makefile | 1 + drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 431 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 + drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 1 + include/drm/bridge/dw_hdmi_qp.h | 36 +++++ 14 files changed, 2409 insertions(+), 4 deletions(-)