From patchwork Fri Jan 12 09:38:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 10160777 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0AB7960327 for ; Fri, 12 Jan 2018 13:08:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F05EC287C0 for ; Fri, 12 Jan 2018 13:08:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E4B44288DF; Fri, 12 Jan 2018 13:08:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2AB34287C0 for ; Fri, 12 Jan 2018 13:08:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5C0A56E872; Fri, 12 Jan 2018 13:08:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 1367 seconds by postgrey-1.36 at gabe; Fri, 12 Jan 2018 13:08:04 UTC Received: from fllnx209.ext.ti.com (fllnx209.ext.ti.com [198.47.19.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id B2EBF6E872 for ; Fri, 12 Jan 2018 13:08:04 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w0C9c6Ke018484; Fri, 12 Jan 2018 03:38:06 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1515749886; bh=asNlhYLmnmK0DmlmZ8bMMh9C/yQohXE2bFDLVgh+2FU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=MZ0myE4HMOoMWDDgxoGAIaXK6qEUUy8tA4eOJrop78n0Xod+3+bCmN+AKOTNFqlMn +06ulqgsJQzHbxKDdIUTkQRjRvglMeBgyM6J8FBZII2rVuMmspDXAaukeGEm9JrUo1 HSuTxLCMgPnWH6yQTWd9O1f7nGwh0kwv5qPKRHtQ= Received: from DLEE101.ent.ti.com (dlee101.ent.ti.com [157.170.170.31]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w0C9c6VP012412; Fri, 12 Jan 2018 03:38:06 -0600 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Fri, 12 Jan 2018 03:38:06 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Fri, 12 Jan 2018 03:38:05 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w0C9btdL023742; Fri, 12 Jan 2018 03:38:04 -0600 From: Peter Ujfalusi To: , , Subject: [PATCH 4/6] drm/sti: Let core take care of normalizing the zpos Date: Fri, 12 Jan 2018 11:38:07 +0200 Message-ID: <20180112093809.15819-5-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180112093809.15819-1-peter.ujfalusi@ti.com> References: <20180112093809.15819-1-peter.ujfalusi@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: Vincent Abriou , dri-devel@lists.freedesktop.org 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Instead of re-implementing the drm_atomic_helper_check() locally with just adding drm_atomic_normalize_zpos() into it, set the drm_device->normalize_zpos. Signed-off-by: Peter Ujfalusi CC: Benjamin Gaignard CC: Vincent Abriou --- drivers/gpu/drm/sti/sti_drv.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index 55b6967d27e1..a0ffbb1ea3ba 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@ -119,30 +119,10 @@ static int sti_drm_dbg_init(struct drm_minor *minor) return ret; } -static int sti_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; - - ret = drm_atomic_normalize_zpos(dev, state); - if (ret) - return ret; - - ret = drm_atomic_helper_check_planes(dev, state); - if (ret) - return ret; - - return ret; -} - static const struct drm_mode_config_funcs sti_mode_config_funcs = { .fb_create = drm_gem_fb_create, .output_poll_changed = drm_fb_helper_output_poll_changed, - .atomic_check = sti_atomic_check, + .atomic_check = drm_atomic_helper_check, .atomic_commit = drm_atomic_helper_commit, }; @@ -208,6 +188,7 @@ static int sti_init(struct drm_device *ddev) return -ENOMEM; ddev->dev_private = (void *)private; + ddev->normalize_zpos = true; dev_set_drvdata(ddev->dev, ddev); private->drm_dev = ddev;