From patchwork Fri Jul 20 21:15:05 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: 10538383 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 2B4CB603B5 for ; Fri, 20 Jul 2018 21:17:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18794297DB for ; Fri, 20 Jul 2018 21:17:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B5012980F; Fri, 20 Jul 2018 21:17:06 +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 B8D86297DB for ; Fri, 20 Jul 2018 21:17:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B5D646F0CD; Fri, 20 Jul 2018 21:17:04 +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-eopbgr20061.outbound.protection.outlook.com [40.107.2.61]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5547F6F0CD for ; Fri, 20 Jul 2018 21:17:01 +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:16:56 +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 06/10] drm/imx: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Fri, 20 Jul 2018 22:15:05 +0100 Message-Id: <20180720211509.23605-7-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: ab0c1993-b8eb-4930-9dc2-08d5ee862053 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:gBD+1pzG3GzYxxxDGQqhMtGPpwFSyJQa9QjapazRsXoZmzyFVFxliJf2XEaNva51LNiuVbwv7uXv2W+DBqYbGNsVpsMYMZtR/j28z6bqnDWJQZdPOTUX+8alO4uVr7olb5I4w1LL6T82SB4f2NQvRoRSawkl4d6o7s55KbjE2Uob1UDTkfktSw2qWYAE1mIrsXijZrXEbO9cu6kurXK7Xjd91Uh+nkHyIubgYe6pO3+CK2qVMTSO0L+mvWAUOMAf; 25:l9sElLtefdw45XIQEWO1vlLN4Kmcz1LWSEVUEBSYPksCtW7P4KH1pJ9wUuFMt1sQ9l0ygcUN3aZgecxZcDdN2DXX9Ts4nGdSu0F2XwrBqd3ZqfLuxNGmbVnLZsQT0MMwAIZdR6aDY3LO4xwrXToK3PaEtrvpGGJ85tmurSCESy+JYT55R5WDPuo7NWBoLgHgE8w1BwoAyJYvOh1bPuucLGRRInk8CTKLsmRvzTvZPr0bwIp8jNzhA14biBSE2p1/Q5OuJoW5ZTHmqJ0MpOcHJfb7Mw/CUIUSnbpYDL5Ob/s84mHLDWSLWnSC158WJpLzlmBHHqJjx2M36VjUgUnqVg==; 31:qR0R0/8/ulsKeVbBqMrwH2u0jPJsLALMjhUP3MPvszJQ5oQbpLxv2tjFJHd5GTdCt/8Vq/6IyOYXPp348+YzGDvneVXCizfxV4IAYIPUm86TpjAv2isi4oX/bqX07NCWvVu87ZsR+1SuONBepvZXlFzPF9OPVYtcVNhBhCoRrfSQlpNy6K9lPJBTwBbUIqoHA1fChP3DMhxi3uzudb6R5DVU6nHQvjBGCt1cW+sx6SM= X-MS-TrafficTypeDiagnostic: VI1PR0802MB2557: NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; VI1PR0802MB2557; 20:pFBYuWn7MpkVIBkshKptI7zoLF1pj5GQzEkhxGxJN2s0CzDT6QbRzi2+tX8vDaJF/dXnGaoyc1V8snYepYBYXRweVXlKBCdna1+JUCmCMJ8dF5wU0to84mutp5nGxy1TV59Wxt0AvVydjffzYf5SB5cZiDhERJaZVwOtpuMLsmZGBHUiW0N0LiqnFVFY+TkhpNyaXCq+GIzjM3Y6XcfNBDUKAZ3DHD42Mrl2rY7YtAtZniLx/yl+TQvB7Y06FwwsmnpQnbQ4Q9jPJ2tB9EDbKHMaV+jHbvY5GxT12EWr39xmUZGYHZ/tzwNS/e2X3lsp16PPDfC5HBW1TnCD8QvaaQ==; 4:TnIbwdm2W4V4HZz1lfiWj+ugKF11Z9OqdAVbarlorps5cwzVXT8Gmf94TFMk5onyKIKYwtRRjm1o3P7mGgTLZwNegxuSu3yXpP2MVE2sn54IJkSrP6qCJD0RqfhJCWCTcU/qwHW/P0UvQd4a8qFIFdrZ1Wp3LwBKWMY+lYfHEmQSe0dXIThk/9PbcPtGV8A8fdpuBf+b+XwzbYYVkqX+1YCVqzae15ZVyHpdsMhXWrCJdRtMQDQVZYIg3KdiatOns7um50zWtEWrij/qu9T8chToN0m9mI5M9jA/MUgKyycF552yrVNQTYaDa3sMYcfQ 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)(6666003)(81156014)(2906002)(48376002)(105586002)(26005)(86362001)(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:SgESSkqJVDhxIi72se7SKOXIdk37R6HS0og+tRd?= =?us-ascii?Q?GWMpeNbJsD+BnYwVBWphpp5EYaybqLYDF6ndn1NojWK+j/PQtWS1HH03kNC9?= =?us-ascii?Q?LriJdBMzdHaZi2RZod600lQiV+rZGLTsPyD/NO2THxsO1Blpi6dwIxkBW4AS?= =?us-ascii?Q?8Kis7E6/lBX5eHwSsVzgpVxd9njGcNvGFqe3g0FrQfWq90qgIe7+XDAU+RmQ?= =?us-ascii?Q?KTWRKvBFSE98urfl0E0PhJdb4FtpWExcPEVWNzhsq90IQk44jl9ivMO6vrq/?= =?us-ascii?Q?90bbbl/RBlkFkgC83PuP11S36UDd08QqscAqjKjhfP4zNmarA1u+OfdERJ6J?= =?us-ascii?Q?yGjoCslQn8gI9qcPsoui+QYaUaOpGF7o4muzkJOQsilBuuSvGerhV9N2afmG?= =?us-ascii?Q?6IvtpQ/PEBN8/+UDiuM1ihTHVs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QYLiPM1CIcuFsU4+94x2okXbASEFTz1Lbifb0FZpi8xuTtiQTdmMrxAiMuH3fB4/pp8KDg2pZmh5PZIQSCdtZBz+8X68v58ntJI5XL3GjyTfU6PERWZUqRMC6fVdPDmMxZTSDpz5uTqgNIGO7SJ+ULVr1DE1E44KPhQG7pCuDN+xvT23lxijECNzTDjb36xRh5P2yC2GSuYA8k7TJyIvrIRN7wwWdzm3Sx SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2018 21:16:56.4265 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ab0c1993-b8eb-4930-9dc2-08d5ee862053 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/imx/ipuv3-plane.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 *