Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4894819rwd; Tue, 30 May 2023 11:25:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6S3ek5/l42eY0OzPc3+p8NpQLOenoKDaa8e26I/ELOwBol1fNgTQra7onprgUEGhhur3Cw X-Received: by 2002:a05:6a20:6f03:b0:103:d538:5ea6 with SMTP id gt3-20020a056a206f0300b00103d5385ea6mr3247655pzb.48.1685471120907; Tue, 30 May 2023 11:25:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685471120; cv=none; d=google.com; s=arc-20160816; b=JFd7x3L43Gj2h1dj4dt2kzH9f1tTtSjgBZdzS8bRK3iSBIF2mj7Kt3gdqC2M00yv6p r+bli1lmCjEZMCTrm+ux0PcbRanwSp/6ZwQU9hI/mBr14nlfLqZyfTqIcZEdZCnekhM2 dlZsIXVNvwGENa0feD/+ZkIfxh/L1/9cNrL46A7nfrtK8yQTNEE4CrQ5qNC5CRiqlo3i pdOHH+51p2wJ8RH1E4mf+GjRjd6UAjJzVpD/o5e5fz4f2/IFcuiAem4vXLPmofW5OIxi REFKszxoOnGZs1S0sY8eUZTXRQNEWDSG1Uk7JGrZzq+sgovyvNwKFdDy0HYriV6iBieD m6qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=xNGPCvBBfv+kxEWE2MFvpaVRjzv8nsNyp8HI/sVsLx0=; b=dFAP6u/43p426ghPdhMxJmhbjzHmA9fwdFxUQUwzlEebVlYFjSTRtIlhlWnh9kPj+M xjUSUvwImUBrNhnc8LzRYv/NBz6UDBNbKOX27TwW7yykeD2Cj4EwNRuXUlHPZ6eLHd3L rLyZAmf+ljLuR145LxcAjLZ2wZnjAFkiOE8l8/14uIGo3xvCjQdxZ1XwT7kb5Rfr/WLU wMvq4MshXD5bA0c85JoXVNeLynuLikQoCrDHiZQ6fYtSWIj6+fBeikRyaSRdEnM90qSP C8/Xu7HuSph07XOjcgtTj/IAgpNVwlxtN2YIUO/ixjXpztqe79HRgv/bhB9hnC71Aegz 8zbg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w71-20020a63824a000000b0053fcc7aaa03si315599pgd.805.2023.05.30.11.25.07; Tue, 30 May 2023 11:25:20 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233306AbjE3STe (ORCPT + 99 others); Tue, 30 May 2023 14:19:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233274AbjE3STa (ORCPT ); Tue, 30 May 2023 14:19:30 -0400 Received: from relay08.th.seeweb.it (relay08.th.seeweb.it [IPv6:2001:4b7a:2000:18::169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8B40F9 for ; Tue, 30 May 2023 11:19:23 -0700 (PDT) Received: from SoMainline.org (94-211-6-86.cable.dynamic.v4.ziggo.nl [94.211.6.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 7F1FB3EF11; Tue, 30 May 2023 20:19:21 +0200 (CEST) Date: Tue, 30 May 2023 20:19:20 +0200 From: Marijn Suijten To: Dmitry Baryshkov Cc: neil.armstrong@linaro.org, Sam Ravnborg , David Airlie , Daniel Vetter , Caleb Connolly , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson , ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Abhinav Kumar , Kuogee Hsieh , Jessica Zhang Subject: Re: [PATCH RFC 03/10] drm/panel: Add LGD panel driver for Sony Xperia XZ3 Message-ID: References: <20230521-drm-panels-sony-v1-3-541c341d6bee@somainline.org> <71675a02-0801-62dc-2673-4a0907636b21@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 2023-05-30 14:11:06, Dmitry Baryshkov wrote: > On Tue, 30 May 2023 at 11:27, Marijn Suijten > wrote: > > > > On 2023-05-30 01:39:10, Dmitry Baryshkov wrote: > > > On 30/05/2023 01:37, Marijn Suijten wrote: > > > > On 2023-05-30 01:18:40, Dmitry Baryshkov wrote: > > > > > > > >>>>>>> + ret = mipi_dsi_dcs_set_display_on(dsi); > > > >>>>>>> + if (ret < 0) { > > > >>>>>>> + dev_err(dev, "Failed to turn display on: %d\n", ret); > > > >>>>>>> + return ret; > > > >>>>>>> + } > > > >>>>>> > > > >>>>>> My usual question: should the mipi_dsi_dcs_exit_sleep_mode() / mipi_dsi_dcs_set_display_on() be moved from prepare() to enable() part? > > > >>>>> > > > >>>>> > > > >>>>> No, prepare is called before the video stream is started and when display is still in LPM mode and the mode hasn't been set. > > > >>>>> > > > >>>> > > > >>>> Yes, that's my point. Shouldn't we enable the panel _after_ starting the stream? > > > >>> > > > >>> I have never investigated what it takes to split these functions, but > > > >>> some of these panels do show some corruption at startup which may be > > > >>> circumvented by powering the panel on after starting the video stream? > > > >>> > > > >>> I'm just not sure where to make the split: downstream does describe a > > > >>> qcom,mdss-dsi-on-command and qcom,mdss-dsi-post-panel-on-command, where > > > >>> the latter only contains set_display_on() (not exit_sleep_mode()). > > > >>> It is documented like: > > > >>> > > > >>> same as "qcom,mdss-dsi-on-command" except commands are sent after > > > >>> displaying an image." > > > >>> > > > >>> So this seems like the right way to split them up, I'll test this out on > > > >>> all submitted panel drivers. > > > >> > > > >> Interesting enough, Neil suggested that sending all the commands during > > > >> pre_enable() is the correct sequence (especially for VIDEO mode panels), > > > >> since not all DSI hosts can send commands after switching to the VIDEO mode. > > > > > > > > Note that all these panels and Driver-ICs are command-mode, and/or > > > > programmed to run in command-mode, so there shouldn't be any notion of a > > > > VIDEO stream (any command-mode frame is just an "arbitrary command" as > > > > far as I understood). > > > > > > Yes, from the data stream point of view. I was talking about the DSI > > > host being able to send arbitrary commands or not after enabling the > > > video/cmd stream. > > > > Is this a known limitation of SM8250 then? Or is the brightness_set > > issue more likely a "problem" with the panel that the downstream kernel > > is "somehow" working around or aware of, and I just haven't found > > how/where it deals with that? > > (Alternatively we could be "doing it wrong" for other panels but it > > turns out to be working anyway) > > Please excuse me for not being explicit enough. Qualcomm hardware > doesn't have this problem. Thus I was completely unaware of it before > talking to Neil. > So, our hardware works in most of the cases. Also excuse me for mocking the hardware here; it seems quite illogical for it to not work on this specific device which is more likely a failure in porting the panel DT to the driver than related to this specific SoC. There's probably one of the hundred-or-so DT params responsible for triggering a setting, delay, or other magic sequence that gets the brightness toggle working. - Marijn