Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp5890282rwb; Tue, 17 Jan 2023 21:05:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXu3bmNKB0APiLJ/kjVFtEXYNpP7+dlEYZOGebtsS004GfjcvZzKUA1+ByxvnHVpHVa/xxMc X-Received: by 2002:a05:6a20:47d6:b0:b6:53cf:8455 with SMTP id ey22-20020a056a2047d600b000b653cf8455mr4656608pzb.56.1674018339603; Tue, 17 Jan 2023 21:05:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674018339; cv=none; d=google.com; s=arc-20160816; b=YWyBKQLaQFoaKxMUhPliV2Z5i2z1OlXC52c4mTy4lYzO7UTeFQCEcHg1ZHI+kHy8zl EKBEIn/WCSx1mub5siFuLa0r9VHmwdOxAEf99jBvXpx/9ZNZToKDLSWW9QMTo3DRrNO4 PrOY3Wk5irkkrMoZSBAp1QnrJDDdGGBmxQ2/WKSRE1BG5jVBWSJtKVcdumaTatMblTlg 54uj9++ULqVwUYoTRqvlTY2uGLjkR+Akq7FazLVXopVEtp1RCB5YXDEUFv+v27WzG/uz 5QqBlzKrk8MnyOzHyZR1AZsMDlFwNNFW+bIlPpWffvXOmN9b1QmWfYhlC0gLSLC5gJrP vZ/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:user-agent:from:references:in-reply-to:mime-version :dkim-signature; bh=mxHmCLyxCtxqovft70l3YWZ7M9nPAwuaYmzKmP5Vdk8=; b=igX3eshbw2tPfz4wyLC4WzY/2DvtUnoD0aCjnlY3rbpzWZ9irydejxjHcCkj414n7V e+3PEqfKTNAv8qOZfLtFiw8UckeTKSFhQgClQFKT6LeoZeLVm50ODGtt6AcZCIk2Jy9b Wz/i6MUXZ4EfcFX/bYP5ldGbXith6tJopLwZkAQEOQlcK8ErZOEcfAYETwj6HWNbRuv/ WuhbJaID590wH1CIbLTRMoRwCF+bpJMNylgYRLt2gBRn+9ZxcMVcTVOSHU7LXWAy2ksN vWD7Atqdug9bTot3f/Qnw/cza/1qbW7hSuzZfbV4wa/V1/0OTb6oeaK/t1z9C3j0+os4 TzuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=QHN9KuLN; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w11-20020a63160b000000b004769410323fsi35472960pgl.820.2023.01.17.21.05.33; Tue, 17 Jan 2023 21:05:39 -0800 (PST) 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=@chromium.org header.s=google header.b=QHN9KuLN; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229524AbjAREuk (ORCPT + 46 others); Tue, 17 Jan 2023 23:50:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjAREug (ORCPT ); Tue, 17 Jan 2023 23:50:36 -0500 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2AC54E536 for ; Tue, 17 Jan 2023 20:50:34 -0800 (PST) Received: by mail-lj1-x236.google.com with SMTP id s25so35397067lji.2 for ; Tue, 17 Jan 2023 20:50:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:cc:to:subject:message-id:date:user-agent :from:references:in-reply-to:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=mxHmCLyxCtxqovft70l3YWZ7M9nPAwuaYmzKmP5Vdk8=; b=QHN9KuLNwUOEpAQz7/9/npcURu9nh3xi4LJG8DdLa3vO3LQMZdIxS+2rNCBviCh3oA bBD7qjE1rLw3m/tVpdzEqpdHYfx9xcVyvpnGDYHzb28AWUwtQHhqtULHg+i86JB0uOmY mCH1MaCVxU+yaR0WqvnG3OE8OYw+4tQjE2DIk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:user-agent :from:references:in-reply-to:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=mxHmCLyxCtxqovft70l3YWZ7M9nPAwuaYmzKmP5Vdk8=; b=ZjEzDWssIHzN/gbgdWVHBfCs9aaZKOXFBhmoTyfMIIImVJaLc0MMRtEVyeYHT8XrN+ ikCd8NoOG5b/K/mJ1quaJ27GhoRbql9V3VnNkYnxoHgpkCuYKmLD6zuITYC9Mv0zjjM1 fURZsZHGg+OLjFLY++sbeKaasSvtTytnKhMln5UcTzF0QYMttC1QsKCLlnAhFj/xIvZK O7c/sMr+Dn/NqQ31Q/cZiUWOjbOwOhrG3BDOUQJML5N5EY8McgR6LCew2+H80Dgcksly XvLD/LruJE5k1SBU3IoslBorZhyZUllhY8K1LGnbuAi/BTTjLtwb2DMVtgZGXO0XcbAF GY3A== X-Gm-Message-State: AFqh2ko0G9GIq6uwDMWCdaQeCuSRKZdy7I1XhW9WzWQx8dmp7aNvaTdf UehRbS+dMqdh+YuPo711Y70dpcysc/O5nooh/b4iTmg3pA8Nqg== X-Received: by 2002:a2e:a49a:0:b0:28b:6abf:29ea with SMTP id h26-20020a2ea49a000000b0028b6abf29eamr496414lji.359.1674017433221; Tue, 17 Jan 2023 20:50:33 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 17 Jan 2023 20:50:32 -0800 MIME-Version: 1.0 In-Reply-To: References: <20230106030108.2542081-1-swboyd@chromium.org> From: Stephen Boyd User-Agent: alot/0.10 Date: Tue, 17 Jan 2023 20:50:32 -0800 Message-ID: Subject: Re: [PATCH] drm/panel: boe-tv101wum-nl6: Ensure DSI writes succeed during disable To: Dave Stevenson Cc: Thierry Reding , Rob Clark , Douglas Anderson , Jitao Shi , yangcong , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, patches@lists.linux.dev, linux-mediatek@lists.infradead.org, Dmitry Baryshkov , Sam Ravnborg , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Quoting Dave Stevenson (2023-01-16 06:11:02) > Hi Stephen > > On Fri, 13 Jan 2023 at 21:12, Stephen Boyd wrote: > > > > > > Thanks for the info! It says "Drivers that need the underlying device t= o > > be powered to perform these operations will first need to make sure it= =E2=80=99s > > been properly enabled." Does that mean the panel driver needs to make > > sure the underlying dsi host device is powered? The sentence is too > > ambiguous for me to understand what 'drivers' and 'underlying device' > > are. > > The DSI host driver (ie in your case something under > drivers/gpu/drm/msm/dsi) should ensure that a transfer can be made, > regardless of state. > > I must say that this has been documented as the case, but doesn't > necessarily reflect reality in a number of drivers. Alright, thanks for the clarification. > > > > Cool. Glad that we can clean that up with your series. > > > > Is it wrong to split unprepare to a disable and unprepare phase? I'm no= t > > super keen on fixing 6.1 stable kernels by opting this driver into the > > ordering change. Splitting the phase into two is small and simple and > > works. I suspect changing the ordering may uncover more bugs, or be a > > larger task. I'd be glad to test that series[2] from you to get rid of > > [3]. > > Ah, I hadn't realised it was a regression in a released kernel :( > > Splitting into a disable and unprepare is totally fine. Normally > disable would normally disable the panel and backlight (probably by > drm_panel before the panel disable call), with unprepare disabling > power and clocks > > Do note that AIUI you will be telling the panel to enter sleep mode > whilst video is still being transmitted. That should be safe as the > panel has to still be partially active to handle an exit sleep mode > command, but actually powering hardware down at that point could cause > DSI bus arbitration errors as clock or data lanes could be pulled down > when the host is trying to adopt HS or LP11. > Ok. I don't think I'm running into that issue, but I have run into a different issue. I tried to split the prepare phase into enable and prepare with the DSI writes in the enable to make things symmetric but that totally failed. Now I get lots of timeouts when enabling the panel. This patch is still the best fix I have. Maybe with your series we can combine the unprepare and disable ops together again (i.e. revert this) so that power is removed immediately after sending the DSI commands? Or is that not enough to avoid the DSI bus arbitration problems you're talking about? When is the host adopting HS or LP11 with regards to the bridge ops?