From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 043BA200CD for ; Wed, 5 Jun 2024 09:28:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717579726; cv=none; b=hd+eCXbpK9ZaBc2IPY4XRsprAVkPb/imK2kSNiakWro2gYD5Fmy36zJBEuS9Fli5TrZZoYkVKhuNXJLueCXxFcuPUhTsoxD37bOTmMhBgofmJLWiDR85zZGadyBpgySklHuZ0ixeCqzaUFF/mu8CzILM7cp57Ysy/6xE1alChUk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717579726; c=relaxed/simple; bh=EJXpSOgGuoa4/HZZtSlGPirWM12RV8lC1Y/RC/F9HFA=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=QuNwX5nCYepwCvE5xd7kwzslUBBfGpe5yEEXCe1iGfco/cudCpPqH/iRvVVRtP0rlimEFozAwjlVm0KrjFZdAN3g0JljhyiKQwIltZQgv4OoOwhcgpKiEn4MvtuR+A/CPtwnOPXI+MxUvMsONaIB6sIx8vNJhpTtNHmCkTGV9Cc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=m9IE8tc/; arc=none smtp.client-ip=209.85.221.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="m9IE8tc/" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-35e0eb3efd0so1770020f8f.0 for ; Wed, 05 Jun 2024 02:28:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717579723; x=1718184523; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=9aZp3wyE5ekzsTIWHpWbrt8XuH/G5p0iFSTouqyj9Bg=; b=m9IE8tc/NFb2SKk7qGjGfeM1h8dMjii4qwJD6iqfFI8kPwz4Tt1y+D3vt+UdRfZOJ4 KNfXylTfayfO6nQ3jRBcQy9nqsAfxymAQii7nzQbh/AYlH2cI5XWojU1sG2Ibe62iznR l9fcWs0QmdGYFndXt7zBgT+4zSb7RuR1ElYFVmNZ6mOzTnnuA0FcYqfcbZqd5mLyMBMg hWCVnKNoUPWnD2njoR7ldWGPrn/UxM+6Avh/FRy8bdn0VIoaM4WF8gijF6cEgYqecEVl AF60XLDOeppD+LcjxYY1uRipnljV1c4avCl+8jjB42PrvH+60IPRk/f3pwllJuhTxPhS aT4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717579723; x=1718184523; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=9aZp3wyE5ekzsTIWHpWbrt8XuH/G5p0iFSTouqyj9Bg=; b=KnuTwhCVEkEHjdZqSAfK9VQhFqffH2nbMb6zHlJKt6hYMhmSO9ViJ8Qe2oavSm90+h MU5c8KfEELrA7lMNU483VLnXsvuNrqsAwfEagxmpjiJrAQSp0ixyVEXvp4ZPL/NCaSlz 80Y4AZippYrTekxbiJ2qLheljYK7f+zEzM1lRjZ52D8C5VSiK67czE48PxOUjWtWCTrv thCbRAf/SaSUH8ZV01WzIwGwHDaDW1AkEHp0O69DnvsVr2s2Oi1YJeLnc1L+5ztshlHs GTFventDnrmIJvOjfDjJrigogGAVT//dpjE4kbs7krQM2DUFZrXFzRWrRcmk6+4G6ZAJ TNlA== X-Forwarded-Encrypted: i=1; AJvYcCUQBulKbAyVOShKMwCgQIaYG0HoYy3z54vlgF3PDTk/PvWJRZta9lE5n34AahKVQd87qnx9KnHssbCtM6ZOlz8A9L/l/woeIzWonw== X-Gm-Message-State: AOJu0YyvLkmzOFHhU+/87aHrR7RPtYx3JsD7N+i77IpPSczCjVGBgJ9S ctIpGUL7pebHK22/YbQNih5+vV7K6BKSSM2myNqyzc7Bw45QOuIMZDtXsgr1Jy0= X-Google-Smtp-Source: AGHT+IG4DNIDSVe9T92rRq3LMxr5LieWsgduZLuBSwgYLoAnxR2RRrOizcT2CkEWD5xDDP8HNuZKsg== X-Received: by 2002:a5d:4645:0:b0:35d:ca3b:4d11 with SMTP id ffacd0b85a97d-35e8ef97043mr1413209f8f.61.1717579723202; Wed, 05 Jun 2024 02:28:43 -0700 (PDT) Received: from ?IPV6:2a01:e0a:982:cbb0:c7ce:7756:462d:a8bd? ([2a01:e0a:982:cbb0:c7ce:7756:462d:a8bd]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd064aa6csm13842822f8f.93.2024.06.05.02.28.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Jun 2024 02:28:42 -0700 (PDT) Message-ID: <01bde68a-88a7-46eb-860c-1375aa730bec@linaro.org> Date: Wed, 5 Jun 2024 11:28:41 +0200 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: neil.armstrong@linaro.org Reply-To: neil.armstrong@linaro.org Subject: Re: [PATCH 00/14] Add initial support for the Rockchip RK3588 HDMI TX Controller To: Andy Yan , Cristian Ciocaltea Cc: Heiko Stuebner , Andrzej Hajda , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Sandy Huang , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mark Yao , Andy Yan , 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, kernel@collabora.com, Alexandre ARNOUD , Luis de Arquer , Algea Cao References: <20240601-b4-rk3588-bridge-upstream-v1-0-f6203753232b@collabora.com> <11359776.NyiUUSuA9g@phil> <4456bc5a.9b2d.18fe7b76790.Coremail.andyshrk@163.com> Content-Language: en-US, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAHNKk5laWwgQXJtc3Ryb25nIDxuZWlsLmFybXN0cm9uZ0BsaW5hcm8ub3JnPsLAkQQTAQoA OwIbIwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgBYhBInsPQWERiF0UPIoSBaat7Gkz/iuBQJk Q5wSAhkBAAoJEBaat7Gkz/iuyhMIANiD94qDtUTJRfEW6GwXmtKWwl/mvqQtaTtZID2dos04 YqBbshiJbejgVJj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yshrk@163.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi, On 05/06/2024 11:25, Andy Yan wrote: > > Hi, > > At 2024-06-05 04:33:57, "Cristian Ciocaltea" wrote: >> On 6/3/24 4:08 PM, neil.armstrong@linaro.org wrote: >>> Hi, >>> >>> On 03/06/2024 15:03, Heiko Stuebner wrote: >>>> Am Montag, 3. Juni 2024, 14:14:17 CEST schrieb Andy Yan: >>>>> Hi Neil: >>>>> >>>>> On 6/3/24 16:55, Neil Armstrong wrote: >>>>>> Hi Christian, >>>>>> >>>>>> On 01/06/2024 15:12, Cristian Ciocaltea wrote: >>>>>>> The RK3588 SoC family integrates a Quad-Pixel (QP) variant of the >>>>>>> Synopsys DesignWare HDMI TX controller used in the previous SoCs. >>>>>>> >>>>>>> It is HDMI 2.1 compliant and supports the following features, among >>>>>>> others: >>>>>>> >>>>>> . >>>>>> >>>>>> .. >>>>>> >>>>>>> * SCDC I2C DDC access >>>>>>> * TMDS Scrambler enabling 2160p@60Hz with RGB/YCbCr4:4:4 >>>>>>> * YCbCr4:2:0 enabling 2160p@60Hz at lower HDMI link speeds >>>>>>> * Multi-stream audio >>>>>>> * Enhanced Audio Return Channel (EARC) >>>>>> -> Those features were already supported by the HDMI 2.0a compliant >>>>>> HW, just >>>>>> list the _new_ features for HDMI 2.1 >>>>>> >>>>>> I did a quick review of your patchset and I don't understand why you >>>>>> need >>>>>> to add a separate dw-hdmi-qp.c since you only need simple variants >>>>>> of the I2C >>>>>> bus, infoframe and bridge setup. >>>>>> >>>>>> Can you elaborate further ? isn't this Quad-Pixel (QP) TX controller >>>>>> version >>>>>> detectable at runtime ? >>>>>> >>>>>> I would prefer to keep a single dw-hdmi driver if possible. >>>>> >>>>> >>>>> >>>>> The QP HDMI controller is a completely different variant with totally >>>>> different >>>>> registers layout, see PATCH 13/14. >>>>> I think make it a separate driver will be easier for development and >>>>> maintenance. >>>> >>>> I'm with Andy here. Trying to navigate a driver for two IP blocks really >>>> sounds taxing especially when both are so different. >> >> Thank you all for the valuable feedback! >> >>> I agree, I just wanted more details than "variant of the >>> Synopsys DesignWare HDMI TX controller", if the register mapping is 100% >>> different, and does not match at all with the old IP, then it's indeed time >>> to make a brand new driver, but instead of doing a mix up, it's time to >>> extract >>> the dw-hdmi code that could be common helpers into a dw-hdmi-common module >>> and use them. >> >> Sounds good, will handle this in v2. >> >>> As I see, no "driver" code can be shared, only DRM plumbings, so perhaps >>> those >>> plumbing code should go into the DRM core ? >>> >>> In any case, please add more details on the cover letter, including the >>> detailed >>> HW differrence and the design you chose so support this new IP. >> >> Andy, could you please help with a summary of the HW changes? >> The information I could provide is rather limited, since I don't have >> access to any DW IP datasheets and I'm also not familiar enough with the >> old variant. >> > Accurately, we should refer to it as an entirely new IP,it has nothing in common with > the current mainline dw-hdmi。 The only commonality is that they both come from > Synopsys DesignWare: > (1)It has a 100% different register mapping > (2)It supports FRL and DSC > (3)different configuration flow in many places。 > > So I have the same feeling with Heiko and Maxime: > The DW_HDMI_QP should have a separate driver and with it's own CONFIG such as DRM_DW_HDMI_QP in Kconfig. > and the rockchip part should also be split from dw_hdmi-rockchip.c. > I am sorry we mixed them in dw_hdmi-rockchip.c when we develop the bsp driver,but we really regretted this decision > when we repeatedly broke compatibility with dw-hdmi on other socs。 Yes please, and as I say, if there's code common with the old dw-hdmi, please add a common module if this code can't be moved in core bridge helpers. Neil > > > >>> Neil >>> >>>> >>>> Synopsis also created a new dsi controller for the DSI2 standard, with >>>> a vastly different registers layout. >>>> >>>> I guess at some point there is time to say this really is a new IP ;-) . >>>> >>>> >>>> Though while on that thought, I don't fully understand why both a >>>> compiled >>>> under the dw_hdmi kconfig symbol. People going for a minimal kernel might >>>> want one or the other, but not both for their specific board. >> >> Indeed, it makes sense to have a dedicated Kconfig option. This is >> mostly a leftover from downstream implementation, will fix in v2. >> >> Thanks again, >> Cristian >> >> _______________________________________________ >> linux-arm-kernel mailing list >> linux-arm-kernel@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel