From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 65B253A0B36 for ; Thu, 28 May 2026 17:43:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779990199; cv=none; b=W8gcFKalXrncvX2tA1mTU0QpDqLr9YERAsP+OO8vl0x1pmcQRBI6u0czKvbDT5oEc/nY6MNa8JJUMRHd3uwrhm2Zkv648bLV3KY58NLxq1oyWKJ9uqaCtY9+6DDkoU83Pi+09SBJ5ocBeOdSu5oTDYR1PVtwB2MWhUvw6ghARqY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779990199; c=relaxed/simple; bh=mjlE79CLvFDXiEdLK0Tcwhi3oihAcvaYAUy1iFvYE0o=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=jqG/BkM4ubvdxdMKUdHnjUnyqtFmOmsV15crdjoFijVvbaY7yNLdAI/C+7adNxTJL2LgCvu0DnvxIArSCvSUJGOR1HD0WViVzz0Vfqzay/N57sVumzCNzjNuzr+lHtgoisu3lnvuKr21qvwYiJlgYAH91fHZBNcUSlMC0z73vUc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=n3Ns3WiV; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="n3Ns3WiV" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4903974854dso64923735e9.3 for ; Thu, 28 May 2026 10:43:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779990195; x=1780594995; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=W3amWZObV5I3DzXB5gq3TI2uVawFzEbcyJa+h0g3Fi8=; b=n3Ns3WiVDr57ZPsB2Pi5BevEVQsJsMeCOXhgAP8G8Lu6hfmbcFBOBW6Mf6xo+f80kD zl/tWFmBRJyzohE+o2m2/WlW4jpEKA38RLGa8tHi4V+SxmpzpqO4FZROqKAxR3UAHlut ESFyb03Q/zzXYMY0+lc6Ix+AKIi7rQTtpTuDr6QXQ+L5kUrGrDJeMd4lUXD1RqZa+JPJ vZSyj0Nlid5ZTHMpfXxMjgIL+Ae4Vb5SsQVa/TixDbaMmYjhVZT7IaaegiWqnB9nXtNK ZLESkvIoVupRGVc9QlDSKAwrQsaE+O5W3/xcJJD2fpDtuIxZoKhq91uFD1EujVVKU106 FyWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779990195; x=1780594995; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=W3amWZObV5I3DzXB5gq3TI2uVawFzEbcyJa+h0g3Fi8=; b=nzPZ4eJNM2Yu5BJ+5TM+UdoesKERmGsdcF0txHfkb7ZESN9nnPLLC6QbIwmw7e1J4G kjfWRVfodP6t37aEM+BMT3IDonVvHdWYLeUtsOuBKyUeE6nvcD7o84BJ6cH7H5KlJu7P A519EdhWdpdR/cf4yQ/JCsv8SoKWd4fQLgC0p5kPxIuhWqAK9ZnFplSOzsQeWXxY9b7z dZyCqsw5hhrDjdxH9gSD05JDGVNOJ0nDUPGw9vcBAP/Jtqd45hmHLEgLEC/xNYtV+Z59 zNaJKdA4ZxUwAJjmYTcSSa5On2LqngdcAJ6w/0HY+1mf39I4dDC6uyh2nK6FdtzzUdyD fZJA== X-Forwarded-Encrypted: i=1; AFNElJ/QDy4+/pmQlwSq29uzvrFka2ImvDSpgFGdWEteL8G1HYkxNqAPQuxLZTyygLC6Qvs+T57eFSaEi3aZQl8=@vger.kernel.org X-Gm-Message-State: AOJu0YybZpQq9u1LCpzoF5Qg2DppdiZFwQiem2c7SqM0t4C++0uOOZNf +8BQ4JHFLp4AyOu70hEa+kxTs8Tm9BRstZ1vyNSmjda4EOLZ7v6IfSeo X-Gm-Gg: Acq92OHAI+4ss/ou6b6YlQ0A08kqqkc/mxNVyY6j63CX7Oe6JkV5hHgRMIiXXlmuIsw ZO7uQCyyDJVpliUx+AwQXr9+QD1rLXzPgX/26mzLeGpxGIedav0aQ4vLGWmbzDRB6R5tnBeb8Mq 6unZ9mmA2JRe7ho7hiIxlN5vve8pLc57Ts9Dhzsfg7u1tdOXhtHQBlaChKKIRiFrFfAj4K4oB+v dtsgHEBv/U5mIBq9nHmPDdrk9djAd0diiwZSFKivA8NQeP2j2Xih2Qc+3I+oIzo+q3nVxg/KNm1 +O6dnXvLTZofjYyDapQDgk99lSiDigb5UXrternkfkkYHug7pHa0P5uEpxi483UkkdK6fqvNzdw x51PqUbUaSXD3c0urK4pb8aeX7pp2WSS3nFnMHN/4J8uBJV8vLXUAUTlhn2LJc7DmYw5DptMK+Z Xad8ZfM8ADM5lECeu30Da3sFnUfRgrjN9rnScOacO51dCv+w== X-Received: by 2002:a05:600c:4591:b0:490:6869:46c6 with SMTP id 5b1f17b1804b1-490686947a8mr269136535e9.31.1779990194506; Thu, 28 May 2026 10:43:14 -0700 (PDT) Received: from [192.168.1.10] ([95.43.220.235]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-4909235d43esm87284155e9.1.2026.05.28.10.43.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 May 2026 10:43:14 -0700 (PDT) Message-ID: <37f64c1c-9920-41a6-a8c0-7a84a30c884a@gmail.com> Date: Thu, 28 May 2026 20:43:12 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] drm/omap: dsi: avoid sending bta sync all the time in writes To: Andreas Kemnade Cc: Tomi Valkeinen , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Sebastian Reichel , Laurent Pinchart , Tony Lindgren , Linux-OMAP , Marek Vasut , "H. Nikolaus Schaller" , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Tomi Valkeinen , Andreas Kemnade References: <20260528-vm-upstr-v1-1-fb93ef8cbe47@kernel.org> <20260528190234.4c00b740@kernel.org> Content-Language: en-GB From: Ivaylo Dimitrov In-Reply-To: <20260528190234.4c00b740@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi, On 28.05.26 г. 20:02 ч., Andreas Kemnade wrote: > Hi, > > so this droid4? Or which device is it? > Oh, sorry, yes, this is droid4. > On Thu, 28 May 2026 17:44:14 +0300 > Ivaylo Dimitrov wrote: > >> Applied against 6.18.31, no dice :) >> >> [ 11.617523] [drm] Initialized pvr 1.17.4948957 for 56000000.gpu on >> minor 0 >> [ 11.674652] omapdss_dss 58000000.dss: bound 58001000.dispc (ops >> dispc_component_ops [omapdrm]) >> [ 11.775085] omapdss_dss 58000000.dss: bound 58001000.dispc (ops >> dsi_vc_flush_receive_data [omapdrm]) >> [ 12.222930] omapdss_dss 58000000.dss: bound 58001000.dispc (ops >> dsi_vc_flush_receive_data [omapdrm]) >> [ 12.245117] omapdss_dss 58000000.dss: bound 58001000.dispc (ops >> dsi_vc_flush_receive_data [omapdrm]) >> [ 12.247375] omapdss_dss 58000000.dss: bound 58004000.encoder (ops >> dsi_vc_flush_receive_data [omapdrm]) >> [ 12.249267] omapdss_dss 58000000.dss: bound 58006000.encoder (ops >> dsi_vc_flush_receive_data [omapdrm]) >> [ 12.284729] [drm] Initialized omapdrm 1.0.0 for omapdrm.0 on minor 1 >> [ 12.311981] [drm] Enabling DMM ywrap scrolling > > I would expect some > output from the panel-dsi-cm driver: > dev_info(&ddata->dsi->dev, "panel revision %02x.%02x.%02x\n", > id1, id2, id3); > > or some error: > dev_err(&ddata->dsi->dev, "error while enabling panel, issuing HW reset\n"); > > Any explanation why it is missing? > It is there, I grep-ed for omapdrm only, didn't want to flood the ML: 2026-05-28T17:34:45.761932+03:00 devuan-droid4 kernel: [ 12.502105] panel-dsi-cm 58004000.encoder.0: panel revision 70.01.02 Here is the (almost)full boot log: https://paste.debian.net/hidden/e6ca55a7 > > >> [ 12.770385] omapdrm omapdrm.0: atomic complete timeout (pipe 0)! >> [ 22.901306] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out >> [ 22.901306] omapdrm omapdrm.0: [drm] *ERROR* [CRTC:67:crtc-0] commit >> wait timed out > looks like dsi is not involed here, so something else is producing problems? > >> [ 33.131256] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out >> [ 33.131378] omapdrm omapdrm.0: [drm] *ERROR* [CONNECTOR:66:DSI-1] >> commit wait timed out > > This might have something to do with the patch. > >> [ 43.371307] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out >> [ 43.371398] omapdrm omapdrm.0: [drm] *ERROR* [PLANE:34:plane-0] >> commit wait timed out >> [ 43.631408] omapdrm omapdrm.0: atomic complete timeout (pipe 0)! >> [ 43.692504] omapdrm omapdrm.0: [drm] fb0: omapdrmdrmfb frame buffer >> device >> [ 54.251342] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out >> [ 54.251464] omapdrm omapdrm.0: [drm] *ERROR* [CRTC:67:crtc-0] commit >> wait timed out >> [ 64.491302] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out >> [ 64.491424] omapdrm omapdrm.0: [drm] *ERROR* [CONNECTOR:66:DSI-1] >> commit wait timed out >> [ 74.731323] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out >> [ 74.731445] omapdrm omapdrm.0: [drm] *ERROR* [PLANE:34:plane-0] >> commit wait timed out >> [ 74.991363] omapdrm omapdrm.0: atomic complete timeout (pipe 0)! >> [ 85.621307] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out >> [ 85.621398] omapdrm omapdrm.0: [drm] *ERROR* [CRTC:67:crtc-0] commit >> wait timed out >> [ 95.851287] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out >> [ 95.851379] omapdrm omapdrm.0: [drm] *ERROR* [CONNECTOR:66:DSI-1] >> commit wait timed out >> [ 106.101257] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out >> [ 106.101440] omapdrm omapdrm.0: [drm] *ERROR* [PLANE:34:plane-0] >> commit wait timed out >> [ 106.371459] omapdrm omapdrm.0: atomic complete timeout (pipe 0)! >> [ 106.961334] omapdrm omapdrm.0: atomic complete timeout (pipe 0)! >> [ 141.301269] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out >> [ 141.301269] omapdrm omapdrm.0: [drm] *ERROR* [CRTC:67:crtc-0] commit >> wait timed out >> [ 151.531280] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out >> [ 151.531402] omapdrm omapdrm.0: [drm] *ERROR* [CONNECTOR:66:DSI-1] >> commit wait timed out >> >> > Thanks for testing. > You're welcome, I can do more testing as needed, ATM I am trying to upgrade leste to 6.18 anyways so have all tools in place. Feel free to ping me on leste IRC channel if you think I can be of any help here. Regards, Ivo > Regards, > Andreas > >> On 28.05.26 г. 13:16 ч., akemnade@kernel.org wrote: >>> From: Andreas Kemnade >>> >>> Some chips need configuration commands to be sent first, before they can >>> send data. TC358762 for example needs PPI_LPTXTIMECNT configured >>> and PPI_STARTPPI set to 1 to be able to transmit anything. To be able to >>> configure such chips, do not send bta sync during writes if no acks are >>> requested. Instead just wait for the packet to be sent to avoid FIFO >>> overflows. There might be more to do about acks, but there seem to be >>> virtually no users of that flag. >>> >>> This came to light when fiddling with the Epson Moverio BT-200 display >>> which consists of 2 TC358762 bridges with SPI funneled through >>> to the unknown display chip. With that patch the bridge can be accessed, >>> Reading back registers works, when the above-mentioned registers are set. >>> >>> Video mode panel at OMAP4 (BT-200) and video mode at OMAP5 was tested. >>> >>> Fixes: e70965386353e ("drm/omap: dsi: simplify write function") >>> Signed-off-by: Andreas Kemnade >>> --- >>> This was not tested on any command mode display, which IMHO should be >>> done. So droid4 folks: please give it a try >>> --- >>> drivers/gpu/drm/omapdrm/dss/dsi.c | 32 +++++++++++++++++++++++--------- >>> 1 file changed, 23 insertions(+), 9 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c >>> index 27fe7bca9e2cf..98362b0157023 100644 >>> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c >>> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c >>> @@ -2194,6 +2194,7 @@ static int dsi_vc_send_null(struct dsi_data *dsi, int vc, int channel) >>> static int dsi_vc_write_common(struct omap_dss_device *dssdev, int vc, >>> const struct mipi_dsi_msg *msg) >>> { >>> + DECLARE_COMPLETION_ONSTACK(completion); >>> struct dsi_data *dsi = to_dsi_data(dssdev); >>> int r; >>> >>> @@ -2205,17 +2206,30 @@ static int dsi_vc_write_common(struct omap_dss_device *dssdev, int vc, >>> if (r < 0) >>> return r; >>> >>> - /* >>> - * TODO: we do not always have to do the BTA sync, for example >>> - * we can improve performance by setting the update window >>> - * information without sending BTA sync between the commands. >>> - * In that case we can return early. >>> - */ >>> + /* wait for IRQ for long packet transmission confirmation */ >>> + r = dsi_register_isr_vc(dsi, vc, dsi_completion_handler, >>> + &completion, DSI_VC_IRQ_PACKET_SENT); >>> + if (r) >>> + return r; >>> >>> - r = dsi_vc_send_bta_sync(dssdev, vc); >>> - if (r) { >>> - DSSERR("bta sync failed\n"); >>> + if (wait_for_completion_timeout(&completion, >>> + msecs_to_jiffies(500)) == 0) >>> + r = -EIO; >>> + >>> + dsi_unregister_isr_vc(dsi, vc, dsi_completion_handler, >>> + &completion, DSI_VC_IRQ_PACKET_SENT); >>> + >>> + if (r) >>> return r; >>> + >>> + /* TODO: find out if more needs to be done for MIPI_DIS_MSG_REQ_ACK */ >>> + >>> + if (msg->flags & MIPI_DSI_MSG_REQ_ACK) { >>> + r = dsi_vc_send_bta_sync(dssdev, vc); >>> + if (r) { >>> + DSSERR("bta sync failed\n"); >>> + return r; >>> + } >>> } >>> >>> /* RX_FIFO_NOT_EMPTY */ >>> >>> --- >>> base-commit: e7ae89a0c97ce2b68b0983cd01eda67cf373517d >>> change-id: 20260528-vm-upstr-c8e7634ebf56 >>> >>> Best regards, >>> -- >>> Andreas Kemnade >>> >>> >> >> >