From patchwork Mon Jan 22 10:35:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 125378 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1081000ljf; Mon, 22 Jan 2018 02:36:05 -0800 (PST) X-Google-Smtp-Source: AH8x227BD0q0qjiRz8Es3aqxXiOua+8L8tkGCt8XB36IW7UDD6A7d87abTV7Z7y+K+uD9DvfBUsp X-Received: by 10.99.135.195 with SMTP id i186mr6813126pge.418.1516617365316; Mon, 22 Jan 2018 02:36:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516617365; cv=none; d=google.com; s=arc-20160816; b=KV321xBMbka2n83fjRuMjb5LuXtS7WUtB3TvqRA9s5kOT6ycbTFhzXLpP8dpj8LZbV skW+F9y3BbmuoxeDYWopN9A3RYxvhW8btdcFWs13U59d5wBwuDnejugV3WoKOpXMx5oX hBQd/2mkjL9bT0N2qU02h22Gz11B4eC06hF002peLmVpUSE/y5mdMtO/9ol6q0PiQGfI MBITlSx8bTSRQ0PjSoQmuTbpDRrY6pylXu4ljH2o4Q+SkhRxYQJ3t5icj+yKkJUn6ppo FLi03gQIqhegA5S/C7WZAVs9vZfiiCeb6XC5kR2/aDXVBgQDCFyCmHHy+WcyqDt63jVf YMaw== 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=IwyDn3wqGxib/AHgRNJ3EkWRwU/jOF1XqgWAaoEW5Q4=; b=bpbcTrrPt8JoSILeGXqT4vnqj6N6GCcYJilzXz+/jcNXXbdzW4MMwAp+WrprhRtUO5 ikN2wQixMpXC5lCNXd1gKp7y9sA6lakhGf41rjCZhqe08TTYRJ6LCP95SlTXUxMaN2ay o6OV5oEUvf8CmXt1PERrQL/4pX1EnI2R/tuXNrEOeiIDv+F+3VQo3DCQ4yQpdSFllBeI /x/W4rNaVxfKo2xvtN24kFn39Refgd0IGVK/gxlvWbPPFyiNfivoWOpj5LlucrPXsq1E kL5PQRyoJRJYd2zD5QW9s0KhpomFL/mch6FQBuLfUFPw4i+6aCNxuhc6jiinIVISs3bS TTtg== 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 n6-v6si3297016plp.562.2018.01.22.02.36.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jan 2018 02:36:05 -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 4DA776E132; Mon, 22 Jan 2018 10:36:02 +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 690156E13F for ; Mon, 22 Jan 2018 10:36:01 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id C0DDD207A4; Mon, 22 Jan 2018 11:36:00 +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 9020D20397; Mon, 22 Jan 2018 11:35:50 +0100 (CET) From: Maxime Ripard To: Chen-Yu Tsai , Maxime Ripard , daniel.vetter@intel.com, jani.nikula@linux.intel.com, seanpaul@chromium.org Subject: [PATCH v2 11/19] drm/sun4i: framebuffer: Add a custom atomic_check Date: Mon, 22 Jan 2018 11:35:40 +0100 Message-Id: <67cb4ca9889e6bf29314db37127ff15eed279c53.1516617243.git-series.maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.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" In order to support normalized zpos, we need to call drm_atomic_normalize_zpos in our driver's drm_mode_config_funcs' atomic_check. Let's duplicate the definition of drm_atomic_helper_check for now. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_framebuffer.c b/drivers/gpu/drm/sun4i/sun4i_framebuffer.c index a01a5b7d46e6..e68004844abe 100644 --- a/drivers/gpu/drm/sun4i/sun4i_framebuffer.c +++ b/drivers/gpu/drm/sun4i/sun4i_framebuffer.c @@ -26,9 +26,21 @@ static void sun4i_de_output_poll_changed(struct drm_device *drm) drm_fbdev_cma_hotplug_event(drv->fbdev); } +static int sun4i_de_atomic_check(struct drm_device *dev, + struct drm_atomic_state *state) +{ + int ret; + + ret = drm_atomic_helper_check_modeset(dev, state); + if (ret) + return ret; + + return drm_atomic_helper_check_planes(dev, state); +} + static const struct drm_mode_config_funcs sun4i_de_mode_config_funcs = { .output_poll_changed = sun4i_de_output_poll_changed, - .atomic_check = drm_atomic_helper_check, + .atomic_check = sun4i_de_atomic_check, .atomic_commit = drm_atomic_helper_commit, .fb_create = drm_gem_fb_create, };