Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp770491ybt; Wed, 1 Jul 2020 09:33:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzG1SugksRxnMRUNCVDn6/L26vhkzHuAlDf+HcMCmUs3dctRvI4NN55X9XYHqeOXFltK5fa X-Received: by 2002:a05:6402:1777:: with SMTP id da23mr29591322edb.260.1593621209360; Wed, 01 Jul 2020 09:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593621209; cv=none; d=google.com; s=arc-20160816; b=TFZI0ijZ3gI6Vx9Qqsa1BKKHUMen35uLbg0+eMBjaaZfAQfptjnpe5W2hf5Q7tP8SK mOzxX3iYQJRrrDE6mKtRcV7/i95uEeLr11tmImV81JTNTZ1o6h0A54/TKsForyFgIj6a NM3yJdO2MtcdvFsHlgm3tqfX/yqSOWLvEd/aysWuyy4CYZp1osuP4FKIlAwCWKzDtZ7m tnh+NFA95k5ofuEAIGr1W4bQC3EXq/Sos6kvS06mEr3GHeS5DVpEYNjxDBcAfF+dv8m+ E1LARycqTy+fUY+428UsITDiUD2hiaxBbjX/AFJ20PD9Rq8Bo51B4OYc7bC7qokDIk9R DDXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EWNWIgtQUMSDlrQ0fk5gapRus/k5lF821G7d4l/7TDs=; b=LRQf1W+5z84H709yoc+RnKWpxAcEpDjT98a8hsJrkULCoCBWQG8xc2WSCXx+vFTHlX 2ciGgnEFg0UGj1xsYuV6sZX0n0H+QcLr859+BxFBy7Aj4GNXdPk6x0efdCSr6hWZNyQi vBu5VN8Zt1KxmAeEAbg6sRCGTpXzb8oj1cEqqjPwTBvLrV9ItPGxHReiyt91nVXPhmNV z88beESDX7t0JlcAxrVGSxiahHN6+xBkvdHmeACjCXHSxa28EmMvL8DrmKIR+unb8hb4 75r1WpBgGcsTxHAhUo0NujPSz2hUf4HsPbRVPYAqxtm0QhWSbC6HkxMyNKY21yCyJVCx fcXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=tggq4Iap; 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=NONE dis=NONE) header.from=megous.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r8si4023844ejs.462.2020.07.01.09.33.02; Wed, 01 Jul 2020 09:33:29 -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; dkim=pass header.i=@megous.com header.s=mail header.b=tggq4Iap; 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=NONE dis=NONE) header.from=megous.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732487AbgGAQaM (ORCPT + 99 others); Wed, 1 Jul 2020 12:30:12 -0400 Received: from vps.xff.cz ([195.181.215.36]:52358 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732393AbgGAQ3i (ORCPT ); Wed, 1 Jul 2020 12:29:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1593620975; bh=xHG5qJNwJythr0yZAk0g86hoDZe3XW6J8JdaM3wh/Nw=; h=From:To:Cc:Subject:Date:References:From; b=tggq4IapBHxpnVXBDxWfiqOZwMos+DoXidEnSOW9FAAfQ2gfDy0hsC0MadCscT58R xXLBhRy/l60FNCcFW33qflNZOnM3XH4AcGO/tNGHUFzcgINoNSzoNHwmuQ6fg1nA0B 5X/Tn7BuGdydU8bb68mBB+MPR9JrpP5q9yLMzQ6Q= From: Ondrej Jirman To: linux-sunxi@googlegroups.com, Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , =?UTF-8?q?Guido=20G=C3=BCnther?= , Purism Kernel Team , Rob Herring , Maxime Ripard , Chen-Yu Tsai , Linus Walleij , Icenowy Zheng Cc: Ondrej Jirman , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Samuel Holland , Martijn Braam , Luca Weiss , Bhushan Shah Subject: [PATCH v7 10/13] drm/panel: st7703: Enter sleep after display off Date: Wed, 1 Jul 2020 18:29:25 +0200 Message-Id: <20200701162928.1638874-11-megous@megous.com> In-Reply-To: <20200701162928.1638874-1-megous@megous.com> References: <20200701162928.1638874-1-megous@megous.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The datasheet suggests to issue sleep in after display off as a part of the panel's shutdown sequence. Signed-off-by: Ondrej Jirman Reviewed-by: Linus Walleij --- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c index dadb482b244d..7750179bca60 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c @@ -393,8 +393,19 @@ static int st7703_disable(struct drm_panel *panel) { struct st7703 *ctx = panel_to_st7703(panel); struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); + int ret; + + ret = mipi_dsi_dcs_set_display_off(dsi); + if (ret < 0) + DRM_DEV_ERROR(ctx->dev, + "Failed to turn off the display: %d\n", ret); - return mipi_dsi_dcs_set_display_off(dsi); + ret = mipi_dsi_dcs_enter_sleep_mode(dsi); + if (ret < 0) + DRM_DEV_ERROR(ctx->dev, + "Failed to enter sleep mode: %d\n", ret); + + return 0; } static int st7703_unprepare(struct drm_panel *panel) -- 2.27.0