From patchwork Mon Jan 22 09:25:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 125360 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1054020ljf; Mon, 22 Jan 2018 01:26:29 -0800 (PST) X-Google-Smtp-Source: AH8x226yWeZ4+KBo1txFcOEfhtt0GCPJrAK3PSDLGXr9THtOMGNMUycb/x+zH6Bq6mfYFJd96DCb X-Received: by 2002:a17:902:b947:: with SMTP id h7-v6mr3088045pls.82.1516613189325; Mon, 22 Jan 2018 01:26:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516613189; cv=none; d=google.com; s=arc-20160816; b=WfpMPR1ySbTZ7C+4Ngq7pHBfIlSqefh0LrHpU5+BCes3hnkzY1jLGpJr7XCSjSB3M8 GydQgiYYS7OI58qg1WuFQ+W0J+5qLNAYftLWYqGzYh1ZL6LMoy6lxWttTAZHjcDOimAC aj8mNNHU+MTRpQLV4rhKFjTue1ik63PJcC56/wkp00gmpaMuXXW1p633BOnqeGqdccca 7if3+9tx5ip3u2KbV6ScFgOyAaJli8SFDL5uzDOkvqeKW+1cozklIsgVEudx7ExwS1tB D8nR/Ag3r5XBt9qOP09uQxko//rxcPGI0SsqxmuMEKYgvx4wHUv2ni03kpklQGdAcNpq 2i/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:cc:references:in-reply-to:references:in-reply-to :message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=iPOFJ1Zr/6qlcbmWO52Y1rNZKLf3RYyXVRg3re2HjPM=; b=HtfJHirIXL7F3+BGnm8LwmYFwvNu3+BTlHFZF5j8fdtaDjCEm7wX8wJ+feNAfUT6c9 /gbHwQnFHyw1zgN74FRKfOsjEeHvptkjtIo9IGbF3c+koVgXbJHuL6fon1pg4QRjgVjm tfoDhpJ5p5AD7LgfTTcTOH/ghIOGkYr9bvePcDQ4jWddOqzG7pUQ6n66+6SYvwNH/JcS Lp5csi7bnsBIixUXel/ZZMRRKNvLZWFQGZ7+Hx1RWTtwezKMSa9Uegjy3Br95S0raKwR vcb6dByRrWHI7Tu71zaDmV1DAYl/xOJB5YMdHR9R7F08Jznuswh8g15X+ArV1AIi/yap BLyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id v184si13416435pgb.832.2018.01.22.01.26.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jan 2018 01:26:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 47A746E190; Mon, 22 Jan 2018 09:25:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F3266E18F for ; Mon, 22 Jan 2018 09:25:50 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 068C1207A5; Mon, 22 Jan 2018 10:25:50 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id D6C38207AA; Mon, 22 Jan 2018 10:25:33 +0100 (CET) From: Maxime Ripard To: Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v4 11/13] drm/sun4i: backend: Use runtime_pm variant of atomic_commit_tail Date: Mon, 22 Jan 2018 10:25:25 +0100 Message-Id: X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: linux-arm-kernel@lists.infradead.org, thomas@vitsch.nl, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, narmstrong@baylibre.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" During a hardware commit, the commit bit in the backend will only be cleared if the TCON is enabled. Use the runtime_pm variant of the atomic_commit_tail hook that makes sure that the CRTC, our TCON, is enabled when we perform an atomic_commit. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun4i_framebuffer.c b/drivers/gpu/drm/sun4i/sun4i_framebuffer.c index 2992f0a6b349..a01a5b7d46e6 100644 --- a/drivers/gpu/drm/sun4i/sun4i_framebuffer.c +++ b/drivers/gpu/drm/sun4i/sun4i_framebuffer.c @@ -10,6 +10,7 @@ * the License, or (at your option) any later version. */ +#include #include #include #include @@ -32,6 +33,10 @@ static const struct drm_mode_config_funcs sun4i_de_mode_config_funcs = { .fb_create = drm_gem_fb_create, }; +static struct drm_mode_config_helper_funcs sun4i_de_mode_config_helpers = { + .atomic_commit_tail = drm_atomic_helper_commit_tail_rpm, +}; + struct drm_fbdev_cma *sun4i_framebuffer_init(struct drm_device *drm) { drm_mode_config_reset(drm); @@ -40,6 +45,7 @@ struct drm_fbdev_cma *sun4i_framebuffer_init(struct drm_device *drm) drm->mode_config.max_height = 8192; drm->mode_config.funcs = &sun4i_de_mode_config_funcs; + drm->mode_config.helper_private = &sun4i_de_mode_config_helpers; return drm_fbdev_cma_init(drm, 32, drm->mode_config.num_connector); }