From patchwork Mon Dec 18 14:57:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 122222 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2936483qgn; Mon, 18 Dec 2017 06:58:32 -0800 (PST) X-Google-Smtp-Source: ACJfBovA9JpSaBUdrOLJO1DQ/lSpUyWZrgYOZUinF0oQ+gtIz6ApOwnKs7TcONHdLaxIUpTmKZ84 X-Received: by 10.99.44.14 with SMTP id s14mr19319pgs.4.1513609112795; Mon, 18 Dec 2017 06:58:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513609112; cv=none; d=google.com; s=arc-20160816; b=lDFG6duro7/OuTsweOU/kjZlEc2Zluvk3imCLX9PWubZCiR6HeELQPQlu0oIH02yxd KJLQvXUIb2qeW3JoaiSD97mKE+w8F2cCiFeJM9L5TcOuhKh6cVv1+QIqUpKQl4CCxFi8 OfGixr5qNYsSAHTuD5hQmYgbhL2mKYjMCCt5S2ZPp6htASJhxHQuKIVuvnI7TJh0C+LT PSfL/ZD2O+5XJL+rYoRhqZcm9vL9DbpoU/goBa2d/bbBAcKpTWEdHytCSPbXNsQhXEfq ToDeQoD3J5oEyorJZuaQzRDe73g51l3yPp/1no6GJ1l+7MqFn1DZwxOGtu9ug9QFH9ex 4//g== 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=RWjqvMiwFMO049dc1Z/Hf0iaZO20mBgth5i+A7Q+FKA=; b=E5BX8xrcQLlh/gZCZylQDrOcU793H6JTK3sEajJ2bjWfXh3mYqJD4Mmvf78SluzBWp lj2IpJDeu+OtGZ73AN2XLkzVOjU2hV0gWz0B0Eyl2hokIN/f1dmYOdI+IakfCHvXnJHP LuC8LM4T6MHe8nGIh1PHjuSM/v3l8kN/i9FSXvapY0TNJhsXFZOvJP1aMPQDKhqqhJnS YiftlfGer7ptWYh7tlUwHVoBybW28sgCuI/06ObmzJM+jwOl9cVpXW7ycmTdrGsbjq2M 6oUuPNdCvpALFnM/o8vX0aSM7FjXzwKRxPAAT+5G/zqZk6J7Oj2mC34gUYBOZLoSJcm+ aQ1Q== 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 m32si9541335pld.667.2017.12.18.06.58.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Dec 2017 06:58:32 -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 839816E1C4; Mon, 18 Dec 2017 14:58:10 +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 DAE0D89D67 for ; Mon, 18 Dec 2017 14:58:08 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id E77982092B; Mon, 18 Dec 2017 15:58:07 +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 BBC0620378; Mon, 18 Dec 2017 15:58:07 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v2 10/12] drm/sun4i: backend: Use runtime_pm variant of atomic_commit_tail Date: Mon, 18 Dec 2017 15:57:57 +0100 Message-Id: X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: Thomas Petazzoni , narmstrong@baylibre.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, thomas@vitsch.nl 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. Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai --- 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); }