Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp63403imu; Tue, 22 Jan 2019 13:54:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN5HaxKACqJiVhJzDSSG4vvtRLEAVAZKIG6uaYthrx6AGAIiEgUqB1wywZCMjjeDdQhuNlK3 X-Received: by 2002:a63:fa06:: with SMTP id y6mr33717320pgh.177.1548194090771; Tue, 22 Jan 2019 13:54:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548194090; cv=none; d=google.com; s=arc-20160816; b=oaBYyJ/+tZUSlRTbpIGWe+SfWgrsjM+ApKkhdK3AGW1vH0CkF76B2CRp/LXBT7NlPz J19YX29fex+DkPpYxpg3te/YekkurMzX7ZKG/A3YsADym7AAH01LXSLLJKA1WvrnTwYo XWCgT7uD4NW/1MlWTlNeKLbOspXq+OClk/k4tzAilf4CtrvdmY/BS/lVRxfS1Dh6YAmH 8unNSQ3473CC42sxm76Z7SIbxGxc5VUg7VxKwgQQMm5SdWNvVd11E2Am5isdnM60JpRT pWAeuhhvfTI95z4JOnMxFJZ+kfLs1oE6WjA+J7/s80pbdu8IT3rwSRHQJ9o4ixlFkYc8 XpKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=AGImLWKSXyqcZe7nveg/7vkgivfZ2ayznn3rwDCE8FY=; b=SjYA4uszNvAWYlGrlaOmalIXPhZ3wndvOOnKLmBSbDErz147JALaLezrxQGse+kxIr tejTfuePeTmD1lQ97erkjU8gGXtTj/RGsTCpy67nXiVydfqlAUBwqiCb13J+SS4Q6dbT aL/LbGe7qUghANDFxjvVQ46K8gpKRLzmrHq2KSC8q3HZ3gmUpADiMkJhtOP78B0E/NoL nbkp6gmdRrZ/RA2PzB4pZHt9SVJcav/5gMOmDVUqA7+brxZii9bJOFuNkBCuLhF1VVrO UXq/Cx6kcj7W9nSohWZRtNyTz5Jx2YoW1I04iqb4EYr59es9LDwJSoqoNWwMd2WNV1C6 NJQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@poorly.run header.s=google header.b=AHvKGUc1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j191si17592614pgd.31.2019.01.22.13.54.35; Tue, 22 Jan 2019 13:54:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@poorly.run header.s=google header.b=AHvKGUc1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726859AbfAVVxC (ORCPT + 99 others); Tue, 22 Jan 2019 16:53:02 -0500 Received: from mail-yb1-f194.google.com ([209.85.219.194]:45450 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726832AbfAVVxB (ORCPT ); Tue, 22 Jan 2019 16:53:01 -0500 Received: by mail-yb1-f194.google.com with SMTP id n78so17902yba.12 for ; Tue, 22 Jan 2019 13:53:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=AGImLWKSXyqcZe7nveg/7vkgivfZ2ayznn3rwDCE8FY=; b=AHvKGUc1yOVBQIXBFh5sY1o9v6Vm3IX0sfgcGrTG34kaFzlxf1Jm8AVan2dh507cGI ygYgYsNvIhwq7FlmpQGjt7HdKurdL57SPlrCPaGP81/nFKDVEqWEvcR2G9pUVj41TaEI f+EYZsEK5+fylSuCVIyAD5L4I8fbl0DWoyLf99bBl1JbckxrmMUBMBelq0KeNXxUQ2Qe zfcnnCOGt6DmByNpeJFXR3bEmCMWomuGSAZ7WmfpVGkcfMnHyZ36k0Ebpy2RDVV37zwN oRNf3Fcwl9Ecw1FMoc7Cgpxn5Hztk7gRaf6LyV3wGPZ+djf6oCq1CWw0JtuJV+lD7dNz 8iCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=AGImLWKSXyqcZe7nveg/7vkgivfZ2ayznn3rwDCE8FY=; b=O1lYtZF6f0dZ863jrPfliL7m8/rBajAmvRSGzwuM0paMMQH2srpQduW9g4JJTvrMx3 ULTEcrevNJaNh+vj3aZo0qjSZ6ioGNA0rCEzvRKc5qOWA9YeqXLYWbUaA7uhGaWg0qHR 91N4/4KmnT9Ad1InMsvFzeBFHKVAjyaZZEAXwvSx+KpjfqPKTCCAEqtYeT7RZR1CSTsx FVcy2wDNPaCY1mBIrBjTPpWOzVp+QG4rhHERsdpKBqxai7z1jOqVkKM3zjzuxTfbPADT q7OVeZWgqwHjiecoSAUm7zucBiWNBsX9kMFbXJ3EhylH+3txR30nRzyY5/x2SwNWZXN4 B1sg== X-Gm-Message-State: AJcUukc4kL9bSzD7InaR+hpG1woEaBdEeXx/sYxQ+h9doqQ2TzIZAmZE cuQ99YZ4GhxVNwZCgtCNDg4cwQ== X-Received: by 2002:a25:3455:: with SMTP id b82mr22727920yba.402.1548193980378; Tue, 22 Jan 2019 13:53:00 -0800 (PST) Received: from localhost ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id w2sm6327173ywe.62.2019.01.22.13.52.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Jan 2019 13:52:59 -0800 (PST) Date: Tue, 22 Jan 2019 16:52:59 -0500 From: Sean Paul To: Sean Paul Cc: "Hsin-Yi, Wang" , David Airlie , Linux Kernel Mailing List , dri-devel , Thierry Reding , Linux ARM Kernel Subject: Re: [PATCH resend] drm/panel: panel-innolux: set display off in innolux_panel_unprepare Message-ID: <20190122215259.GN114153@art_vandelay> References: <20190109065922.231753-1-hsinyi@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 18, 2019 at 12:58:10PM -0500, Sean Paul wrote: > On Wed, Jan 9, 2019 at 1:59 AM Hsin-Yi, Wang wrote: > > > > Move mipi_dsi_dcs_set_display_off() from innolux_panel_disable() > > to innolux_panel_unprepare(), so they are consistent with > > innolux_panel_enable() and innolux_panel_prepare(). > > > > This also fixes some mode check and irq timeout issue in MTK dsi code. > > > > Since some dsi code (e.g. mtk_dsi) have following call trace: > > 1. drm_panel_disable(), which calls innolux_panel_disable() > > 2. switch to cmd mode > > 3. drm_panel_unprepare(), which calls innolux_panel_unprepare() > > > > However, mtk_dsi needs to be in cmd mode to be able to send commands > > (e.g. mipi_dsi_dcs_set_display_off() and mipi_dsi_dcs_enter_sleep_mode()), > > so we need these functions to be called after the switch to cmd mode happens, > > i.e. in innolux_panel_unprepare. > > > > > > Signed-off-by: Hsin-Yi, Wang > > Reviewed-by: Sean Paul Applied to drm-misc-next, thanks for your patch. Sean > > > --- > > Resend for review. > > --- > > drivers/gpu/drm/panel/panel-innolux-p079zca.c | 11 +++++------ > > 1 file changed, 5 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c > > index ca4ae45dd307..8e5724b63f1f 100644 > > --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c > > +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c > > @@ -70,18 +70,12 @@ static inline struct innolux_panel *to_innolux_panel(struct drm_panel *panel) > > static int innolux_panel_disable(struct drm_panel *panel) > > { > > struct innolux_panel *innolux = to_innolux_panel(panel); > > - int err; > > > > if (!innolux->enabled) > > return 0; > > > > backlight_disable(innolux->backlight); > > > > - err = mipi_dsi_dcs_set_display_off(innolux->link); > > - if (err < 0) > > - DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n", > > - err); > > - > > innolux->enabled = false; > > > > return 0; > > @@ -95,6 +89,11 @@ static int innolux_panel_unprepare(struct drm_panel *panel) > > if (!innolux->prepared) > > return 0; > > > > + err = mipi_dsi_dcs_set_display_off(innolux->link); > > + if (err < 0) > > + DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n", > > + err); > > + > > err = mipi_dsi_dcs_enter_sleep_mode(innolux->link); > > if (err < 0) { > > DRM_DEV_ERROR(panel->dev, "failed to enter sleep mode: %d\n", > > -- > > 2.18.1 > > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Sean Paul, Software Engineer, Google / Chromium OS