Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp10001imm; Tue, 7 Aug 2018 12:56:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc5KKcVhwjL7EtsnyBfI1LreDEvdp+iCVDPKqH4mThwM1t46T1J4zJc9WdKL2JtzjCSO9J3 X-Received: by 2002:a63:4f1a:: with SMTP id d26-v6mr20288745pgb.121.1533671805953; Tue, 07 Aug 2018 12:56:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533671805; cv=none; d=google.com; s=arc-20160816; b=e4s12c409bnhFskRz8XhfbQJ63yJshwWLNQBKvcUcQGJYjPwErImdEJWO6BHjIvlfz USqCdX+tQKnU3BPRIhSz349U0M7KRNJLmECKDCKHXgE0mIPG9eSZrT44NfHGsTibUqUx E/7mdBHHKJ/6L6nZ30QgurVKQMWc6Cat4gh2De+Khh/e2IpsWPxNADTIlvaacxj8SmL3 YGge30sPZi3fsmXjB3AP0NSB0XzvmAq6m5eI0EGUBqI7tjhG2vyb2tH+yT0cE3eGoYCa GSlkOESR97XfjradsBOidLuNo9dQbZWoprXclo4oeLjNN+fKMWYGukbepeMEkkNfTZAb MV3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:arc-authentication-results; bh=ltuIivypPDxg3NZlETfyBsidCCo6pHe3QFxFiI27HFE=; b=UkHCYbC4MH2IGH5ONVo2ZOjQF61kwEoIXUKj5NovFGrFB+Mg3ii+H7iU/7GMsP61sI CZm9l0W6eRAskNuKDGZAqCU4lYrllL52F4lcXiZFT89i9p18E1ZALesa44kOY3zKvySV EQyTIm9fUmLQcT0RTNpEcMIcQUbubZyUSEPRFCJ7R0c8S8dP6vxCEblmldmvAAW/DX+p T2SxDIAEWFDJed9v5SCiGVU+fgMARC3VnOo8QfkXZv60Uvf+I71pfbG8kLCuGiu0VbNs fXN5/YCTu5v4goSQdkKM6ISh6wcizLSQk1wWXyoekFO+PgLnkyk8HLU79BEnURjBKgtf ykJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=v7pF7Ktc; 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 m11-v6si1680181pla.45.2018.08.07.12.56.15; Tue, 07 Aug 2018 12:56:45 -0700 (PDT) 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=@agner.ch header.s=dkim header.b=v7pF7Ktc; 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 S2389222AbeHGUru (ORCPT + 99 others); Tue, 7 Aug 2018 16:47:50 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:40506 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727198AbeHGUru (ORCPT ); Tue, 7 Aug 2018 16:47:50 -0400 Received: from webmail.kmu-office.ch (unknown [IPv6:2a02:418:6a02::a3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 551DE5C0187; Tue, 7 Aug 2018 20:32:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1533666727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ltuIivypPDxg3NZlETfyBsidCCo6pHe3QFxFiI27HFE=; b=v7pF7KtcaZl3JGO4lyA35gJHBvnerfgVy6mqmxqd+JnArjXg+Uc9ucvBzGk691jMojNdAZ K6fEfzSaY6pZTAusBBXQP11J6bGprsn8ah5zlUVEjlI5xvF3GcYRYYmZ8JN2HTzNvlgfTp I5n+F8zNEBgT7TA4ku5WCF+Sww1b2pU= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Date: Tue, 07 Aug 2018 20:32:06 +0200 From: Stefan Agner To: Leonard Crestez Cc: Philipp Zabel , Marek Vasut , Shawn Guo , Fabio Estevam , Robert Chiras , Mirela Rabulea , Anson Huang , dri-devel@lists.freedesktop.org, Dong Aisheng , linux-imx@nxp.com, kernel@pengutronix.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/4] drm/mxsfb: Add pm_runtime calls to pipe_enable/disable In-Reply-To: References: Message-ID: X-Sender: stefan@agner.ch User-Agent: Roundcube Webmail/1.3.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06.08.2018 21:31, Leonard Crestez wrote: > Adding lcdif nodes to a power domain currently results in > black/corrupted screens or hangs because power is not correctly enabled > when required. > > Ensure power is on when display is active by adding > pm_runtime_get/put_sync to mxsfb_pipe_enable/disable. > > Signed-off-by: Leonard Crestez Reviewed-by: Stefan Agner > --- > drivers/gpu/drm/mxsfb/mxsfb_drv.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c > b/drivers/gpu/drm/mxsfb/mxsfb_drv.c > index ffe5137ccaf8..68d79f5dc0d3 100644 > --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c > +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c > @@ -101,23 +101,27 @@ static const struct drm_mode_config_funcs > mxsfb_mode_config_funcs = { > static void mxsfb_pipe_enable(struct drm_simple_display_pipe *pipe, > struct drm_crtc_state *crtc_state, > struct drm_plane_state *plane_state) > { > struct mxsfb_drm_private *mxsfb = drm_pipe_to_mxsfb_drm_private(pipe); > + struct drm_device *drm = pipe->plane.dev; > > + pm_runtime_get_sync(drm->dev); > drm_panel_prepare(mxsfb->panel); > mxsfb_crtc_enable(mxsfb); > drm_panel_enable(mxsfb->panel); > } > > static void mxsfb_pipe_disable(struct drm_simple_display_pipe *pipe) > { > struct mxsfb_drm_private *mxsfb = drm_pipe_to_mxsfb_drm_private(pipe); > + struct drm_device *drm = pipe->plane.dev; > > drm_panel_disable(mxsfb->panel); > mxsfb_crtc_disable(mxsfb); > drm_panel_unprepare(mxsfb->panel); > + pm_runtime_put_sync(drm->dev); > } > > static void mxsfb_pipe_update(struct drm_simple_display_pipe *pipe, > struct drm_plane_state *plane_state) > {