Message ID | 20180726161756.1794-7-alexandru-cosmin.gheorghe@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D35A1112E for <patchwork-dri-devel@patchwork.kernel.org>; Thu, 26 Jul 2018 16:18:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C19F82A514 for <patchwork-dri-devel@patchwork.kernel.org>; Thu, 26 Jul 2018 16:18:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B53BC2B891; Thu, 26 Jul 2018 16:18:57 +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 4D95A2B855 for <patchwork-dri-devel@patchwork.kernel.org>; Thu, 26 Jul 2018 16:18:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 37BC86E7CC; Thu, 26 Jul 2018 16:18:50 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-he1eur02on0616.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe05::616]) by gabe.freedesktop.org (Postfix) with ESMTPS id D3A616E7CC for <dri-devel@lists.freedesktop.org>; Thu, 26 Jul 2018 16:18:45 +0000 (UTC) Received: from e114479-lin.cambridge.arm.com (217.140.96.140) by DB6PR0802MB2552.eurprd08.prod.outlook.com (2603:10a6:4:a1::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.20; Thu, 26 Jul 2018 16:18:42 +0000 From: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com> 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 v2 06/10] drm/imx: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Thu, 26 Jul 2018 17:17:52 +0100 Message-Id: <20180726161756.1794-7-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180726161756.1794-1-alexandru-cosmin.gheorghe@arm.com> References: <20180726161756.1794-1-alexandru-cosmin.gheorghe@arm.com> MIME-Version: 1.0 X-Originating-IP: [217.140.96.140] X-ClientProxiedBy: AM0PR07CA0031.eurprd07.prod.outlook.com (2603:10a6:208:ac::44) To DB6PR0802MB2552.eurprd08.prod.outlook.com (2603:10a6:4:a1::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 70dfcebf-a9f6-4cec-9c91-08d5f31374f9 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600073)(711020)(4618075)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:DB6PR0802MB2552; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2552; 3:KuE9Xq+PviUwOBlyNTp0Iz6NXD3vaP65qxT68bIy1VAKAp9xf6+RnS/BbLFO964g8azilPZC40AD4u+qMsVIRq+gOfcCOhK6vCAAp/j8UdRSTWXF3EBkd+a6Y5SwvtFt0j3oKLR6mdEG/FRiy2QVC5dMDxwNNS4l7ClOOcREDDMsqcTJ3JX6MmF85HAcEKUEf8z9Ut+WYQBz5lhyLiHUG8B6hzsbIYjxMSrcuCJmBaoqxyYvUg9qy+0gdDzDrDMI; 25:0HhdN04fXJMrzLxs0b2Bg6bw9zLi1dSiZwvA5Nk/yHjAcrYQxGokTeIBo1+w2GDeiwO0EKluSkZUZvZ4+bnd3qF6zWr/LEEjcPkWFUEu+zQiq5qw+DeCOtbjGd2yFJ5hpJS3e09NCtp/ryHO0L6x5tQPsYHM3YfTOM6wAGwS91HGoZtOjsu/HnoU+KT84GM2qW8K6TUxi45xAAB+62JepxicFtt6Vvn2xxFWoW9jCNYxbdUZ/Y+/1QO1/94+5xSK69G8D/h92SsLZM8L0Gio6h5VHkKhrtqvZNp/qOq6JXlctYis1Rqx7bFY4N+trupS/dUMUQxoKJY3ftj7DV9SeA==; 31:QRzDJ9xtuYdO6feBNhPBNI4bQpu0lzQTFReN8zNA2JnuA9A3QJdnzBzFuM+wb3DNQdpCyYz6Q3S68WimQxs5cYfDSzW2chuKbl1IERUbHm1yi5wKSB3LIwKUoVv8DUIDRgwixxIsRdc4741vOQK96NG6dw/49mpcElKt5qlvYTbdZEyxaRn5BZ1am+VKuoAYsu2Ep+8kZQM0tsKhkrtTozsI9wP8rRnJkSpN4bBi14w= X-MS-TrafficTypeDiagnostic: DB6PR0802MB2552: NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2552; 20:NTmuwNUDdsd2vQWvtrkxgIxQUgaffnT7KvjNoKBfiSa4DSmd21hfgVjnIOCNwoNqMx30sDCzm5xUqEib1Xzod1OLSW1uI1oBf9bU1j+YrWluRC6xSLbLyxEKFXIFnBfeMHQjDsxOYk6K0P81CsAoSIiLhV0+dkUyqh5r90SHBXnyntGtIrcBBzpsapZxhQCtK6ht5Z/Rm7Q5TfzA4AicPwzrVaf5vJd4i2MGuBD5S+GMoysqOZNff/wGy3O2B2ywYA+iRFfsfEp+MNpxexF+N0rdSu3QsU/Mg7wSrkwW53t+uiYUz786ElJ4nJUe06xV5Ju+YNd09OJQ2K6EBao86w==; 4:VJ+r0hz3Xvjc3FeC5kijPFO/1lyhZSQH6zZGvNjpyjNm3A3uZxe3yLRX3/PtDbyVL5KFwwnj24F3LGjEKOxC5IuQtLhyDKINuy/MTLygNExo7eXsJVOFwgcIqaOCef2oDEifQEjXUiWPLvo1aIFZncaRnKDNKUxKnnMhmop1yN1ANSj1zNmEB2RRgxTDYVSDed9kLyU9AdsCBNkMOvnpZ9SMWyd5iTcdUsyJ+EbX+fbkB3kB801LS/mndbiQPRJ539HPeFjX+3q8hOhGgGVvma1pEDsta+qRpX/VA/2JTgMmKGihV8Xt8BdNFvOkUWbH X-Microsoft-Antispam-PRVS: <DB6PR0802MB255264206B8CB650E5A39A10BC2B0@DB6PR0802MB2552.eurprd08.prod.outlook.com> 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)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231311)(944501410)(52105095)(3002001)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:DB6PR0802MB2552; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0802MB2552; X-Forefront-PRVS: 07459438AA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(39860400002)(136003)(346002)(396003)(376002)(366004)(189003)(199004)(105586002)(305945005)(36756003)(8676002)(478600001)(476003)(2616005)(81156014)(81166006)(486006)(97736004)(50226002)(16586007)(68736007)(316002)(72206003)(956004)(25786009)(7736002)(66066001)(106356001)(47776003)(6486002)(52116002)(2906002)(86362001)(446003)(1076002)(50466002)(7406005)(11346002)(7696005)(3846002)(51416003)(6666003)(48376002)(53936002)(6116002)(386003)(26005)(8936002)(5660300001)(4326008)(76176011)(16526019)(7416002)(186003)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0802MB2552; 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; DB6PR0802MB2552; 23:R1cwiB6SBbBJ/vD2wJJchVjm6cdmAthqwq0YY/X?= 9A0Jyj5ibn9Sx92Ouy+BRDZpKfi5QoLytQXnLMvd8xgN0In2uwCP5nJGNSGiTFuQGV0isQkTkE7RoXVmTHTo2wRDWVgIrOVdHdlyqBCP2GQgtEsprVnftxt6+cdLs4r9UiS1MlRBxvYPV7VgXHX28afiQPmwzQi6se+nxu+Y5RArUm2/EwlzeTNp9zTmczShyiCD7IyXYR5tFgYwV4mX01Eyhoicp+fv+EJJxdP2hrjFhCBIs9rawOs3iyzLMqRVd22fKRZTkauwUVqklAeaoUJnIt8iXl4YIPhmAywrEv/uDuPtOm4FXcBcKuTNyvW4SI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1+HDVXOUJQ2wG1H6Z2/H2qnyidFnRrcDjYyLWcT+NUfw1UCT76GnuOdrRGekJM166Ej9oXGiP4haCXX39yHR6CW3gLizFge61NkasXQlBn SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2018 16:18:42.0975 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70dfcebf-a9f6-4cec-9c91-08d5f31374f9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2552 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: nd@arm.com, Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Add helper for plane reset
|
expand
|
diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index 203f247d4854..1bd4de03ce9e 100644 --- a/drivers/gpu/drm/imx/ipuv3-plane.c +++ b/drivers/gpu/drm/imx/ipuv3-plane.c @@ -281,16 +281,14 @@ static void ipu_plane_state_reset(struct drm_plane *plane) ipu_state = to_ipu_plane_state(plane->state); __drm_atomic_helper_plane_destroy_state(plane->state); kfree(ipu_state); + plane->state = NULL; } ipu_state = kzalloc(sizeof(*ipu_state), GFP_KERNEL); - if (ipu_state) { - ipu_state->base.plane = plane; - ipu_state->base.rotation = DRM_MODE_ROTATE_0; - } + if (ipu_state) + __drm_atomic_helper_plane_reset(plane, &ipu_state->base); - plane->state = &ipu_state->base; } static struct drm_plane_state *
A new helper function(__drm_atomic_helper_plane_reset) has been added for linking a plane with its state and resetting the core properties(alpha, rotation, etc.) to their default values. Use that instead of duplicating the logic. Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com> --- drivers/gpu/drm/imx/ipuv3-plane.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)