Received: by 10.223.176.46 with SMTP id f43csp2683412wra; Mon, 22 Jan 2018 01:31:54 -0800 (PST) X-Google-Smtp-Source: AH8x2264R/I1oU/IL4VpbSElZLBsU8eJ1tj2qLfbq72pKZNyjQzsq3+FfA2RVEK2/GmSLUJErhOp X-Received: by 2002:a17:902:b195:: with SMTP id s21-v6mr3055071plr.230.1516613514790; Mon, 22 Jan 2018 01:31:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516613514; cv=none; d=google.com; s=arc-20160816; b=gBsp6YvoAvBYSpGlb2fDkAuasbO3NclrifKHoXvxYQq54Z+GREd36hwfAb8x1NT+tK Rnum4zgIQ+p4UXw2J+ZTzRbINGFxJ6R3PHInpAOJiE2Vi5W7mmfDXfFV5DTglFDVjefd OETlOnbBkI8kUc/vqZB4mrsqSK0VJHENoUN3N04iVbHd0DH95xE8RzO01wC2yFpJqfxz UZ/BoH+cS8xlhcE13XzKG/srMzfBSU3dGzd5gg9WVFR2ZbtAAjgmqHT11WzeYcGVfxDV 7nJWbYlw7s+kIU6CbeKFkAbQJmhgOLT1eBDXVHxdViwSETZAj8XJXFAovL6LF+cD5bW+ fFBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=1VnqwqnSHKnEk2Xjnimny25mmDKJ1Dv++O9t4drEOvs=; b=vM9gaL2R4CtWeyJY0maRr/mMpPf7JgDFcE/0NGU4ZQBEvafeQlzVXJHjw82vhY6uvD +MvRnInZdu9ZpXvOoHeyT+u+xauZ9EchPUgZ9pT8LYa2n9uaMrrzL/LRypQlkjE7tRgr HvQ/Z9cOBxe88Hh+fG9DcJKEEsqmihMaz/Yk1BHjPbUPh/Fc+cSHUV7UPXmfACwl/BQm MpZwWTQTXuUusvXWPsJgncx5W12hz2izDpkKPeXD0wacj45u7P595KLqs/L12JJsoZm9 pOlhdl05k3zhujh19qq0ei7n1yl6zGjiAIhjIkvmL6SvDfEGsWUVPg0VopI3iWb9GptK thnA== ARC-Authentication-Results: i=1; mx.google.com; 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 d199si14124666pfd.387.2018.01.22.01.31.40; Mon, 22 Jan 2018 01:31:54 -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; 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 S1752461AbeAVJas (ORCPT + 99 others); Mon, 22 Jan 2018 04:30:48 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:44152 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751945AbeAVJZv (ORCPT ); Mon, 22 Jan 2018 04:25:51 -0500 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 Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, narmstrong@baylibre.com, thomas@vitsch.nl 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: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); } -- git-series 0.9.1