Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp3967170pxb; Mon, 27 Sep 2021 06:41:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVuRMNmLTvfB2A3XUA+ug+A904lUu0B9N3guBNf49hlXo0U7zjomaYXpQh3y17m1g/U9r2 X-Received: by 2002:a63:1262:: with SMTP id 34mr16665083pgs.356.1632750107205; Mon, 27 Sep 2021 06:41:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632750107; cv=none; d=google.com; s=arc-20160816; b=jT70nN+WWqEWbzBm912SVBTssFnmuhWWvW5mSMvrMF2Agv0g26tFknDTx9qbCw3dV9 xQK39vFaqrECy6K7NXM7uoHBiODoXBfKxTqgxFgPnOsubM/Bji0j0S2RSawzsjqWpHoT CedhuEMuphziISVUQzRAsWUbrXjln22WrhXsIPAKcfiNZetZHNYsKMn+6dQ/0pic7kga h0nqMKcCcASH/J/xt2kMMTweyGB3xOl39XKP2PIZ1QbsQ8/jyrNB3Q1Mz6UGhSIf1fG5 5dd7v7JaRNcWZsG/BI4BOqYq7s0OYhKaaF579YUwW3MqiBu6+ZmkXZC4PbnelWpN138F 5i8A== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=F9n4Dfre+IMODYFiD85zi0m+VSCOUcN0EdBzK0rIZqA=; b=ZR6jNUrcVg90UswFljmUGrn9tC4EIhxsEhxFaL1IzA5jjZepXBxuJBrVzPqGlltpO2 sQUosRBEJ7HgnngwYOYYv477ZtEo2HS99rX7K9OPx9defHmdDI2i2kwUmECI9rFvqS7H ztcPNVv8CfESezJxU1OaOiqVtK42x5f0FCMODBF2D+WkPkefhTC3LUG5JeXJ86DBsLbn 4+Y4jn7h8Z6bpT6QX+21SPyf3Wy/k91qtZbT+yE/mXVtagToGjI8cmZGbE4bcLM/3E5x l718I0dDL0PjrK8DRaK6nk9LE5nnOIMAWrIxVv4YThb5+4rOULbkG7AMlz0+ZjePRTgv xyYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si20851223pjg.111.2021.09.27.06.41.32; Mon, 27 Sep 2021 06:41:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234614AbhI0NmN (ORCPT + 99 others); Mon, 27 Sep 2021 09:42:13 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:53160 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234403AbhI0NmM (ORCPT ); Mon, 27 Sep 2021 09:42:12 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nfraprado) with ESMTPSA id AE8C11F42BCD Date: Mon, 27 Sep 2021 10:40:26 -0300 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: Brian Norris Cc: Heiko =?utf-8?Q?St=C3=BCbner?= , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Sandy Huang , linux-rockchip@lists.infradead.org, Thomas Hebb , aleksandr.o.makarov@gmail.com, stable@vger.kernel.org Subject: Re: [PATCH 1/2] drm/rockchip: dsi: hold pm-runtime across bind/unbind Message-ID: <20210927134026.kijmgp3fuopt6ajh@notapiano> References: <20210924162321.1.Ic2904d37f30013a7f3d8476203ad3733c186827e@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210924162321.1.Ic2904d37f30013a7f3d8476203ad3733c186827e@changeid> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 24, 2021 at 04:23:45PM -0700, Brian Norris wrote: > In commit 59eb7193bef2, we moved most HW configuration to bind(), but we > didn't move the runtime PM management. Therefore, depending on initial > boot state, runtime-PM workqueue delays, and other timing factors, we > may disable our power domain in between the hardware configuration > (bind()) and when we enable the display. This can cause us to lose > hardware state and fail to configure our display. For example: > > dw-mipi-dsi-rockchip ff968000.mipi: failed to write command FIFO > panel-innolux-p079zca ff960000.mipi.0: failed to write command 0 > > or: > > dw-mipi-dsi-rockchip ff968000.mipi: failed to write command FIFO > panel-kingdisplay-kd097d04 ff960000.mipi.0: failed write init cmds: -110 > > We should match the runtime PM to the lifetime of the bind()/unbind() > cycle. > > Tested on Acer Chrometab 10 (RK3399 Gru-Scarlet), with panel drivers > built either as modules or built-in. > > Side notes: it seems one is more likely to see this problem when the > panel driver is built into the kernel. I've also seen this problem > bisect down to commits that simply changed Kconfig dependencies, because > it changed the order in which driver init functions were compiled into > the kernel, and therefore the ordering and timing of built-in device > probe. > > Fixes: 59eb7193bef2 ("drm/rockchip: dsi: move all lane config except LCDC mux to bind()") > Link: https://lore.kernel.org/linux-rockchip/9aedfb528600ecf871885f7293ca4207c84d16c1.camel@gmail.com/ > Reported-by: > Cc: > Signed-off-by: Brian Norris > --- This fixes the display enablement issue in Acer Chrometab 10 (RK3399 Gru-Scarlet) indeed. Tested-by: N?colas F. R. A. Prado Thanks, N?colas