Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp454591pxb; Wed, 27 Jan 2021 11:51:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbFDp23w79p2gaZTdEYblcMQGzGlPJX+U9psTDz/ST2WkvhIOEH6UCbsTmcUoyTgDVq8S/ X-Received: by 2002:a17:906:87c3:: with SMTP id zb3mr8082750ejb.244.1611777074471; Wed, 27 Jan 2021 11:51:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611777074; cv=none; d=google.com; s=arc-20160816; b=c3F/3hqd8bUyQ0ZT4vtUi8DJ+umy8WEKQUelb1OzBGSOU0Q6YgA3EfdekAHSZPAX+X VBKE7neZTBOe6RoJ2Mo5/p88w42Pf9b4WWziYAAmru5MZfO63GYUQ95yBxoOWVe+YZNi YGIDcwwaMUKuhj6i0/62fH+PO+Kj5JDkxjU3kezM/qbjxPDKS49ANEP1ygTih3xwvPbW Nlis1BsXoDJ+/T5GpLjoB2kK9Oj/IkexnKPb9zh+mlHgOmUg7B+aPcMseZWwIVE1t6ac +RZuA30hdXDxm+MsqdVXOFnhbnE9bPX64J2X/rkBs7mIBvO62rjTBDJNwpYekfbxQmoz Su5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:to:from:subject:message-id :dkim-signature; bh=QJYovKT99XXIoP/qY54FEd7zbaJUkpH5fmKd5QnuoOg=; b=HvFpem1cvtIzLJ2aH572q6zXBhvCqyaIMMTkQu6rUhR2h6vc9q8NJvVvyUAq78enBU TKQgGBqyNWSnl5JGWWHXuYig5ex2xwTjIAgtlfTmyA3VH37leu1jb2m3YmUAcIWMRDN/ 2szmdebnB3aKA1XUS2hevpVI9brIR3huRDBWs1lLgGmKOQW+5JpvPoT55cz5CeBPNYbx 8qBdvGnbAc3bWtmCOJ/PDn6LPNfLInHsy/4sHfJdD87N/h46EU/xkfUJ7IK6rzAsZVZS H8Bjv5cHy+z4Tz5RM1yZT6foPrAFSbICI0hqO9N/Q4bKIbpIfme3g41e4gKbPMZZRRTN bd1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FgRy4EOu; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si1437075edt.339.2021.01.27.11.50.49; Wed, 27 Jan 2021 11:51:14 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FgRy4EOu; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234918AbhA0DO5 (ORCPT + 99 others); Tue, 26 Jan 2021 22:14:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728952AbhAZTjF (ORCPT ); Tue, 26 Jan 2021 14:39:05 -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 E5CECC06174A for ; Tue, 26 Jan 2021 11:38:24 -0800 (PST) Received: by mail-lj1-x236.google.com with SMTP id r14so2330619ljc.2 for ; Tue, 26 Jan 2021 11:38:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=QJYovKT99XXIoP/qY54FEd7zbaJUkpH5fmKd5QnuoOg=; b=FgRy4EOuuaXksD0SJxgNsQol120CK1WUCFz7OEYGmFKwOO9fhjUzas98tKXQWy77hp RyzNg7siskA3gRl7XMauAbQpVQScnkaYarGi2aB/iQUxP6SVEgSswe27qvKQgz4DmC0X SdCGYgJT957kVGl1gRH5Rvh4jAVEU0yCzI3cil3GM1GaU/WBd99BPPobUBha6yqn9KPF i94y2k8cjtSvJYm5SOR1w35R/A9j1QT00T9UC6227b3Q9f26dE0w8n3Ab6G0W/G3OgaJ Jjb7weDDC1KYwlkBO3LGjLyMFUkWttJMPzQ08XXS3n1766Hl2fqGd1iAMGYltYF02F+A fLvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=QJYovKT99XXIoP/qY54FEd7zbaJUkpH5fmKd5QnuoOg=; b=AlV1gje/UJVncL0Vk0jY8X8Br8xMvV+H+hktTwlR6Yh8grpY+baWdGKLXCsnHK4VwX CiW4q+yQuheS2rmieMb2hVX3bOq/BmcuLryWGw3NSBqYiIcZSKoNRHmx49fQkUAlbnf1 vliaY8S2e4N6CCBmASe5OpEU3D/9WoPWiaHb4WaULdsKN2OsoJVaxexE701/NT8U/08p luv71K2laHqSM1ohiKKTaFKv8V1YLhUM2gzDz2kpY2Qvb84ZHn6M0bhBORa9AO818JFL z90XeBhIilid20R2M7JHKhMXnzOWuIFtncWrsemc8SM0v4Pg0LE1bDYRdDRy9PatEaXt oxJA== X-Gm-Message-State: AOAM530nkYDwZPiMZ8VE6F2p+nx0pm+M26s+wsSN+fcCRnksiD4aCd72 X7ZLhmAjyHI2qSuQvz78+/Y= X-Received: by 2002:a2e:a379:: with SMTP id i25mr3744134ljn.430.1611689903467; Tue, 26 Jan 2021 11:38:23 -0800 (PST) Received: from localhost.localdomain (unnum-78-27-181-19.domashka.kiev.ua. [78.27.181.19]) by smtp.gmail.com with ESMTPSA id a81sm1438719lfd.211.2021.01.26.11.38.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jan 2021 11:38:22 -0800 (PST) Message-ID: Subject: Re: panel: panel-raydium68200 driver fails to write MIPI DSI init commands From: aleksandr.o.makarov@gmail.com To: Philippe CORNU , Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Sam Ravnborg , Antonio BORNEO , "" Date: Tue, 26 Jan 2021 21:38:21 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.2 (3.38.2-1.module_f33+10736+4f8d5006) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org В Вт, 19/01/2021 в 16:24 +0000, Philippe CORNU пишет: > Dear Aleksandr, > > We use the raydium68200 ic driver in a dsi 720p 2dl panel module mounted on the MB1230 board [1], mounted on the STM32MP157 eval board [2]. > > According to your email, you are using the EDT ETML0500F3DHA panel module, probably composed of a raydium68200+a touchscreen+a glass+backlight+.... > > Could you please double check if your panel module has the same characteristics as the one described in panel-raydium68200.c (pixel clock, blanking values, resolutions, number of dsi data lanes, enable & reset gpios, backlight...). > > Moreover, maybe your panel embeds a non-volatile ram which contains nice default values ("fused" during production) allowing to reduce a lot the panel init sequence... allowing then to use panel-simple.c instead of panel-raydium68200.c (that could explain why you can see "colors" without sending any init sequence). > > The issues you encountered may come from (starting with the highest probability): > * bad lcd hw vs sw configuration (see description above). > * bad pixel clock frequency, bad blanking values... > * bad dsi internal Rockchip ip programming (pll and clock trees in dt...) > > Hope it helps, > > [1] https://wiki.st.com/stm32mpu/wiki/MB1230 > [2] https://www.st.com/en/evaluation-tools/stm32mp157a-ev1.html > > Philippe :-) > I've fixed errors related to writing to DSI after applying this [1] patch. With the panel timings and other parameters all left intact in device tree, I only had to apply that patch to start to see video. After doing some testing, I found an issue with patch. With it applied, you must keep your driver as module with DRM_PANEL_RAYDIUM_RM68200=m. Otherwise, if DRM_PANEL_RAYDIUM_RM68200=y is set, the issues with writing to DSI from prepare() shall persist. [1] https://patchwork.kernel.org/project/dri- devel/patch/95f16906d654057c912f089d286bd51856ee3bdf.1607892237.git.tom myhebb@gmail.com/ > -----Original Message----- > From: aleksandr.o.makarov@gmail.com > Sent: Saturday, January 16, 2021 12:40 > To: Andrzej Hajda ; Neil Armstrong ; Laurent Pinchart ; Jonas Karlman ; Jernej Skrabec ; David Airlie ; Daniel Vetter ; Sam Ravnborg ; Philippe CORNU ; Antonio BORNEO ; > Subject: drm: panel: panel-raydium68200 driver fails to write MIPI DSI init commands > > I need to bring up my MIPI DSI 1280x720 EDT ETML0500F3DHA panel on a > RockPro64 V2.1 board. > > There is no completely suitable in-tree driver for that panel yet, but for the purpose of reproducing the issue that I face, the gpu/drm/panel/panel-raydium-rm68200.c can do just fine. > > To reproduce: > > - Get the same Linux 5.9.14 as on my RockPro64 board (with Armbian > 20.11.6 on it) > > - Patch the rk3399-rockpro64.dts to add a panel node that is compatible with "raydium,rm68200" driver on MIPI interface (rockpro64- rm68200.patch attached) > > - Compile and put the resulting rk3399-rockpro64.dtb on the target system. The panel driver shall then get probed at next boot. > > The kernel log shall contain following errors: > > [ 10.139957] dw-mipi-dsi-rockchip ff960000.mipi: failed to write > command FIFO > [ 10.139988] [drm:rm68200_dcs_write_cmd.isra.4 > [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write failed: -110 > [ 10.160972] dw-mipi-dsi-rockchip ff960000.mipi: failed to write > command FIFO > [ 10.161000] [drm:rm68200_dcs_write_buf.isra.5 > [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110 > [ 10.181929] dw-mipi-dsi-rockchip ff960000.mipi: failed to write > command FIFO > [ 10.181953] [drm:rm68200_dcs_write_buf.isra.5 > [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110 > [ 10.202923] dw-mipi-dsi-rockchip ff960000.mipi: failed to write > command FIFO > [ 10.202947] [drm:rm68200_dcs_write_buf.isra.5 > [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110 > [ 10.223064] dw-mipi-dsi-rockchip ff960000.mipi: failed to write > command FIFO > [ 10.223094] [drm:rm68200_dcs_write_buf.isra.5 > [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110 > [ 10.226104] zram1: detected capacity change from 0 to 52428800 > [ 10.244027] dw-mipi-dsi-rockchip ff960000.mipi: failed to write > command FIFO > [ 10.244073] [drm:rm68200_dcs_write_buf.isra.5 > [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110 > [ 10.265024] dw-mipi-dsi-rockchip ff960000.mipi: failed to write > command FIFO > [ 10.265064] [drm:rm68200_dcs_write_buf.isra.5 > [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110 > [ 10.285711] dw-mipi-dsi-rockchip ff960000.mipi: failed to write > command FIFO > [ 10.285746] [drm:rm68200_dcs_write_buf.isra.5 > [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110 > [ 10.305926] dw-mipi-dsi-rockchip ff960000.mipi: failed to write > command FIFO > [ 10.305955] [drm:rm68200_dcs_write_buf.isra.5 > [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110 > [ 10.326996] dw-mipi-dsi-rockchip ff960000.mipi: failed to write > command FIFO > [ 10.327039] [drm:rm68200_dcs_write_buf.isra.5 > [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110 > [ 10.348030] dw-mipi-dsi-rockchip ff960000.mipi: failed to write > command FIFO > [ 10.348074] [drm:rm68200_dcs_write_buf.isra.5 > [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110 > > It's remarkable that if to pull the module panel-rm682000 out and then back in, there are no errors mentioned. I can for sure say that those commands become effective - I start seeing colourful stripes on the display after. That is, if I would send the correct command set to the panel, then it would bring up just fine. the panel, then it would bring up just fine.