From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 51F0F37883C for ; Mon, 22 Jun 2026 11:22:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782127328; cv=none; b=sVSReRd9Jqc8iVMN2Wd+fHOJjC00XY48T/M71pSHbPS87jZK7qH3a+XqVwCvCmT9YcAWO+B15IvxomP3llkxwZto67DHmgWKaO4hyWe7gYDWE74XHsNDhswohiIz/j8DoogLLDgl+Vpa1lhL/5lPydF+2LxpfdxY8tE2ixscEeY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782127328; c=relaxed/simple; bh=GGV0jgBltdM5AI4K+yjHliKVckl9wn7ORNy774onZEY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bw5lRwJfkSrkPutZqfeGh8ijLvcnj7uoLPI1mxqPgCtFB4JyWMJSjLiAr4GzyogWZQAv60TwIFitEYU3hwehyb1HiiIdUhYmCtk+BMf0XECMhSzjjTBneIy3cVe1VRhG7Hw9HVJDoC5avsXfL2oc6tiUOUmgW+AfrCO5hZcNgrs= 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=D4uHQA0O; arc=none smtp.client-ip=209.85.128.41 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="D4uHQA0O" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4903d730b1fso64142665e9.2 for ; Mon, 22 Jun 2026 04:22:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782127326; x=1782732126; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=n3pEs7ELftmADa57rBtbs9ZKMglFTJdohuXXnbaKK8k=; b=D4uHQA0OimNWiO3ktbgbcGBJ8CIr2vdsQMEBZLuvEeIsdxVWOc6NZdNijuqR0IQhYd mzQr36e8Nsgo0RDcRzyZc7DRkNHMZBHM147+lY10aLbn15u+XyfZY3neRdYwtc7Xpavj 6NB0UTV21H47SZO4hVn79ah3V0Xb2oyGlSwaJD2YVzfAfNVq9QZYlsWvmEdsdXEdIucL 8AhPaYuQ2dfqFMXZQPT/EygnrF9nSCbl3uaytOMRl0GWyHhq0R9WFAQ0pDNK6yttN6WO C3zCue23ojD9qOEiQMs4Kh3To0VHBS/6cPvTdxmwNm371cWWpfTN5pZJysuyxZqNMn3m 3Gqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782127326; x=1782732126; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n3pEs7ELftmADa57rBtbs9ZKMglFTJdohuXXnbaKK8k=; b=cbOXxpylSpwxmvQqD9mjh9iEC0QCin3XZFV9Ay/JXQR01ZaOxR8nHps+qehB1NATLR I4itpIaOAzoTCREZKlziCbWlp/7XM7M2T+lhp7DskMFDKfiUFY1+Vpr7acCyoExPWaiq stuSnUTEhKKSyEtuo/Qsrv1JIPu84jRxUyi9eTz5aZDtoHnQ2diN7Jzy28hZXBj6qUhl z8cJqMFB7/+6EAqhXSkBAxhCT1ZNEMvlvfmvekVJt9rl8rBFjhhHr6/P1ioXWJwFlU7A jrfAI9J776iPk8ndVCYR0Fu/xiqpVA8HwbQI1lhYRq3gKhe1aG2gvGeLqI8CkVzy8Ala 6Uqw== X-Forwarded-Encrypted: i=1; AFNElJ+prvnPUsLXmRt8fNrzCTmxu9HbJ6zkGmR5eYUaQs08P83ONnKjIY5NGoRT+VytGeXejGgxIs0Isxs5lSs=@vger.kernel.org X-Gm-Message-State: AOJu0YyjT7UlKC7Ww87YJgoWAOq+l/f5BaKIcqIw48r2nGfR/yaOFP/2 DtGhEfHXsSTrnZYzh1pD9HFFEJJstQtGs8/QKCo8bVc7CzGBhuTq6HN0 X-Gm-Gg: AfdE7ckyowYVHcUkKnqvLEbJcvBHMDGjXKbYtaGiR2I4OVYCqJAdd4FZ/fSDulKk2rX tPGUJ6Iq//V7Mymq7OHMB1gbc/bghA7GLaP4YYr2ZOTDO3p++dEVM8ypWX6R2OzfCfu5LezRVCP /mDMKLA4A9iW+kMB9QftJ31fYpRxwsQ32nQy8nOMwvZE2V2GAl8UdHeoNHRn8KTvmjKalGybAX0 JeRuSJFg3RriQdCagoWfWAsXmO5DoFEU9ztsxahO0FQA7mM5ihVlV1A3EIaKoevyjeD23CYiGYJ pyxZT4iQ+B13DVeQDfqBgxHt7wDiTfmFHqgdxlueXChYfv/xpb0ocmDrv2jgVrIThaUcfC5SZqq HEJ5d6G7e7Os38wctKf0HFDKjc5k5g7G6kG12NqaRrxbgAOb5fYfb/atrQ5BevQIGLLgt/WZcok BvSEpE3c0YHSRWdrfG X-Received: by 2002:a05:600c:8b2b:b0:492:4a56:690b with SMTP id 5b1f17b1804b1-4924a5669d3mr155913935e9.35.1782127325428; Mon, 22 Jun 2026 04:22:05 -0700 (PDT) Received: from owl5 ([2001:861:3201:3d10:da31:7e0:ef44:ffb]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4923fd1f886sm270773485e9.4.2026.06.22.04.22.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2026 04:22:04 -0700 (PDT) Date: Mon, 22 Jun 2026 13:22:03 +0200 From: Gary Bisson To: Adam Thiede Cc: Chun-Kuang Hu , Philipp Zabel , David Airlie , Simona Vetter , Matthias Brugger , AngeloGioacchino Del Regno , dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] drm/mediatek: mtk_dsi: enable hs clock during pre-enable Message-ID: References: <20260120-mtkdsi-v1-1-b0f4094f3ac3@gmail.com> <42607fa4-485d-4142-b31c-7bfac71118d2@adamthiede.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42607fa4-485d-4142-b31c-7bfac71118d2@adamthiede.com> Hi, On Thu, Jun 18, 2026 at 04:06:28PM -0500, Adam Thiede wrote: > On 1/20/26 05:36, Gary Bisson wrote: > > Some bridges, such as the TI SN65DSI83, require the HS clock to be > > running in order to lock its PLL during its own pre-enable function. > > > > Without this change, the bridge gives the following error: > > sn65dsi83 14-002c: failed to lock PLL, ret=-110 > > sn65dsi83 14-002c: Unexpected link status 0x01 > > sn65dsi83 14-002c: reset the pipe > > > > Move the necessary functions from enable to pre-enable. > > > > Signed-off-by: Gary Bisson > > --- > > Tested on Tungsten510 module with sn65dsi83 + tm070jdhg30 panel. > > > > Left mtk_dsi_set_mode() as part of the enable function to mimic what is > > done in the Samsung DSIM driver which is known to be working the TI > > bridge. > > --- > > drivers/gpu/drm/mediatek/mtk_dsi.c | 35 +++++++++++++++++------------------ > > 1 file changed, 17 insertions(+), 18 deletions(-) > > > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c > > index 0e2bcd5f67b7..b560245d1be9 100644 > > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c > > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c > > @@ -672,6 +672,21 @@ static s32 mtk_dsi_switch_to_cmd_mode(struct mtk_dsi *dsi, u8 irq_flag, u32 t) > > } > > } > > +static void mtk_dsi_lane_ready(struct mtk_dsi *dsi) > > +{ > > + if (!dsi->lanes_ready) { > > + dsi->lanes_ready = true; > > + mtk_dsi_rxtx_control(dsi); > > + usleep_range(30, 100); > > + mtk_dsi_reset_dphy(dsi); > > + mtk_dsi_clk_ulp_mode_leave(dsi); > > + mtk_dsi_lane0_ulp_mode_leave(dsi); > > + mtk_dsi_clk_hs_mode(dsi, 0); > > + usleep_range(1000, 3000); > > + /* The reaction time after pulling up the mipi signal for dsi_rx */ > > + } > > +} > > + > > static int mtk_dsi_poweron(struct mtk_dsi *dsi) > > { > > struct device *dev = dsi->host.dev; > > @@ -724,6 +739,8 @@ static int mtk_dsi_poweron(struct mtk_dsi *dsi) > > mtk_dsi_set_vm_cmd(dsi); > > mtk_dsi_config_vdo_timing(dsi); > > mtk_dsi_set_interrupt_enable(dsi); > > + mtk_dsi_lane_ready(dsi); > > + mtk_dsi_clk_hs_mode(dsi, 1); > > return 0; > > err_disable_engine_clk: > > @@ -769,30 +786,12 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi) > > dsi->lanes_ready = false; > > } > > -static void mtk_dsi_lane_ready(struct mtk_dsi *dsi) > > -{ > > - if (!dsi->lanes_ready) { > > - dsi->lanes_ready = true; > > - mtk_dsi_rxtx_control(dsi); > > - usleep_range(30, 100); > > - mtk_dsi_reset_dphy(dsi); > > - mtk_dsi_clk_ulp_mode_leave(dsi); > > - mtk_dsi_lane0_ulp_mode_leave(dsi); > > - mtk_dsi_clk_hs_mode(dsi, 0); > > - usleep_range(1000, 3000); > > - /* The reaction time after pulling up the mipi signal for dsi_rx */ > > - } > > -} > > - > > static void mtk_output_dsi_enable(struct mtk_dsi *dsi) > > { > > if (dsi->enabled) > > return; > > - mtk_dsi_lane_ready(dsi); > > mtk_dsi_set_mode(dsi); > > - mtk_dsi_clk_hs_mode(dsi, 1); > > - > > mtk_dsi_start(dsi); > > dsi->enabled = true; > > > > --- > > base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8 > > change-id: 20260120-mtkdsi-29e4c84e7b38 > > > > Best regards, > > Hello, > This commit was part of 7.1 and caused a problem for me. > I'm running postmarketOS (basically Alpine Linux) on a Lenovo C330 > chromebook with a Mediatek MT8173 processor. > The problem: when the display on my laptop powers off (via suspend or idle, > like xset dpms off) the picture does not come back when the display powers > back on (from resume). The display backlight comes on and brightness is > adjustable but there is no picture. The only fix is to reboot. > > Reverting this commit and applying it as a patch on top of 7.1 addresses the > issue for me. > > You can view the config I'm using here: > https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8819 > > Is there any sort of testing or other debugging info I can provide to help > address this issue? Thanks for reporting the issue, could you share some logs? Is the driver saying anything during resume? Also, what type of panel is used on that chromebook? Thanks, Gary