Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp707927ybt; Wed, 1 Jul 2020 08:13:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuyJUaLTIvX5sRiag4Au4JZHPyJJzpFbUst22woeur5Q1D9T7fNhI1giM/fNwTwkmHwvGm X-Received: by 2002:aa7:db4f:: with SMTP id n15mr13823010edt.193.1593616420682; Wed, 01 Jul 2020 08:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593616420; cv=none; d=google.com; s=arc-20160816; b=EhExAqdYIcdS7bW2X8281OjbkbOhdPSSd+CmSt+q1C+k5KVcAJS9NuteF2FZHjk3Yg YnHb2e9sWq/mRNj+NJ9Pf0jKZ9LxvNvzRoq15oPdZoIV0sRolbh4KuIr75if3lsjTY7T P1aXc7XGPEDzSh4bKeHxYJhE6x3F69cCt1rDvbZ+NdR76JHFP1n9EhFjf+da0SLklxXO iTmLcuGYfzwHmeHjj8MWzll6fR9tQ9LNPV8z2ipU3aC8TfCWV1U62KtKqGKh/lrrPjoD 1/K4qoleHYhnnPSFFduPjQaFf0OtRMG+n4W5iHijh0d1ue8nwHBUqzL5+JuRHVLQDu+v SQkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=gY7SdMY7s+PPNzj4SXpzOlY9+8XP0Xh1RDf8xAlym+8=; b=N35ZtOwnf832j01iHRlsmPwUZL68f/qlW7iD4i/rCD6AAoEGtUFjbWpfPnmCJRzAjU lEzx+3xJylpMvucyAF0nqZ2pIot3VuSo2PwVgn6jhkb0jYlmnPDbvb2Llpf9MDTPmEag BLNhFVvTqZn/tsYvA1r8zpGjdMWHKwcRnhhWWyfZB18/GU+yh0SdAaAAaa2DEwiSMZG5 FO1WkXtMz1+5F5rtyx8+fmXV1dIcm8KFrPvPqBvx867QdlJckuwQAl+Aj5Kp2E3CGCAW Gw2e/6295mnp7WlIwUAGnWPB9krxPxLaj1ERr2kbybZqZdDAbBEMBDw9+kGO9fop65yI WTZA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y18si3994736edw.583.2020.07.01.08.13.17; Wed, 01 Jul 2020 08:13:40 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731999AbgGAPJy (ORCPT + 99 others); Wed, 1 Jul 2020 11:09:54 -0400 Received: from asavdk3.altibox.net ([109.247.116.14]:37536 "EHLO asavdk3.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731733AbgGAPJw (ORCPT ); Wed, 1 Jul 2020 11:09:52 -0400 Received: from ravnborg.org (unknown [188.228.123.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id 989F420025; Wed, 1 Jul 2020 17:09:46 +0200 (CEST) Date: Wed, 1 Jul 2020 17:09:45 +0200 From: Sam Ravnborg To: Yannick Fertre Cc: Philippe Cornu , Benjamin Gaignard , David Airlie , Daniel Vetter , Maxime Coquelin , Alexandre Torgue , dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/bridge/synopsys: dsi: allows LP commands in video mode Message-ID: <20200701150945.GA669248@ravnborg.org> References: <20200701145258.2782-1-yannick.fertre@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200701145258.2782-1-yannick.fertre@st.com> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=f+hm+t6M c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=kj9zAlcOel0A:10 a=8b9GpE9nAAAA:8 a=e5mUnYsNAAAA:8 a=YTZQKkLrOCVqNVj5krQA:9 a=eq0Tk01GMUV6gyqT:21 a=rLxRNCjj-UiVEZYG:21 a=CjuIK1q_8ugA:10 a=T3LWEMljR5ZiDmsYVIUa:22 a=Vxmtnl_E_bksehYqCbjh:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yannick. On Wed, Jul 01, 2020 at 04:52:58PM +0200, Yannick Fertre wrote: > From: Antonio Borneo > > Current code only sends LP commands in command mode. > > Allows sending LP commands also in video mode by setting the > proper flag in DSI_VID_MODE_CFG. > > Signed-off-by: Antonio Borneo > Change-Id: Ib78fa37bcc7559ce63017acd6ee0bbf00c61a397 Change-Id is not used in kernel patches to my best knowledge. > Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/153242 > Reviewed-by: CITOOLS > Reviewed-by: CIBUILD Reviews by humans, not machines.. > Reviewed-by: Yannick FERTRE > Reviewed-by: Philippe CORNU > Tested-by: Yannick FERTRE > --- > drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c > index d580b2aa4ce9..0cd43e7a69bb 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c > @@ -367,6 +367,13 @@ static void dw_mipi_message_config(struct dw_mipi_dsi *dsi, > > dsi_write(dsi, DSI_LPCLK_CTRL, lpm ? 0 : PHY_TXREQUESTCLKHS); > dsi_write(dsi, DSI_CMD_MODE_CFG, val); > + > + val = dsi_read(dsi, DSI_VID_MODE_CFG); > + if (lpm) > + val |= ENABLE_LOW_POWER_CMD; > + else > + val &= ~ENABLE_LOW_POWER_CMD; > + dsi_write(dsi, DSI_VID_MODE_CFG, val); > } We have following code: static void dw_mipi_dsi_set_mode(struct dw_mipi_dsi *dsi, unsigned long mode_flags) { dsi_write(dsi, DSI_PWR_UP, RESET); if (mode_flags & MIPI_DSI_MODE_VIDEO) { dsi_write(dsi, DSI_MODE_CFG, ENABLE_VIDEO_MODE); dw_mipi_dsi_video_mode_config(dsi); dsi_write(dsi, DSI_LPCLK_CTRL, PHY_TXREQUESTCLKHS); } else { dsi_write(dsi, DSI_MODE_CFG, ENABLE_CMD_MODE); } dsi_write(dsi, DSI_PWR_UP, POWERUP); } Here DSI_MODE_CFG is used to set vidoe mode or not. But the code snip above checks DSI_VID_MODE_CFG. It looks inconsistent. I do not know the HW - and just stumbled over this. Sam > > static int dw_mipi_dsi_gen_pkt_hdr_write(struct dw_mipi_dsi *dsi, u32 hdr_val) > -- > 2.17.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel