Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1047473rwo; Wed, 2 Aug 2023 08:02:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlEqF7qgGBf3SEoBqqQiQV/fn9wUEYOeYn1OZG/EUIsJpvA1TYbd8ULQNCFr4sqNK3H4eF+p X-Received: by 2002:aa7:c68f:0:b0:51e:1093:3a9f with SMTP id n15-20020aa7c68f000000b0051e10933a9fmr5092722edq.11.1690988538219; Wed, 02 Aug 2023 08:02:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690988538; cv=none; d=google.com; s=arc-20160816; b=o2dvXfMIU1BZQEm3LF2NLdaTLGoJxwX1wiL9206X+1JtD9ErKFeKZ+BGN4oPu7vCvI 4+Fw3c+q560X7vg17xy0O6laoYKEv6LDninnmyI73bkbkS95F+IxN9mtl0CEYO6R5+hk 1s72MEYDUgtoRJOSOuzQwTzFmvQj+iRb8dSMPXc3fZmk8ZwfLAC/pbglUSKH5Drphe3X imtUuXSPc351AK6wc0WzRoItkbktVGNULKb/ZcNpI6/pi/N7JrLjlx2BVhNX8KUfBfqm NECDWbCgI5f9b87UJ3g7UMdYq7FPOEoZEVXlgMgtWi9KjT7kB3JlWmoDsjEPFq0CwzkV H1Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=QuYbDs0o/lKReDAlVsA0tmrajcMvPefdsHw2ReF2TME=; fh=TsTnJzIWCCdCxYXnaQ8aRIme4Gl39LrquzJPCsFLGr0=; b=pJI3Mws3GRAnTvLSma77n8gidpx58bXDQL4bCOsXvbW7nj5Ml2AeZ2zYo/gszlJbEW g/hKg6DnCQG2Y/u+uXsf/QSCqjdYwpvIBrsv6SNBVGEmYcVW6IhqNr3JQbwETDE4PetQ /eBUKLqcHPjkUpRR8APEcOYnKNF9wlRyMAgbovlt499Olwx4pNHtXNyeZmoBavmJIo82 tjEE96EpG1hmj6r4kwTP4Q4WDylzTJ/ti79Nx9Y46b1odHkHzKP6JWzhV58ptF/Hom+E s/+p+yP9kOduCz9jb1dSAoUaj0nkNw9oQzejJKgHEI4jGvPSPO1q1bMPSqNiXnc2xJGv A9ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Qp/4qWRH"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ba8-20020a0564021ac800b005222991a3d4si7307333edb.453.2023.08.02.08.01.53; Wed, 02 Aug 2023 08:02:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Qp/4qWRH"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233817AbjHBNQO (ORCPT + 99 others); Wed, 2 Aug 2023 09:16:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232130AbjHBNQM (ORCPT ); Wed, 2 Aug 2023 09:16:12 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EDF41707 for ; Wed, 2 Aug 2023 06:16:11 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2b9e6cc93c6so55954181fa.2 for ; Wed, 02 Aug 2023 06:16:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690982169; x=1691586969; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=QuYbDs0o/lKReDAlVsA0tmrajcMvPefdsHw2ReF2TME=; b=Qp/4qWRHDJbL+JzF6LcscHIRKDocxkRUkWLRJc6by/yns1P0xKX7TS9k9iCa3dbcb5 uTZkKyXKBZrlpK99odYF7sYYF3w9prf+ssgAtfzhZnFCbNmt40P2xeRQhbr+jsQXmRiq N836nKx/P4KwxIQDDCCHkazOyc5lfJcP5OeKUcknBIii+e9u0URXf3+qZOeGQOvbhPwZ 4q9DpjxVJdHMeRnqftvmBqdV5lVA4aCQog/5o5wDv+I1svZO6uxhu4AfCMKomQI2yOuv zc8JBhhFAyT/TQ3I+5THmVFoyMMd304o+KhVJts6Ww1hKT+SjaY8VwsEhNz7XhFKWubO +8gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690982169; x=1691586969; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QuYbDs0o/lKReDAlVsA0tmrajcMvPefdsHw2ReF2TME=; b=DdQ2YJ1cYA5k72iXUo67kKfoKYKNCwAxIlJAjgEi+v8pvJXdV6M15oUaAHBnPjOHkY Xyd3PJz8R3s3BivhlWGujjqmBao/oswdIIkcSHgKF3AD6GFNdVyP7izF8PX/Y2g+DH6h Je/aEIARmVh6SZ8LJBW8wNXlT2xGtHLT3xSOK91SHUR6ZcRb8mulEyoTXJpJ2LC5GQyq XhQj5Bap2cNapvt7ZWdIF7TUK1IzQl73O77lRy1gLStUUno6VI3zn1Lz/G/X2FH6HKNH 32vrf6qkDc2CpEX0N2mMmSHd+qSWlyWb4Uk84h9+/A1JnDNubvhUTa2uGT0ZSPiuH7El a04w== X-Gm-Message-State: ABy/qLbcuZd38Rp/1zkVRE7pblV+S6vFxl71C5EMOTJenbzfyk7dBj2R pm5kS0X1GQDU3BjH9Fck3wwJHQ== X-Received: by 2002:a05:651c:14b:b0:2b3:4ea3:d020 with SMTP id c11-20020a05651c014b00b002b34ea3d020mr5205327ljd.17.1690982169195; Wed, 02 Aug 2023 06:16:09 -0700 (PDT) Received: from ?IPV6:2001:14ba:a0db:1f00::8a5? (dzdqv0yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::8a5]) by smtp.gmail.com with ESMTPSA id s19-20020a2e9c13000000b002b96a8e1ebfsm3594890lji.87.2023.08.02.06.16.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Aug 2023 06:16:08 -0700 (PDT) Message-ID: <6f96cd11-5055-ab36-74e3-20a45c0d8b40@linaro.org> Date: Wed, 2 Aug 2023 16:16:08 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] Revert "drm/bridge: lt9611: Do not generate HFP/HBP/HSA and EOT packet" Content-Language: en-GB To: Marek Vasut , Neil Armstrong , Andrzej Hajda , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jagan Teki , Abhinav Kumar , Amit Pundir References: <20230802-revert-do-not-generate-hfp-hbp-hsa-eot-packet-v1-1-f8a20084e15a@linaro.org> <6cd079a4-2f5b-0169-cbaf-b59a72f1b32b@denx.de> From: Dmitry Baryshkov In-Reply-To: <6cd079a4-2f5b-0169-cbaf-b59a72f1b32b@denx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/08/2023 15:07, Marek Vasut wrote: > On 8/2/23 10:52, Neil Armstrong wrote: >> This reverts commit [1] to fix display regression on the Dragonboard 845c >> (SDM845) devboard. >> >> There's a mismatch on the real action of the following flags: >> - MIPI_DSI_MODE_VIDEO_NO_HSA >> - MIPI_DSI_MODE_VIDEO_NO_HFP >> - MIPI_DSI_MODE_VIDEO_NO_HBP >> which leads to a non-working display on qcom platforms. >> >> [1] 8ddce13ae696 ("drm/bridge: lt9611: Do not generate HFP/HBP/HSA and >> EOT packet") >> >> Cc: Marek Vasut >> Cc: Robert Foss >> Cc: Jagan Teki >> Cc: Dmitry Baryshkov >> Cc: Abhinav Kumar >> Fixes: 8ddce13ae69 ("drm/bridge: lt9611: Do not generate HFP/HBP/HSA >> and EOT packet") >> Reported-by: Amit Pundir >> Link: >> https://lore.kernel.org/r/CAMi1Hd0TD=2z_=bcDrht3H_wiLvAFcv8Z-U_r_KUOoeMc6UMjw@mail.gmail.com/ >> Signed-off-by: Neil Armstrong > > This breaks LT9611 operation on i.MX8M Mini/Nano/Plus, so, NAK. > > I am currently using this LT9611 with Linux 6.1.y in production and this > is not acceptable. I also believe the correct fix is on the MSM side, > not on the LT9611 driver side, since MSM incorrectly implements these > flags. There is no indication that MSM gets these flags wrong. Let me quote the DSI 1.3 (I think Abhinav already quoted DSI 1.2). Chapter 8.11.1 Transmission Packet Sequences: ======== If a peripheral timing specification for HBP or HFP minimum period is zero, the corresponding Blanking Packet may be omitted. If the HBP or HFP maximum period is zero, the corresponding blanking packet shall be omitted. ======== Next, chapter 8.11.2 Non-Burst Mode with Sync Pulses ====== Normally, periods shown as HSA (Horizontal Sync Active), HBP (Horizontal Back Porch) and HFP (Horizontal Front Porch) are filled by Blanking Packets, with lengths (including packet overhead) calculated to match the period specified by the peripheral’s data sheet. Alternatively, if there is sufficient time to transition from HS to LP mode and back again, a timed interval in LP mode may substitute for a Blanking Packet, thus saving power. During HSA, HBP and HFP periods, the bus should stay in the LP-11 state. ======== So, by the spec, sending the HSA / HBP / HFP as blanking packets should always be accepted (and it is the default mode). Switching to LP-11 should be permitted if there is a sufficient time to switch to LP-11 and back. Not sending the packets is only possible if the peripheral (lt9611) says so. We already know that lt9611 breaks if we try switching to LP-11 during this period. We know that the there is a requirement time for the HSA / HBP / HFP, because the HDMI monitor needs them. Thus, I can only emphasise that the behaviour before the offending patch was correct. Last, but not least, breaking the in-kernel platform for the out-of-tree peripheral doesn't sound correct. I can only propose the following steps: 1. land the revert to unbreak existing users. 2. Marek to propose and land the DT bindings & driver change that will enable the workaround for the particular platform (i.MX8m). -- With best wishes Dmitry