From patchwork Thu Jul 26 16:17:47 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: 10546113 Return-Path: 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 818A9112E for ; Thu, 26 Jul 2018 16:18:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6808E2B886 for ; Thu, 26 Jul 2018 16:18:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59A682B88E; Thu, 26 Jul 2018 16:18:34 +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 ECBA52B886 for ; Thu, 26 Jul 2018 16:18:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ED52B6E7B2; Thu, 26 Jul 2018 16:18:32 +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-eopbgr10058.outbound.protection.outlook.com [40.107.1.58]) by gabe.freedesktop.org (Postfix) with ESMTPS id 780886E7C4 for ; Thu, 26 Jul 2018 16:18:31 +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:27 +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 v2 01/10] drm/atomic: Add __drm_atomic_helper_plane_reset Date: Thu, 26 Jul 2018 17:17:47 +0100 Message-Id: <20180726161756.1794-2-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: fcd5840e-af78-4e89-9b0e-08d5f3136c5f 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:wqaV7SZwBTiiI0I1cX7m24AvV50TvZK2MmrdCmenWelEkOPUbZkW0ONCiXJiqtm2Pv1VMDHWt3h5oEUan+OSSclAFcwFwnP60M0xDGX+PbHcSNPCdKrX63uChhf0LgVJc2VMH1RrPXbO7oCt/RQrb+JykFGK6SgiBrAicZrr1grXI9PGaM1cuLN2TLjgj2GHQXJf4VOtdSfe7nPWSxEDc5OcGOj6zzrrirfL22b/uKowr5VXBDnCG7TlR6BD5f4u; 25:WGQg/18uBCnmhNJejQ60X3JFFJPY1ygan7Os6Vl9LTdCjAvq6J/YuDUIG9O6Ivb6azIfaB1jzHcNwsoydTES4hK3Bvsy1AZoLTDPXPJ/58DxUdKnq52jtjz37ZS3zSq3R0+5rfJPWS6iuFV/SoJF+r9a90fgq2KlfLsCTOo1L64kTkDUiERBHBsnFQj3hskE+C10TZ/UOBvZ26wxtxUHVPz2EoshO+yGQ2mW9Rs5wc1nVIZ8bmEb7HyCR2XV9bMov0mN/nZYxL/I+BteMwDkrMyGZgqIADa9jYzaWiI6FRxqC8pQ2I8SY92kxYcy2BPbW+nlqquHnHQH4NU/YxNc8A==; 31:02iz13OnCo8QZI/ihuujXeycxhsC+ny6To9vUV4u5jgWBJsRV/yTLRSjyQ9t/8BxqMaFy720PM6LUIzljK7Z9JloS8wjuo6uKCqOtTePXeHXyO7imqx0pxTlaC+uSNauZFJcClI5/P/gtwWMpLLZg5dIkkdBUs5FWaXX0kxXXm7wH2ZpbmWU8Y91G4uIT8GYJhdcMXo3thKlDrBr+e2qD1j38w/Ktt/Qpkdw7vN9Md8= X-MS-TrafficTypeDiagnostic: DB6PR0802MB2552: NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2552; 20:W/DAeMZb15xX+M+4kITNPvS5m+XmAp1b6asYaSvs0oIWPefFCYF9UgGusfsfe4m9mf44wx4eIxznJvg+kAtcqLc3CIs3pXSDIWvLXnaoG7QEzIXdjHGAdS9+ZirlZQh5zPE7/5QuxhSvlZ8VcTdsyc2cTVT/sv4dMn0/URiiDTQ3eJqVZ48SwPOyMnwyhiz8mwcVpBE8rQ1KfR1AGIY8NoxLuGJXdTrxR4qRJUB566QH5UZdOTAq87XlrUut0wb88xPT8drXo4MSsBIXgv+dQAsbwBazKvrTmtAgX2QCzT1AihMZHve5sFP4dCms30d41P9rXB1Z6M3lOK+quU13dw==; 4:p2jYrR7pdvBF0hi2/AGPyJ/l29svBZoPbGLdFwTuIGSkBxChlnmBJyyO05cWnrEBGnNTqWxMznSetlQg58h4pya0inxDpyLZYPHwuFl0x8GqeUWSQ6Q5Mqhtg+Me6R7K4cGCumaTdnx1qUNGF4ieqh9iBbf5kcI7niaOcxsTpAIVODvPIb00uqNKjVkn16H5C+atXx3NR6fcFs19QwV3Aw/d1KkzRGoaNxO3nV+YUxL9XIYzl5ZDwYjsmcRs/KlBnfnXAd11Ui7QXanQmTxQACz/Z+jrI7ut4ydll3fIbaspmMB9xu5cDwlKlTkeX40O 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)(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)(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:kpq+xSZ9NV+6SgaD0Vwf+SicPxFnlbox7lyW4ze?= wn0pEfSQQ2rLKsmIj268Kkc+HGiTVnwHz6jWGXDxAvhHPozafd35oJl6CDlAaVpAM14obi5eWpjugC4txG4b973f6sjwClHYVHlnSF5fPG1YdJcnhgRcJzembdkbFAuoZAte2qaudr+iEO4UBofJR3lr2b0tQLoBKSx53wMxywkGiYenIIUIHgq+kDHeD3tSOliBfcWebjiOwnAbpmwM3YaBYCepZ1dC3H8LVgRWJGZ4zU/fJCf4kXhDIr33q8/1V45Oun5EwHSguzw5h05l2aecXUdV7Aib+4fZSU4GqtBA27v0tWWzOk9qxrwTqBIkMeQmiUg81SFTb5tEI+q0GfND4Yd4qg4yqWIkkWm3ZD4LxjSoThyiWJiOZuA+2b8dfm7UYGENQzSuPKI9TfHc1eDIF6UxRQZD6FuhCbZPfl0Ya/HIjDUSgi1y8UERUBWsZrpdwT07K8YyJfPZq2Hf6Of1fXI31Vm0inwmgMzmhOrPr8rL6e9w3BfRB7lSiK55x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-Exchange-Diagnostics: 1; DB6PR0802MB2552; 6:UgidXKD7a/sozSZZCNIVidXlM1jCf3TkohJq+ZSLySEgdxVwYXHtLfix9l04Tnlrb14FnZA2zLChA1WFdZttzzUgGwI2JUBeMnLkFUKdJJQWvoZEYY5eRMhvIPQM88sF0t7y36loBUIptKJtwCQcyE3+tcXKqGtNQywlPi+r4ntQy0jm3/Z3QtPJEvv39Gu0KLfUcmtBZaA5uf/HbZYy3sqjYSvnJMMuSE9kdK2pnXWp0/wmZui/UT9w495ja2SRtJa1RXyIDDiFpQD8U/7QTLKrdsfbF2ZNghCoBCN0LsPT71dbfCwv9oYniiDVFtfV5uQdNeSuNjZIUZkbJncw4qDFSE5P3OTLnr1zo+/VuXbgXSGQW2iEBV8Lefq7FpqZaohDEoHFpI7cUcOsOQ6XNc+h2oNM0JusvVFfhrg0Xc4xSNmOZZJEW5Z+Ewx+ymLtzPWA4msNgm8VvcvestsrRA==; 5:RsErnf8l+TB98TMwKOq3t1MSCsncTXczBRkn1SJqkdIBlBQLPk95BLwtg7V/J8ARgL+FXtUutJu9kgCy4+fEY0cRBaeN1y9V7UKxCXq+iQWHtDAdumY+O69G1vZYxbSNyIG8z5fQf3jw7PO/ONOrpn9bj1w21KwPiDQxUK0cYjw=; 7:4FFFS6WTBN+S7NBboXYZsfZXXE6W16t9MnOV7UTsr2kufqsRV13bRlj26DRBgf6PF9Poeh2AMpWYAXN0PK4Z+g6QuqAjhKZmjbBR5Hmf2KF0i9K/1xKKYYigdiaCwa6GDyWrVfvQuCcFQ7rPLLjJc7Lt2xWBHv+qSAOWcyRrt5BTg0a24IBD6fGx0vzXSPAkD7pYIp/gxDIZzgLNEzDKTVjtqAxGBAF65/SJsE5qPOt6oAGzbWNNyem3lWpLxcND SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2018 16:18:27.6664 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fcd5840e-af78-4e89-9b0e-08d5f3136c5f 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 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 There are a lot of drivers that subclass drm_plane_state, all of them duplicate the code that links toghether the plane with plane_state. On top of that, drivers that enable core properties also have to duplicate the code for initializing the properties to their default values, which in all cases are the same as the defaults from core. Change since v1: - Make it consistent with the other helpers and require that both plane and state not be NULL, suggested by Boris Brezillon and Philipp Zabel. Signed-off-by: Alexandru Gheorghe Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/drm_atomic_helper.c | 31 ++++++++++++++++++++--------- include/drm/drm_atomic_helper.h | 2 ++ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 866a2cc72ef6..7f5aafc5b1a0 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -3552,6 +3552,26 @@ void drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc, } EXPORT_SYMBOL(drm_atomic_helper_crtc_destroy_state); +/** + * __drm_atomic_helper_plane_reset - resets planes state to default values + * @plane: plane object, must not be NULL + * @state: atomic plane state, must not be NULL + * + * Initializes plane state to default. This is useful for drivers that subclass + * the plane state. + */ +void __drm_atomic_helper_plane_reset(struct drm_plane *plane, + struct drm_plane_state *state) +{ + state->plane = plane; + state->rotation = DRM_MODE_ROTATE_0; + /* Reset the alpha value to fully opaque if it matters */ + if (plane->alpha_property) + state->alpha = plane->alpha_property->values[1]; + plane->state = state; +} +EXPORT_SYMBOL(__drm_atomic_helper_plane_reset); + /** * drm_atomic_helper_plane_reset - default &drm_plane_funcs.reset hook for planes * @plane: drm plane @@ -3566,15 +3586,8 @@ void drm_atomic_helper_plane_reset(struct drm_plane *plane) kfree(plane->state); plane->state = kzalloc(sizeof(*plane->state), GFP_KERNEL); - - if (plane->state) { - plane->state->plane = plane; - plane->state->rotation = DRM_MODE_ROTATE_0; - - /* Reset the alpha value to fully opaque if it matters */ - if (plane->alpha_property) - plane->state->alpha = plane->alpha_property->values[1]; - } + if (plane->state) + __drm_atomic_helper_plane_reset(plane, plane->state); } EXPORT_SYMBOL(drm_atomic_helper_plane_reset); diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h index 99e2a5297c69..f4c7ed876c97 100644 --- a/include/drm/drm_atomic_helper.h +++ b/include/drm/drm_atomic_helper.h @@ -156,6 +156,8 @@ void __drm_atomic_helper_crtc_destroy_state(struct drm_crtc_state *state); void drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc, struct drm_crtc_state *state); +void __drm_atomic_helper_plane_reset(struct drm_plane *plane, + struct drm_plane_state *state); void drm_atomic_helper_plane_reset(struct drm_plane *plane); void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane, struct drm_plane_state *state); From patchwork Thu Jul 26 16:17:48 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: 10546119 Return-Path: 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 9FD60139A for ; Thu, 26 Jul 2018 16:18:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DDD1296A3 for ; Thu, 26 Jul 2018 16:18:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8046F2A514; Thu, 26 Jul 2018 16:18:41 +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 5A4C62B88E for ; Thu, 26 Jul 2018 16:18:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 57D4C6E7B9; Thu, 26 Jul 2018 16:18:38 +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-he1eur02on0618.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe05::618]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4A9236E7C5 for ; Thu, 26 Jul 2018 16:18:34 +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:30 +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 v2 02/10] drm/amd/display: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Thu, 26 Jul 2018 17:17:48 +0100 Message-Id: <20180726161756.1794-3-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: 4d95161e-e8b5-4310-2a4f-08d5f3136e11 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:tyGP+jSk2YWRnjKdgy90Sun1lv2dD6QYRlnuiDndxrpBdDDtzOIVzx+3f3FRKq/XkWQqQK9WvOME4cGQ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mWz60xjNnLhwdAb1BOjC06/ve+Dd4Y06By/7re8dGsVx0H2ECnmp17yK8WsbV25bYlwGI6cyAcquvopXHmJPMuQvQpaKpiB5YCSohkkhu/Jcg==; 4:lkPNk7BwL5HNRTu/a9gZa+tC/IfLLqMvBz0LrxBychqhUkmjgzzENnc5vIG0IyiXsk4JH/eUSSBezAfF2FVg34nf3ieTvBY20Se+G3A7K1LUaZg7Z/oD3fR1w3FAlVTdVb6lyKidQcykAjwae9VYrWs3BJ5Spr1Mh9fAO91zrPsp50fTplGriRRaOuSbYyBD+rgh/+Ne1Iya80x4Up42kobu58l5yZOuvNKhtb+R6QEIGmRJr5aoSJd1w1qkeniEcXIPuUXdpRjSx0m/7iH62tciDnVhmZ+0cRz/6YB5UCeR3eEVKNPtUcFTWNga37lbYfxRfLHdBdCf6QsD94f8V+x+7wMqwgrRIRj8lN2v1E4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917)(767451399110); 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)(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:7JavtrL5jHtLbDqPhRiC5po7sB9CmmGa1EvAzl/?= YbedUKhMHi7IOM6ohBP7RkvIxsTn9E6W9lg2htc+GSM22abp4DLs9tgnLt/GcqWyGfUzkG8b3mrMxM6hcnMzSoSUjwqiaYV4M2ce4EdQ2/LvY7rLmuc3K9yuhw/zl3RwcMaqUXbK9V42VgCHiUAlsoeQG5uLVBDicPEyfnTmrbpzinRtFQt8XN8dVYuk11nobVwYGgMiOPyxq1+9cxYVuLqkYMIe7rswpH6S3/TVquMFDRBxfRqxPwXK2R6dvmUZY+N+d9Pn5Odm1lGzblDmnDzqBfh4hHDfpI9gyxLFfPv5VnJ8V6fNzCC7eEXUV9d6qQn/ExQFHD/VsJr/K491bjSYSWp+62MfZyglHGDEg3agEQKA8MQQPJpGgJoVW+QbyO8ipS+PsacGvrMKXTYPrMOAJ2ll4TUpiYfxnZ3RpU+8Ng5n6dVrlN21Qma0QSxtXEw0bhTQn+b+s5K9PFPCrIneWmpUiY1nrtyaYu2wpQQoZ+VG8iJUdiCY2gIhcvqnwdnl70JBKdBufXeAMgEIjnONhojpRQ7B26lghjDlokJHzhp4u805HqTjrVFvyRDHc1jCQYztGx9Rf3So4IuwdjJvyQdp015CCgwysfbSKq2Np5fRNz+4234If0e5YO3OuXYCE4goBTuFsWt9U0aUEgQkOeeXwUOYyyceC6J5UF5J7Gch4IjGuV0P6MrReVM61CZHtIY+WHP3S8d1NlggbjLE9Z7mFlB+6F679AY3yRWoUYWnl1xmwe4h0i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tAaWczRjO3YgSsPN6BacU8NmDqIc0mSlxSEjPX06K9HoD5fQrK9tK0Olgn4HAMiX/o+0pcpCdXvZATeS4B89F86i1mDVsMiAj4zWooFUu62BCnefwBpN3fuErSS/+bm8qP3UX6nJZFwy9oedk1ydLB6EPmLohhiNIgKu2OIdMlH0b0NLEuc6IGPg6+9f2TsTMC+09fZM8whZ0pPz01UnY+PXNeubI/FU1n/dhDsDNyjvfdn/MZXZ1KY+nOMNfWZ9p4XGxAbeojA4ZeazAGPvCMA==; 5:HW5MI6J7Hs54UO3suyxld8M2cHw3yeQ5SDrVf4PlJ/l81JWllQ2gNl9OrsRxhmzmkzUHtJ3oKtkqbSMtLd0qOcAvbKL0nWU+ISDVKSGB48AZ/MAaoaLVe6oeWQJGPcMFkcitWaG2grCzLUQlMsaMAeQ/7YWB/a+PDPCbekVbKwI=; 7:hXv2ATpzoFxVfnGgfhZrKmV0N7cRQIaGCC7bg/ucESbMV6p9QAltxfQF6RuPTpnasAZDsbQRKgRK5qTYv/vKvjgJLf5szCoadR8ByNVxpgWiDpNJXaDhNB5v8hEbBRwPkCdH1eWESh+IoPXHHc9kD5j8fO/AqlKkWyDlDpzdoO0rAJ9QSpruOCx743ipVturObPX0pceoF/t82qryI6jN3n7utGZM0XW8dAMuD8JrSv8MNn/RTEV0NA7d65GL87X SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2018 16:18:30.5148 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4d95161e-e8b5-4310-2a4f-08d5f3136e11 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 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 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. Reviewed-by: Harry Wentland Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index ae09331eed00..8e4978d5b83f 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -2965,11 +2965,8 @@ static void dm_drm_plane_reset(struct drm_plane *plane) amdgpu_state = kzalloc(sizeof(*amdgpu_state), GFP_KERNEL); WARN_ON(amdgpu_state == NULL); - if (amdgpu_state) { - plane->state = &amdgpu_state->base; - plane->state->plane = plane; - plane->state->rotation = DRM_MODE_ROTATE_0; - } + if (amdgpu_state) + __drm_atomic_helper_plane_reset(plane, &amdgpu_state->base); } static struct drm_plane_state * From patchwork Thu Jul 26 16:17:49 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: 10546127 Return-Path: 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 BF592112E for ; Thu, 26 Jul 2018 16:18:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADD782A514 for ; Thu, 26 Jul 2018 16:18:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A07932B89A; Thu, 26 Jul 2018 16:18:46 +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 5A5542B771 for ; Thu, 26 Jul 2018 16:18:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 72FC26E7CB; Thu, 26 Jul 2018 16:18:42 +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-eopbgr10083.outbound.protection.outlook.com [40.107.1.83]) by gabe.freedesktop.org (Postfix) with ESMTPS id F21656E7B9 for ; Thu, 26 Jul 2018 16:18:36 +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:33 +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 v2 03/10] drm: mali-dp: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Thu, 26 Jul 2018 17:17:49 +0100 Message-Id: <20180726161756.1794-4-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: 22e419bb-84e7-404d-625c-08d5f3136fb2 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:sPmw9PAVGNBsg09ZGe486aA0GsPaiHNf9sGrxu4unPY9dcvDeyJq9EiALR1BjD9azdQ/Dsmj3rE8S+g8iiqe9wbMjmoOxqfLb1pHldiB3J/pRoEFDjtoLD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PyObEmRe7zTD1frBcgn8apCQd5I4eUhUM+CHU7XlJU/226CiRc+170TIa8B0ajBVRsg==; 4:I4K/e+I9drcHSej1ay4PIY6/0UeVhNxWk0WKUTaNrfwFcHMtYUYbBKvFmdCC/TcJWiUtnArwBEORCshjN7vY9gt1ex3V+WAomrN8/0iny3gGrBajwKQuJK8E4dOHCUZX7SbZKc4qD+9IR0f/Au9gHPn0Dn29qCfaTerXq1EMRY1mI/Aa1L0r+oTh34QxJu5b0mO6rTIhMSvEH6aaKcu1VLFKwhMehzJTLmL7LMbM5x/J8D2NPDm0MLtQBcS18SSblaVAaSYsjT4EfqxrF44uJJWKI04IQObeRelIcPHXDs6EeeKyRTiF8cGis9SOLTIc 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)(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)(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:HfkrphFBOPsgZGxoHVsrbjBVq9xzcjwViECAncK?= vtTsG/6pBiwYqk2AQ7HCITCASPnSP8ehYMcX8IMCPHYTJnwMk0a/QkutXlaFzTRy3esf8tmnHST5n+QUCAOqoRJXm9fQv4JcJjNJD2V0Tjoq76AtMVCv+3S7Y0tE919133vlgIy3a49BO8tpqYBToRP42fP5JdLKT2lIESwldrb5vELbJ8WGoOgCSbXsTcpJyo8T0G7gk+suYJEe6Ef9a2RBDndRmiPqEs7r5wHcU8+bAPrVy1bSxiJDWziqkDutCO4uBnSEllbuM4bi4ZrfgGw2AUXjSeLXKv55ow8Ok9YKZZp6ZlrDk4ZjmxJ6HOL6rnAYE+WiNacoAz+G1vxtfxrPaQrp6EG6WZiqv+Ie6ZlRnkDR3Z84H0XrYS7d0v2tN3CAuDJWex9WwMAKwI4dTkpHS0GnnXCqFPyOKYo5nZkByAgCPYK1qeXkLpAVYWTziQ1fIXhHwrCcJwTlthQEfCHoJ3LQI9uxpuQE/8kPBRIvdgGB4pGjkstVApY/fufeDQqFwenpTEZQKurZY7Yq8lkTgOGZjCDU/XMc2Iwm/wFxAQNlSAok5p3hoveC93DV6oDAZpX5GmjW7dha1KRmLbV1Nk+jI7BY2BrQGwojVeI8+yQX4t1aHfwZilmM5/iYYYozqvmhRr6LfCvnoxZTz2Lli2lEjNaJ4T76TPVpy3lWSruynasdJysirK3OnxYgCcqzliN3AjYQ2h0b4frGGno0VHhylZOL9aWbC0d4PHo5APzv06/J+gCWgdMAwvGJF2+Eny4f/MCOOIMbC83+jJpUvCUAD8OO4xnE3WZGEN6mvlORDzyU4VV4xfpxJj7y7w2pNbA7+vP8HhJEcfoMWxy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HYowKBD/UpHNSq8wps4W538Ayh4cFKDmH1oBgi73mBcA01IjT0KYs0VOrCCsUMB4XP7tGPEcymSIf97CfBDv29ciF9A7Wjrk/FlG4973S/e/sOTCXOYo+hfBKWH08UQIR6f0mvOD4ztcdQ35nTuOXSx0l4nR21QDx+Fn2jq1w==; 5:Dcm8NXn5KRI7ltNWx3FmstYvE3rJrpfeLYGFLeQtOMwN/nKPV2g9f5yYBTno1GTPPw4qntnxlomogrs2QzAyjYX6EMWOqts2afYo+OmQd/bW5IA+ywKxsVuANlFcNTVMf23WSMffWRk0gm7WwwHbvBfH9n7DkkVbP1Z8visJQRs=; 7:BeR2FDceklKXEojYqUcMCXv5yZdbmTJUTM4ng19gEglL7sj07HcMp0owl+9WFYlQLWthYeQxPEnkuSWy3VOTi/O5oj7CpMRnt6rX17IRBlqDvut9NyoNULUhE+c+H6Caj4OP4pWRfVg1XerxyZ9tDV0DnRwkUBTQ5y/YpdpmW8JkGvlL+UmwOLfkroJYd/sG/WyO8sOAM7a249W7/U5ZLAU1UchOtNhF3N47JEAzO7PptKa3FenXzP5t+V/u99SL SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2018 16:18:33.2491 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 22e419bb-84e7-404d-625c-08d5f3136fb2 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 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 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. Reviewed-by: Ayan Kumar halder Acked-by: Liviu Dudau Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/arm/malidp_planes.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c index 29409a65d864..49c37f6dd63e 100644 --- a/drivers/gpu/drm/arm/malidp_planes.c +++ b/drivers/gpu/drm/arm/malidp_planes.c @@ -78,11 +78,8 @@ static void malidp_plane_reset(struct drm_plane *plane) kfree(state); plane->state = NULL; state = kzalloc(sizeof(*state), GFP_KERNEL); - if (state) { - state->base.plane = plane; - state->base.rotation = DRM_MODE_ROTATE_0; - plane->state = &state->base; - } + if (state) + __drm_atomic_helper_plane_reset(plane, &state->base); } static struct From patchwork Thu Jul 26 16:17:50 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: 10546123 Return-Path: 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 3206A139A for ; Thu, 26 Jul 2018 16:18:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 206072A514 for ; Thu, 26 Jul 2018 16:18:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1259D2A70F; Thu, 26 Jul 2018 16:18:45 +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 E15C22A70F for ; Thu, 26 Jul 2018 16:18:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 673196E7C8; Thu, 26 Jul 2018 16:18:42 +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-eopbgr10079.outbound.protection.outlook.com [40.107.1.79]) by gabe.freedesktop.org (Postfix) with ESMTPS id 776166E7C8 for ; Thu, 26 Jul 2018 16:18:40 +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:36 +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 v2 04/10] drm: atmel-hlcdc: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Thu, 26 Jul 2018 17:17:50 +0100 Message-Id: <20180726161756.1794-5-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: 6c687c91-9ce7-4607-bd92-08d5f31371bd 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:dDX4zgCDe3JUr34M0YSXOoNQYaimOiPwj4Oe649BFDVDJJvdhowGinFZbg2AsEJf14hYoMmbUqXiQT0jpBUfVbma9i+H4L1ghrtvycmx9e/q6mNxIdfRa1w3mbkMq+JN6tvTgOUbWjtG7DJtyo0f5sBv98FF2nycqE6SHY6sX7LbdcpPeG+OvHIBPEmSAVsopDf56Wu17CFMEz2dadpPVngGebaj2MokJWLTpbUyqxMnqgfCIIwagmjzV1KNl2qi; 25:djNzK9GWrlyqr8ZZSMhK7mUWDmzk98fd1jgog+c6HI/oqeNbGRaFDrZFD6dNqxOTeuWlAB36Xwo+Eod7BSwqi8Y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sySKx88DFXz9yb45lnjy2e8/E1HFBifriV3wBxgAfx8QVGvhUAibfS7xntMPXGpArqMTvqSyvPg63HoiiJI9rByEP1TPtAmik3zawdn3F1u5mVmyp064TW8RBIb61OqfaYWOntp4/u9vXADYnkKW4P2GTVzuCHCiZ6k/hXX8bkTWh6jVJ45 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)(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)(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:frtj9uP8r2lE+BvkNQex/Nb4sxuHlE8mqaGKbA6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35zRC/0P8VPQzE4LZsVVoHYTTuAZOllkRubE8I/RtrOScMniJcSbvmMa91JUPClCykOp/Of4JtwxHcBea0uz0M+X3MvORE3KA6cEEh63YhAXomDSV+mS80qdoeCaw5V7cS7eN7SruAndTLBJAjbU=; 7:B3gPs/CMAXhBqggUkOtJXbZxY72a/fWj/edHtOQCjEgpnh2l2DgIKkegXz43bBqFPPb0+yZ5ykw1tNuODSZIa0qDLYtddpOUX3kZrXszd3Ez5Q9RtBwm4wqPy3ftiu/RAiySL4Qi7WPu64Qp0bidQpUWBRp3/ULkGgB6l5RvqGtquzjk97zsRB8PLN2L+VJk26rS/W62jhItBsICjdjC4W4fuAfSt0XpbbGx6UusZhFsPVsZSEAbc/JwJ4x6vF4t SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2018 16:18:36.6729 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6c687c91-9ce7-4607-bd92-08d5f31371bd 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 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 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. __drm_atomic_helper_plane_reset initializes the alpha property to its max value, which is defined by the drm core as DRM_BLEND_ALPHA_OPAQUE, so nothing changes regarding the alpha value. Acked-by: Boris Brezillon Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c index 04440064b9b7..9330a076e15a 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c @@ -942,10 +942,7 @@ static void atmel_hlcdc_plane_reset(struct drm_plane *p) "Failed to allocate initial plane state\n"); return; } - - p->state = &state->base; - p->state->alpha = DRM_BLEND_ALPHA_OPAQUE; - p->state->plane = p; + __drm_atomic_helper_plane_reset(p, &state->base); } } From patchwork Thu Jul 26 16:17:51 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: 10546133 Return-Path: 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 5D2E5139A for ; Thu, 26 Jul 2018 16:18:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AF392A514 for ; Thu, 26 Jul 2018 16:18:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E95C2B88E; Thu, 26 Jul 2018 16:18:52 +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 E86362A514 for ; Thu, 26 Jul 2018 16:18:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C74F66E7CD; Thu, 26 Jul 2018 16:18:49 +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-eopbgr10052.outbound.protection.outlook.com [40.107.1.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id E06E26E7CC for ; Thu, 26 Jul 2018 16:18:42 +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:39 +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 v2 05/10] drm/exynos: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Thu, 26 Jul 2018 17:17:51 +0100 Message-Id: <20180726161756.1794-6-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: 2e09337a-4bb6-4390-551f-08d5f3137341 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:T8JzD9+yKGl1q81Akbn6WMiPfgEgUlp2AaLFNq3o0eLvUlxrlziWXjgYVax1cOZd/oT4pJBb7G4DU5f9ZLIbjQtzrvXM/J5bmklH2l2+1G0eVJkar3efaHAiv5gJWxZTYBbJZ3igfiZUt+LAkgRJtNgbIxI3I/+Kv1FX0tbQh8iw8MybIvsjRlDapat8FTppu1/zdoVX8uCk9Y1ryePRebdqx8sSIpj4VOgntDXaSDjmKz+5y4lP71GdL+sGHysl; 25:iM17UhEP7PicTXpCgQglOJIQ6e2DWAzIwzOlaIcza21p2R439hAwTDE+ZncJOlIt/m0LxHQxIUbnhjoBDTQ+7pXhHLXqqTIxps7AZeMU7ODxMyRBLl/C/AvfrYqRJf5yApTU+9UZKH/BUP7u6frwgrphemZwyuq5J8StADCGv2h2wsS7CSMgmfkZIu8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b8LtJDfPhU7loG/8BjqgQVn99M+sXyNO9QKuyPSYZXYTudj6WEvEh0pi6ZxJhgBlgdP3RbWj+HBGPVSb2 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)(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)(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:jSDynYFxj74sKcBTZ0sAIohrAPEfzxb2xF+Fmes?= GeRqrMflw1Y+XKMsJrDNF9CmgRiucEwEL0vNHU0jvF3ej+keB99fs3bvn0e+ShQnztsKZMGZ8EgHfy2SpiAuhz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TiUeZDY884owve7wWDxY09yXc8KDiWWAjp9e9HOF8q/xMk3ICPt5PG43D0Km8ONmlLfF2KM/9vwsK3o=; 7:03NJ2JAJd4hJKiJOVcIV2JBeYIigHlxv2GDZCL0zIxGaB5Dlb3RI1qztazVmQODvS96AwrbRcfSfRHCQqz/WknlnZzfs4TOp6ywbzHMaYMvK/0OPvqDjm4Atmx/OU6PutaFjBXHiJCNdYkaGowz6Wf8+fLx0KZgt9ydYus/2NBJ+4itU6p6cUttYJ8b5qJEe7msOUgwAeWFi7drtpbNT+jHuIf3xkeyg/Q1IRHk0FNjR9pPVJMmY+RyGb1T2mrKZ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2018 16:18:39.2181 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2e09337a-4bb6-4390-551f-08d5f3137341 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 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 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 --- drivers/gpu/drm/exynos/exynos_drm_plane.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c index eb9915da7dec..681328fbe7de 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_plane.c +++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c @@ -139,8 +139,7 @@ static void exynos_drm_plane_reset(struct drm_plane *plane) exynos_state = kzalloc(sizeof(*exynos_state), GFP_KERNEL); if (exynos_state) { - plane->state = &exynos_state->base; - plane->state->plane = plane; + __drm_atomic_helper_plane_reset(plane, &exynos_state->base); plane->state->zpos = exynos_plane->config->zpos; } } From patchwork Thu Jul 26 16:17:52 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: 10546135 Return-Path: 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 ; 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 ; 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 ; 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 ; 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 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: 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+E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V1P45BK77YU/eFuCpVDuvSkoKNmYYdnU14Wu8O51jw9mVWC7jIM6e0pdepvY7l0oyTD2fj/qJBvNOt/G1BbXWU493NINKMidIZX1+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 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 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 --- 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 * From patchwork Thu Jul 26 16:17:53 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: 10546149 Return-Path: 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 B1919112E for ; Thu, 26 Jul 2018 16:19:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A10722B418 for ; Thu, 26 Jul 2018 16:19:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94AE42B88E; Thu, 26 Jul 2018 16:19:15 +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 9662B2B418 for ; Thu, 26 Jul 2018 16:19:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ABA0E6E7C1; Thu, 26 Jul 2018 16:19:03 +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-he1eur02on0602.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe05::602]) by gabe.freedesktop.org (Postfix) with ESMTPS id 948586E7CC for ; Thu, 26 Jul 2018 16:18:48 +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:44 +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 v2 07/10] drm: rcar-du: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Thu, 26 Jul 2018 17:17:53 +0100 Message-Id: <20180726161756.1794-8-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: 1070793d-6b85-414d-5ddd-08d5f3137686 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:cG5vC9ZuqlyhWGKNFM7/mwHkBKAdIfTsWG1Z4G/o/W7xAiQREx+WrNnNTHVeSyM1iVVzOt/4KE889NCaLmeCkvxG6GOuRA2mDzG15TeOwElvLYiXKWGKiy4Kvtu5XBijr6MtUJoXDJbrSF7aaRqxOorrB5Gz1dWbKturpw/qcnlirWk+MKRVnTnuxku5b3Iwg7tcz5164f3jsRNQabBRl4Co9eooqUrgi74a1Xp9MtYlLCvIX775w1+6HuIWMclE; 25:t2kKBM+JPEt1HuhwPIe9UfmLxkvhCDaDQ09GdnkN3mYMdkkgWiuPpbDEYoZ2zbGLpTMW3mFCMh6/sh7BljntAxVX3EIBMA2oKosjO2fQMk7paOQsH3RHTLfnwkByE2RryHzXo92vZGMdbt41TwbuLizc2/LIer0a2T7aTRKW7P8QhfjA8+qHSiwHCgtmaZuVv+Y2WQmdrdrfdtEYiJ+a8E0EFKalKJpeT1vLUPMFe7+GxQR95DZw6a+v3lFB5gC0GdsLiQUW9ZhUVK3F2Zz4JWhbWTLadKyviyyj/87pY9dMCartF2ZD7ket1izGN+tRCEetZx+3v/KAWiVjy85/Xw==; 31:RNwaoXbl3OiDXxvIz7ilny4CGc8Pc/l63ou0Hmi4kTQpmCpGyca68XCPVYrOx3lpm7m0WcUgeVwhhFl7DLofJYn3GlbdvL9/wOzWq5yfQEO9RR16LIm7NEIqO04K7gGia/uQ2LquNUymMzQwkOPWbZE7sJGqd5NwiStnUagn2UegCrzItZ6ZkPAQkxnv5yBWU7hOPNTz/IgtMsuuF9+41Ed3iXhfHnMAL7g6G8UfZsk= X-MS-TrafficTypeDiagnostic: DB6PR0802MB2552: NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2552; 20:vbMqarHJXnVmsYQh/2vANLlST/hCe8BSYTZieRrv4xFlZg6pePEIPMpnc1C9m4ok4fdJL006TxFMSv+dW+oC3X1V0LGiDxRTz4dG8crRxwDExykNRmGTpyDqMSvoAGrnaQiqNrSPcndKUo+w9ETaUYQPfR+O9WcqqB9vbwH+h2aGnesdv8Kpc/V/qJfm6vNxK9+tEtxoJikZIBk9/pHZWwUmjl0lq+lQObWNO8ScCL+G6XQ8hJiMfJVo702rdZy0/Pmz9Jp0Xt2oswSTxftzywub/0Kib+LqFoKvHVhjBsF49o3pqwtDUrU9f+/MKLKJX3ZPf1xE3jJaWJSlNl9V0g==; 4:BctgCZwE6uENyQs5m0kIgnzxvFJuCjd0pW7X/stDlTUUhj+zvRN3NPLwi6qz8NyzP/vQLR9m3kMmfjZTnfJqDXP8ZWJ4xz3kH9SpVXiv0JdDS8flIKDhMH4FJfMLYgm+hf1Uekedh5rAfs4tfKW6OjYMW2lG2pDrZ+tIxv+gB1ioU0lvM55J6ej1xwWQStn8tUHMndrFWRhOF926/FfMEQvlwLZrMFfrsUhWaGS61i91FoQp7gOjKg9kfZJe5+7IOvRrVuiBBfuxSegPcYphuspBlXwNTlTM7knQGo4fNeyuccqgvTqkbCe0TK+0o/Kn 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)(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)(575784001)(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:nzkiZMgnSPlqQUmBVHJG/V7jjo5StY4yr1p0SyV?= F60NebJLA/xlabW8cr6pKSFePH/trg/XpPqS53zvA/lDhSX87bDqj24t33+WltVzM045ub+CI9SN92wbCCO6/SjAKiXrVvq+XjjR+24hJ6DKXkYKgHnh9vjBkUsPIqVanV4fOkZDwggELBg50lOV///vyjtTexu2+Wxg16Lfn3e80iUynQSmrPSjZUurJZSIPYQQeRduHoiRmY5gppUcDPBMBILc3BIcGG1J9hesOtmMkI64s8qLVUp2aO5WjzPhcxycjMbzA9iwjp9JNJdRNg/btmlojvcvJsfut6F2PiU/9wQ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ac9I4wAJIuYtxwYGO66qX1xj1uKd4oGrd2irWxBoTTopMOS9OpFJK9VE5UngOpOA2yM0azoldHGfJcm1uRdY+S76K+CezBqKui2/GG5lnN5SVKlE3GT9ma/PhjArQQOgYOq4IlbCUkhvDve1+FgBuC/QP+ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2018 16:18:44.7056 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1070793d-6b85-414d-5ddd-08d5f3137686 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 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 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. __drm_atomic_helper_plane_reset initializes the alpha property to its max value, which is defined by the drm core as DRM_BLEND_ALPHA_OPAQUE, so nothing changes regarding the alpha value. Signed-off-by: Alexandru Gheorghe Reviewed-by: Laurent Pinchart --- 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 = { From patchwork Thu Jul 26 16:17:54 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: 10546137 Return-Path: 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 0502C139A for ; Thu, 26 Jul 2018 16:19:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4FA92B418 for ; Thu, 26 Jul 2018 16:19:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D79B32B88E; Thu, 26 Jul 2018 16:19:02 +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 89CBD2B418 for ; Thu, 26 Jul 2018 16:19:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DBAA56E7D1; Thu, 26 Jul 2018 16:18:56 +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-he1eur02on0602.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe05::602]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7279D6E7CC for ; Thu, 26 Jul 2018 16:18:49 +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:47 +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 v2 08/10] drm/sun4i: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Thu, 26 Jul 2018 17:17:54 +0100 Message-Id: <20180726161756.1794-9-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: d1504a7a-cd7b-4f74-6be6-08d5f31377ff 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:5kPqF3/FL8o/oq27YkFHknOHcCKv2Cl3TFpk895kEr0SzUqVswqwS5mj3/THTtznv538VKdVz/m/F2CB/yO5V+2c6bte6pWWXuXqH05+HDqwBIRStxD+2vASTSNTZ9Hfapnr36BpyW6+ww+F4GRqttI0Alw6ll+wXQMe3NvszfBUEu3pMTzL6bPkn+IDeMeqNcxfsRIrU5acBMuwC48g/gDRcdLmuTi8V8roVzuAjynSxm5lDoru6CLwmE3NVTO4; 25:M05R+fhH4D3+sVtBsQLSMiUic8M4kZmlk9rq2sBNjA4PNB5wtXgTerHvztslySDJP30kOWbbdu6h1IXe7O1/vEw0QSDV8LPY4Xt6njPAV6DvjBrWBJDgfnMaFQ7xyDZHIgG8bLOMJtcSgadYPYmS4JdPUE/GlolPIRovcQTgkRrIPbMTJoMFa00JcjGiD1EBJSqJgP6oMjXvEEFHkcw73STKCt5JzsWG8rQrNvHQrNGb2jIzaqViEOg3tCcGMkXnlw+ZIbbRrhNgU1DVeE02kJQX0HYzPSrMhoNEoUwgBUeeJFxef1MNjiXHylIvIee8InN4T8dB3aCkAJH2HckYWw==; 31:gieygxOSlyHaneZpjEfofPUCcAlf8rHGg8cKs29MwfMWTyWRjz2XsrfuBIlSRXbmtrppWU+Zv0z34tm/b13Q8FhGJ6XkTZZO7KMXFhMKPglji94NFOyQdwI1/9O60kfi/XkLcpl2U4MBW1fmm9wBqsE3MlHA1IBJN+6OLrEqCsnXB5h/mALHe/e0HVMUhGJhDphaHuxEiFenluvbYKil3pIxlc1U/+2iprg3VMwVM/M= X-MS-TrafficTypeDiagnostic: DB6PR0802MB2552: NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2552; 20:jIxPrfkvre2mxu8kdAocxguIfSMpf8U2RtL/Og+FjvE+8NAVFeTP2xtQX3Fi3fZgBtwJppkOlTwJa7EUHeVU+NVruRwsjsLOZrtRIwKGu36Yh2vEXXr4kSwsNObsnPJHvnxaPOC6VwzXzsqCWAaV7Ql/oQiVXpiUS54HdHZAfawC771oo3r/8r0s4STXa5HGWWeDtsFjvcua7BqbjSJ3TGoF/qY2HIG9sq+uMjMpPdossLM5/xfmey31GtpSMt6ZliFUasRO8Esvxehi+Om5gaTPozzWECFmsEFKnP+UgjFy4nmbig0SkdQkM8XcCmgpa3Ao5/cXFyxkTGNL0cZTHQ==; 4:C4juNiYhk/0k8vPHrBWeFoX1+mjYh8bbBopgglt5hKGrubI7hBXmx3euKTrCNLh1OroCqkFfaK4C6DeDjZvxVdGmopCdasMsB4Q3Q370KU+N+UfVQEGZVdI+4qay9N0NFBMj9DfFh3S/hIaHEWiZLNyUCz+MguUUdgboRp8BUpUOzPhOJaJelZmqx6mWT0f9ePOArLcETpHA34lkTuMOwNPYdWpvFDugg6paEZiWMIVeNyfmcXdi/9VLFacQaduF1N7Z7QaKnXBj3elULiqADF+fCD/sG/z8KoXNY/7/RxsI3kmG34EydeRDeBGdhgCj 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)(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:hV/rbKFGMehySohUoCIuedzuDgwHcXxsl79ag5+?= j48HAivutH3mAU0XoVBa4EQw4EMF75Cq3ngDSRcQT2vQWVpgNZI70JybjIErnKChjAdfq2pRJj2dCiFaodytKW3LID3zOUUCASezEe+fyl8stcPdq7LYsIyy0HsASCm+Ks1BBe/VvuRKwxSYCZ0Z/jVxAP4Uk4U8GCmQ4684HH9zWDcMSnKOzWep0LxVsDapP/Zub4nm2gp/01uRlKAHEwT2qScWmc06izeI6Bpxw/AStSTAP8Eut1u1UcfIvLmAMETokDdKkNpe3dS+HQqkne0xDjjmkirLfuRCiu04aP5UVLXbHtypUPyNLklcJfMEd4s44Z2pRiO13wqbleSxoxZ+y8REvZ54l3QvpiNVztjq4DYIZoHhhEsNrQv1FcXIEOuRfJncqLqgYF7Fkg0wqEeRWdT0wQP2AdECmRXUIOTEi0pA1xE1jQvoV2lrcEQoPmJGu3lPxFe9eCEkHr7VC5oIKbgcF2KNgnGHKjFmztdO2LzttbDjFsv/bn4uebrA3W0kUutrJUbviIM8/44PYgoKPETJprLEP1Zblag83Gw8XqfDA2f+Itc5h/uTU+ZQvGBiU1ueL4zsUtM74YGDgvGIoRCbBUGHLFamX3dgPa3pTjT32Dp1KttnzqoJrIL3xVAB7IbDA4YmO0kxdI2ePfsiq/J20OVzb6+GoK4XO99oX1DQweQ8xd1EHIBH7/5am6SCUpcB7QPX2iSvUqEQPD32lZyr61k/1dO8Bi/7mHp5q7b+YZOcXScDuScocDmncrORR+FQGpoBhYD8sleMw6DuF92VgVSssncsgb9Z4d8ze/zvDOo9JmqqVNiboXqBiNjx+yHvqb0uHSAXTETsG1f2qcr4REcaMRAKXKNA2wj1MgRhRCJSHgVJwji1a/JYZsUYN258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h8/u32uezO9OwC83MEkIORhIQ13FNhO5YmBp8HEK9mLe/BEC8fW10eYPhxFciQq1yDcWSaSDMYq17gOPQ/BypnhVcQA/JH03VKWAo2m9BcTavJ2kkBZw+euwIrZDKl1z5LdRUJ3u155Q==; 5:lv9cpWLhBTLOFhaJd7SwAmYGctxwV6345SxXZMdZ4lixcWRZsGqi8TLVhwGErIYgnG8YnDhmSiqmuP0ychiBiVMo98D8jpGRl6wjkp2aFVNTWGx+nfNzrw7MELd84PUwksmBLqAJYZuXkAPrq0RO0n1kmO8TeDlebkZD8HFbvCM=; 7:AF8/YHfbvhn7g896E6VmORJ5epV0o397Wm+0LgiHR9S0Ivdo+4d88zWryf7aCap2ax77QX9DaijenN1+kxUWIAgP0MYlFHCGtapoADqgCrXcRaslu8nWZp+RAgtZmhO1UjbsOVdVwxyJXI7qjK28/9ZON/Y6Gyu0RZ65W9ieJ+aWx1McOtUSzFp24Wu6zVgZfpGZRgVN1tiq95HuO50r6EJNZmTeb0fC8KGT//9wIHwHdvvm/0xepMfwtPDnXR9b SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2018 16:18:47.1697 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d1504a7a-cd7b-4f74-6be6-08d5f31377ff 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 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 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. __drm_atomic_helper_plane_reset initializes the alpha property to its max value, which is defined by the drm core as DRM_BLEND_ALPHA_OPAQUE, so nothing changes regarding the alpha value. Signed-off-by: Alexandru Gheorghe Acked-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_layer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c index 750ad24de1d7..78f77af8805a 100644 --- a/drivers/gpu/drm/sun4i/sun4i_layer.c +++ b/drivers/gpu/drm/sun4i/sun4i_layer.c @@ -35,9 +35,7 @@ static void sun4i_backend_layer_reset(struct drm_plane *plane) state = kzalloc(sizeof(*state), GFP_KERNEL); if (state) { - plane->state = &state->state; - plane->state->plane = plane; - plane->state->alpha = DRM_BLEND_ALPHA_OPAQUE; + __drm_atomic_helper_plane_reset(plane, &state->state); plane->state->zpos = layer->id; } } From patchwork Thu Jul 26 16:17:55 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: 10546145 Return-Path: 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 0371B112E for ; Thu, 26 Jul 2018 16:19:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5BF22B418 for ; Thu, 26 Jul 2018 16:19:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8DC12B88E; Thu, 26 Jul 2018 16:19:08 +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 900742B418 for ; Thu, 26 Jul 2018 16:19:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 12E976E7D5; Thu, 26 Jul 2018 16:18:57 +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-eopbgr10042.outbound.protection.outlook.com [40.107.1.42]) by gabe.freedesktop.org (Postfix) with ESMTPS id 900166E7D1 for ; Thu, 26 Jul 2018 16:18:53 +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:49 +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 v2 09/10] drm/vc4: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Thu, 26 Jul 2018 17:17:55 +0100 Message-Id: <20180726161756.1794-10-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: 129eb402-936d-4610-362d-08d5f313799c 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:IjxoInD4c00EpmB0iBcmZcdIQInsh+VyAE5doCbml1IEAdm0dbyamNwBQ0iwZJ9tdB+Vis1lE8MHtdC7nCSTUZ9JasDi1gPv3HGAOjOzO4CK0bUWEejG9M/hzFxI8tQfZfeygfN84+bBDorYawfh6P8IQdA7vAlKFuTAEpmaSOndQ/a+vq0brZ3EhpqPqINnZT9orFal9E3KIPk2aKfi6UTywx5ER7RCPN6AIFkvl91H2/S9eF2YKFid7sKi0u/D; 25:yVKNlrHzQX84vf/cXeWciF7HcwsLua8BdUhUrxZRDXFmndt0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1ZoYDpRWY8tqWr225726NOk+Q4zsFFtVlOS/J676DKnV6dXY2vEWeMA/R5aLm/NhJ4W0nJ2Ea6YRbwjajHWlwZ3BMR6gm+Dkj0vnlbuL8dnQOMPE3Kthner1Eu2ivb3XVpVEDrF0qa08cTsp9Q/7XxplBYQRmNZzHqgkR7lip5lnHHfJuvpFy/PQLBpxeWWU0+iyOUx5p0o440 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)(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)(575784001)(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; DB6PR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NDdhJvLGPwyANDCnzKB5W2ZgnSVNj0/MS7kg==; 5:o2mPh9wbBM6y88yopQggDz6iYlN1qjGYZqlYOQ2HWC9xHgERQcN0dphStXe5gOIsz/HzZ/Wzoc/NMrgPg6Rj7Hm3o3xK2ZIVrkp9EH/d/XoenyQY1Viw6MMpnCGOpE0mVPwxABf9dS5n/6IVlFJ9ub9d2dcB1LaHqrGmwToWHrk=; 7:J9hij1C+p6HmKlE9uU0sPf4WeeTUUeFAzyWSxoxagOOq0jiGFbwYtHMQrd/txcoMxDEb3V0QuhxVFxieFMoJ4afShC8u4GbHwZQwJ2/k6a9l0QcII0HPeQ7cJcnIE4EaX0g9KMB2jV9vdSbu+Yra548QEVAPW3J6db1AEks3K11p+UdmdbR/7AhlvdsdPdW4U6c/Eqc1DOc6we3y9LhyLgQU0wBczjQAsPUnbTtY3SYlkPMM/G3PoPBdyDdIl5Es SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2018 16:18:49.5687 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 129eb402-936d-4610-362d-08d5f313799c 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 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 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. __drm_atomic_helper_plane_reset initializes the alpha property to its max value, which is defined by the drm core as DRM_BLEND_ALPHA_OPAQUE, so nothing changes regarding the alpha value. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/vc4/vc4_plane.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c index 9d7a36f148cf..688ad9bb0f08 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c @@ -200,9 +200,7 @@ static void vc4_plane_reset(struct drm_plane *plane) if (!vc4_state) return; - plane->state = &vc4_state->base; - plane->state->alpha = DRM_BLEND_ALPHA_OPAQUE; - vc4_state->base.plane = plane; + __drm_atomic_helper_plane_reset(plane, &vc4_state->base); } static void vc4_dlist_write(struct vc4_plane_state *vc4_state, u32 val) From patchwork Thu Jul 26 16:17:56 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: 10546155 Return-Path: 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 E1973112E for ; Thu, 26 Jul 2018 16:19:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0C022B418 for ; Thu, 26 Jul 2018 16:19:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C337F2B88E; Thu, 26 Jul 2018 16:19:19 +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 742D92B418 for ; Thu, 26 Jul 2018 16:19:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 00EB76E7C4; Thu, 26 Jul 2018 16:19:08 +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-eopbgr10086.outbound.protection.outlook.com [40.107.1.86]) by gabe.freedesktop.org (Postfix) with ESMTPS id E8B5F6E7D2 for ; Thu, 26 Jul 2018 16:18:56 +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:53 +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 v2 10/10] drm/vmwgfx: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Thu, 26 Jul 2018 17:17:56 +0100 Message-Id: <20180726161756.1794-11-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: 3f69fe89-f1ff-4773-8ec4-08d5f3137b9e 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:UScYIkrFbOHwud1NcWbdsEHd/RJggF1rOjMqWX1XWGpV6qEUPTEs7mv2wVz1LoCU58gYszvg1v/M5NyzRKS84HuqtQzNcoLrUSb2EQTjZ6Q3WhHfXKzbFNnwFTu6FjGAD1nANFXeKtgLNKaQyJWIQqVVdGZEeXOfyJi98P04ay5C4pcuTrdArZYYD6YxaaVwYjGA2mobVHHtKPikjB2b8xClge/77XiPI/ylFx7zW6mjU1l1cPsUaMTUV+HW3sT9; 25:gzK6S0AIfMtqsG5JzyEJl6YZ5UllxyJB4/lPEcZh14xKc1PcL0xSLbmM87din+WGbHgip/pKKpJipKT8KG3d6zu5+C9vA82Evkl+KoYO9RG1HHtrwZbiWhHw07YjpVvFns94EEBZ3PCbX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JbTQHrTgWjzWKMchRSUAP4/TdsXArjr3Z1ZZ97sy+Dk0fbwtZHGsYtIHJFHHuDjmZ4K0CI4mBg1aNqRShrL0GSEiNzbg4rxe2ErB8eFPlTjyH6I3+dJC3DhVsLE0K6VEVdlULGOTboH93UoJCtCDdu458lJy/Zukutq8B8ZcY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150)(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)(575784001)(50466002)(7406005)(11346002)(7696005)(3846002)(51416003)(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:KaGmsFPv9y91y3pE15T6Owy7DC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; 5:2QvkH2t5fItWms/BaXlKdactGvjTIJyMEwLKx6jFwWg+qImIc4tANGD54u6qsebJdOfgSRHcu+vy0jy4RCfhK5eHco8xIGbD2tY5qvOLYnIG/L5H9dvgxAlD7JodC6mJrcRVHVMFmH76fOtJNEQtxTRZZyBuPqMn7oUZR7AifQc=; 7:MF90su3od3hBcM+fQ34vGUY2vMc430FeTpgqJpiIAvU/MMeiYWGVjJNJGsw27pUzkjZFDk2iQl/NZHBp/7ux2uIQz2g87SpfzeMWOuqPmxR4mXBKu7osE8dTuOgGoGSLFwknltFT1lHAvsMNE4x6DMRXuXudQTwDQMgAvgsDDwmSqMp0TPkPCPD5+54fFOqMGcFp5vbkb9Q3YRiBvLt1YTupvX/kk3Xcsgmft/Urx+42WrW/mHfkhXFQJnVLAX1U SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2018 16:18:53.2338 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3f69fe89-f1ff-4773-8ec4-08d5f3137b9e 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 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 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. Reviewed-by: Sinclair Yeh Reviewed-by: Deepak Rawat Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 4a0f0f41afa1..61824e360619 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -720,9 +720,7 @@ void vmw_du_plane_reset(struct drm_plane *plane) return; } - plane->state = &vps->base; - plane->state->plane = plane; - plane->state->rotation = DRM_MODE_ROTATE_0; + __drm_atomic_helper_plane_reset(plane, &vps->base); }