From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752005AbdAaM1B (ORCPT ); Tue, 31 Jan 2017 07:27:01 -0500 Received: from dougal.metanate.com ([90.155.101.14]:34323 "EHLO metanate.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751656AbdAaM0y (ORCPT ); Tue, 31 Jan 2017 07:26:54 -0500 Date: Tue, 31 Jan 2017 12:03:49 +0000 From: John Keeping To: Sean Paul Cc: Mark Yao , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, Chris Zhong , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 12/24] drm/rockchip: dw-mipi-dsi: allow commands in panel_disable Message-ID: <20170131120349.6e291624.john@metanate.com> In-Reply-To: <20170130201953.GO20076@art_vandelay> References: <20170129132444.25251-1-john@metanate.com> <20170129132444.25251-13-john@metanate.com> <20170130201953.GO20076@art_vandelay> Organization: Metanate Ltd X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 30 Jan 2017 15:19:53 -0500, Sean Paul wrote: > On Sun, Jan 29, 2017 at 01:24:32PM +0000, John Keeping wrote: > > Panel drivers may want to sent commands during the disable function, for > > example MIPI_DCS_SET_DISPLAY_OFF before the video signal ends. In order > > to send commands we need to write to registers, so pclk must be enabled. > > > > While changing this, remove the unnecessary code after the panel > > unprepare call which seems to be a workaround for a specific panel and > > thus belongs in the panel driver. > > Do you know which panel? If the panel driver is upstream, we should make sure we > migrate this hack before removing it here. If it's downstream somewhere, I'm just going by the comment in the code that this patch deletes and the fact that this delay was not needed on any of the three panels I tested. Given the way the modes change, I think this should be a 120ms disable delay if the affected panel is supported by the simple-panel driver. > Reviewed-by: Sean Paul > > > > > Signed-off-by: John Keeping > > Reviewed-by: Chris Zhong > > --- > > v3: > > - Add Chris' Reviewed-by > > Unchanged in v2 > > > > drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 12 ++---------- > > 1 file changed, 2 insertions(+), 10 deletions(-) > > > > diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c > > index 7ada6d8ed143..290282e86d16 100644 > > --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c > > +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c > > @@ -846,24 +846,16 @@ static void dw_mipi_dsi_encoder_disable(struct drm_encoder *encoder) > > { > > struct dw_mipi_dsi *dsi = encoder_to_dsi(encoder); > > > > - drm_panel_disable(dsi->panel); > > - > > if (clk_prepare_enable(dsi->pclk)) { > > dev_err(dsi->dev, "%s: Failed to enable pclk\n", __func__); > > return; > > } > > > > + drm_panel_disable(dsi->panel); > > + > > dw_mipi_dsi_set_mode(dsi, DW_MIPI_DSI_CMD_MODE); > > drm_panel_unprepare(dsi->panel); > > - dw_mipi_dsi_set_mode(dsi, DW_MIPI_DSI_VID_MODE); > > > > - /* > > - * This is necessary to make sure the peripheral will be driven > > - * normally when the display is enabled again later. > > - */ > > - msleep(120); > > - > > - dw_mipi_dsi_set_mode(dsi, DW_MIPI_DSI_CMD_MODE); > > dw_mipi_dsi_disable(dsi); > > clk_disable_unprepare(dsi->pclk); > > } > > -- > > 2.11.0.197.gb556de5.dirty > > > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel >