From patchwork Fri Jul 20 21:15:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru-Cosmin Gheorghe X-Patchwork-Id: 10538385 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 85516603B5 for ; Fri, 20 Jul 2018 21:17:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 762A9297DB for ; Fri, 20 Jul 2018 21:17:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 697832980F; Fri, 20 Jul 2018 21:17:12 +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=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 16477297DB for ; Fri, 20 Jul 2018 21:17:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B43106F0D2; Fri, 20 Jul 2018 21:17:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-ve1eur02on060a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe06::60a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0B3CD6F0D0 for ; Fri, 20 Jul 2018 21:17:07 +0000 (UTC) Received: from e114479-lin.cambridge.arm.com (217.140.96.140) by VI1PR0802MB2557.eurprd08.prod.outlook.com (2603:10a6:800:ae::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Fri, 20 Jul 2018 21:17:01 +0000 From: Alexandru Gheorghe To: seanpaul@chromium.org, airlied@linux.ie, dri-devel@lists.freedesktop.org, liviu.dudau@arm.com, brian.starkey@arm.com, malidp@foss.arm.com, ville.syrjala@linux.intel.com, daniel@ffwll.ch, gustavo@padovan.org, maarten.lankhorst@linux.intel.com, alexander.deucher@amd.com, christian.koenig@amd.com, David1.Zhou@amd.com, harry.wentland@amd.com, andrey.grodzovsky@amd.com, Tony.Cheng@amd.com, sunpeng.li@amd.com, shirish.s@amd.com, boris.brezillon@bootlin.com, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, inki.dae@samsung.com, jy0922.shim@samsung.com, sw0312.kim@samsung.com, kyungmin.park@samsung.com, kgene@kernel.org, krzk@kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, p.zabel@pengutronix.de, laurent.pinchart@ideasonboard.com, maxime.ripard@bootlin.com, wens@csie.org, eric@anholt.net, linux-graphics-maintainer@vmware.com, syeh@vmware.com, thellstrom@vmware.com Subject: [PATCH 07/10] drm: rcar-du: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Fri, 20 Jul 2018 22:15:06 +0100 Message-Id: <20180720211509.23605-8-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180720211509.23605-1-alexandru-cosmin.gheorghe@arm.com> References: <20180713161407.GQ20303@art_vandelay> <20180720211509.23605-1-alexandru-cosmin.gheorghe@arm.com> MIME-Version: 1.0 X-Originating-IP: [217.140.96.140] X-ClientProxiedBy: VI1PR0601CA0017.eurprd06.prod.outlook.com (2603:10a6:800:1e::27) To VI1PR0802MB2557.eurprd08.prod.outlook.com (2603:10a6:800:ae::7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1f022b07-eb30-4d31-b6e9-08d5ee862355 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600067)(711020)(4618075)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:VI1PR0802MB2557; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0802MB2557; 3:QR4R8ginYXDSYKZdULXZZGYeCsPMvr2Drk1NPh2V36gNFyVzVwc1hE0w1cILCh9fodjp7EOt5AVwlE9frMt8Dx2wppPFLnJvZ8OV0hHKtS9oYRdC3bVhqqYayelcpF9fyAAoxJsY63S9Mghr/OBe+jxRWTTG8MuMgxqovAxj2fkkV0PlHpDpoNle57d+SzsjuwbiwVgDRvfVhd1IwNVp0ZWdnzHcJBJdpgzKyQg4RIystjX4dq5uJbjLDu8h8IX2; 25:pATlU55bo00C+Mwn215EN3x+oypslVFL/LBwSQ3ts83loUWXw4NJ2gybMrS7Gz59XLyDs1x1UzktgbuQRxHZ2JL3PsfuJbgFv7tVeS0umIDBecUO4hgpk5hLpUqqS1K2XndSZgW7l38chJtx2VTFTPzwfPzKu9yM2XgGJKdv27Uw61AedevBV6qyiHIbAaZKWW5ZcAry4Bp0KHBD+rhTfFMR/P9KQ+DP2QRX/FQ+XK2awXHYF1AsPPGVRnuD2a+tXIdJHkDiWIK+OF51Sq1T3vkvUlavNaYhmNj27tHcjuVfoue5pygJPSIuy+vaoyqp+OqTTujhK4+OXkz+LH+xlQ==; 31:gSWQmsLA4me838z8ysm20PpYflSGsM90XefIaA4IXCOuVbcXl1Z50V/2GVH7g31BbWpRKEP2OIyJWhwL+7+0SA85VqhSd35Pnvg6T/VY5451kme+Ac+KryMoPN/Fm+MPkQa0xBTb5fPmfoj0mGSxjep+Iq8DZmUfNhY5151N81OjmgCEURPZ10C8Z1x3kFNPhZHlTRnxYpuZyWFWenUsscylM3TXxSH9/GvHUuKiO+A= X-MS-TrafficTypeDiagnostic: VI1PR0802MB2557: NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; VI1PR0802MB2557; 20:SnR1rx0rsIAgX4WGK4lnRgtbNoyhtTTML0mxgs56r07YD8GBmOoRfj20JxISCRjDDpBs6/U6lF89NKCXqBtdNH2QSy64TbzJhHybiKIhjLhJ4YhlGvCTD3R5+zpB5cCXM6/DcvdFydpkmIO9mLSlVub3LgCoIEUEo9fqTrFSRRZ37mb9Fa7OUsxfdoeBBp3K0Qclf0+3idONpoBiKc98M4VmbrPgZvwVwL8wPXY0tSGrwevuwRGvi1oL5c32OwY34NsN6AUg8d4ETa/w3mDnd6yJINzJdtwm/RmaVUq0/3rIomqrXR4r6XxcXNUJQt1kld5hsrdKJzjnPwShtc0YeA==; 4:Iyh2OyczEXg4bW2WUOVWdtrbXjyLFYDRwvvq+InO3pIIjuStnwz8sCr2mWjjJv2DSlfV7d7X1orQnR8XRpROl1FffoFyzHG8ZW+eenyXT1JAxXAirXUQeksf1v+VPXif9kqRafk1pMsjHikW6ZYFOJx+7mw0yOU5LrFpbT/6XexkUF/6mR6n6TUMddXkarOj1q9Bu5Q4HGGGfTwLHWnh+iK+9aJLrEEFIOB7z0k2vTPPObxhaC/y6OqrUfRzLlO8xlPjKURdHXWV0yJzmVN6zo3bVO920R4JaUAD/CgWv5n79OBvGXqPu50BtBnyTwrk X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:VI1PR0802MB2557; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0802MB2557; X-Forefront-PRVS: 073966E86B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(376002)(366004)(39860400002)(346002)(396003)(136003)(189003)(199004)(6116002)(316002)(305945005)(478600001)(25786009)(3846002)(53936002)(1076002)(7696005)(51416003)(52116002)(76176011)(7736002)(72206003)(4326008)(66066001)(6486002)(47776003)(68736007)(5660300001)(7416002)(7406005)(36756003)(8936002)(446003)(50226002)(50466002)(106356001)(16586007)(8676002)(81166006)(81156014)(2906002)(48376002)(105586002)(26005)(86362001)(575784001)(186003)(16526019)(97736004)(486006)(11346002)(386003)(956004)(476003)(2616005)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0802MB2557; H:e114479-lin.cambridge.arm.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0802MB2557; 23:Nd60Df9sFeO6+b1fB1l5kvXJaWcxTlQyN1BEV/v?= =?us-ascii?Q?Jzh1hWHCyvLkeyT89pNP5WPSCZ3/wAMwJKe63/+ZPwQw1cYP9br5P2GcqLKv?= =?us-ascii?Q?8IKItpBCiTM8NNzlznrs95zHxFjxK7zdkArLyugCINL0FMk9ajMm3tfqxQJZ?= =?us-ascii?Q?ewVulgSbXqN+v8lHUEKZSZ8YOdq2j7f3vnPQk9FKFDJUkzQzeyft6Pm1Peam?= =?us-ascii?Q?IdxRnZQjo3bKExfRo0TB4ghQG/S9GYWj6gZJrUOt4d4MqIslANZv0zRNj7EW?= =?us-ascii?Q?vwAJTKT/gD5bqyYi43nvMQVFAeTNAx3gJOcAjF3b3QhBxx2QU28FALRrypH2?= =?us-ascii?Q?V9VFPsLs0+WuEZHmAFwxVYO8IX7XcRYqgPtbdIJ467Fz3zu/X/8ncEtuS4II?= =?us-ascii?Q?dtQzI5YmCEjR/f1OZ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antispam-Message-Info: u7v/tb56BCognkTSfPvS07I0C2kqK43+rurPRjKfJ0XMaTZ/9BifeCtBHYjdWeAQ3Yc9sYVOoGtmeQ43mEqGzW77b40Aum8HS1s0cNZyv9a3bT08au8hELZq78yKXw8Jth6aAcF7iumTkx1Rts/L61vh2deijGw53hTLj8JaZaCGHcXDyWlJCa010zffaaxXf9wBgjdZEQJKcittxoyMrKhYs+mVhAW1adLsc6BPHQgAiXoID8Ony/erQeLEcb5HrYsgfGX636u+oBZtNZ6zD+YbCSOPT88VdyI2hGTC7Ue7835C+QMM02VDK77TWb6a+pOTj6DK9YEVuOzlZLTGG97ejjaitHiEqYr6SysmmnM= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0802MB2557; 6:01+VxvD0fPWmlZqmxxijXYGw+CF7IED7+zqoWJ42PZW/AOqSWPZUVN0/ifbAI3xeFse4JGvUTem8GTpKNp7opu94p48k+X4uKaaad+a4iScHzf1czBHMi1IlINiPJ5Eo5qyrTqpmCggRUEnuqmL81UIFEjCyYAFu8Wt6qS8OP0x2nRAJeQdpVcqqIMUeUBvqyp2xx1CeFTHD+3D5QC4QdzbTsDXcWgcjT6OpzRNhyPcijmvZ9BqUHT9ER87Bc2yKDRTRD99xyaMwJtHZHHwsmlW8OAQqZeVgoLmcs/0Ga9hHzsnmcxCOyXdjFXoSF4qY04F8mqYDp2klfridha3cDmieX4hIJiTYGm0yvN/DK+pm/q08tJoxcYa8+EaWgplmaDi6L6RZZuWilTs3FXGL4uVSvtPFS4xX4KvXkKs7XTiCVYGWsDfoqJNNoDwwVae0W2VUPkPGf4A0AAL0qXwkUQ==; 5:p1RAkCJL7n048as83/NJYsdyJciN+4112DQn0JgbPSnlPKuGCgJizgDIqk/1GegJOWHLba4OuNdAPfgkTP3wykZa6m0z6/REtNmk+7i1P0UAUQmyQUw/fye213fx3hsyW2oBet59rVv3gASD0D7MZqAi9mE1g5gLf/LcJQMChCw=; 7:sLyWNPhzjr5evTidtW6cwXyj13qNva1rr1uM+YDpOyyBE2SeEwoYseMZiJh9iJ/8Ywcl5H4w0mhr5C0bSEF+30+thTkVsDGY51CoisNFicLmmBru8g4H5SpuFbpwcgAWpTJ2Vdcng4B09ZE9BLeGfcUiSsPiTQLTy1Ttf6qH+GLvZT+7uTsAGVZq6LcG1V6PbynmXlEqdcWnAo2e+fAzUT4kfEi5eMYCMbVvyN0LwGHCYzK8Ba6H4i9KBYHkfOZc SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2018 21:17:01.4735 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1f022b07-eb30-4d31-b6e9-08d5ee862355 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2557 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nd@arm.com, Alexandru Gheorghe Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/rcar-du/rcar_du_plane.c | 4 +--- drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c index c20f7ed48c8d..19a9d5f6db1c 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c @@ -689,15 +689,13 @@ static void rcar_du_plane_reset(struct drm_plane *plane) state = kzalloc(sizeof(*state), GFP_KERNEL); if (state == NULL) return; + __drm_atomic_helper_plane_reset(plane, &state->state); state->hwindex = -1; state->source = RCAR_DU_PLANE_MEMORY; state->colorkey = RCAR_DU_COLORKEY_NONE; state->state.zpos = plane->type == DRM_PLANE_TYPE_PRIMARY ? 0 : 1; - plane->state = &state->state; - plane->state->alpha = DRM_BLEND_ALPHA_OPAQUE; - plane->state->plane = plane; } static int rcar_du_plane_atomic_set_property(struct drm_plane *plane, diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c index 72eebeda518e..0a0aa490f805 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c @@ -346,11 +346,9 @@ static void rcar_du_vsp_plane_reset(struct drm_plane *plane) if (state == NULL) return; - state->state.alpha = DRM_BLEND_ALPHA_OPAQUE; + __drm_atomic_helper_plane_reset(plane, &state->state); state->state.zpos = plane->type == DRM_PLANE_TYPE_PRIMARY ? 0 : 1; - plane->state = &state->state; - plane->state->plane = plane; } static const struct drm_plane_funcs rcar_du_vsp_plane_funcs = {