From patchwork Sat Aug 4 16:15:21 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: 10555781 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 38A7B157D for ; Sat, 4 Aug 2018 16:15:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 28C1B29C72 for ; Sat, 4 Aug 2018 16:15:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C5A029CF5; Sat, 4 Aug 2018 16:15:58 +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 B083529C0C for ; Sat, 4 Aug 2018 16:15:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B43E16E125; Sat, 4 Aug 2018 16:15:55 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0615.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1f::615]) by gabe.freedesktop.org (Postfix) with ESMTPS id DD7346E125 for ; Sat, 4 Aug 2018 16:15:53 +0000 (UTC) Received: from e114479-lin.cambridge.arm.com (217.140.106.49) by AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.14; Sat, 4 Aug 2018 16:15:50 +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 v3 01/10] drm/atomic: Add __drm_atomic_helper_plane_reset Date: Sat, 4 Aug 2018 17:15:21 +0100 Message-Id: <20180804161530.12275-2-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> References: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> MIME-Version: 1.0 X-Originating-IP: [217.140.106.49] X-ClientProxiedBy: DB6P189CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:6:2e::18) To AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8bb54d92-c0cd-42e2-6ade-08d5fa258c5c X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0802MB2547; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2547; 3:Yt1I0UgWw8LFFRMl8dTAdE3cbYBGAdcd8fsIdI5USV5Grzgg46ArymqJe6H3jfWe9PFejfv4xPPqiy5bSVOpu552e3+YG5HteYD7FlXpuXXB1kCBTjoX7jOdP75dUxcKdDj0j9+9MAjVQwjTjQtMiz8MDwF9yLwml8t+bt/J/CodFEZUii5lqV+beOoQImDG+SvdEW2Lf+CrFX4BZB11zMqodW8NuLcy5ECCNXC/30bbay+dBxCyPkpv1KVAI77n; 25:kPc8ThlTrZhN2PWghqgszRtHLtLKh/pogtxyTCGTGf8YMvWb6GxwQ9BoiB42VhdX6DYMIKu0H6TYR2sSo5kmgJ8e0SXsT9f8+eb6rKXeBeBHZa/5bZtb8gQtosoG5dJWnVhJG8hgNbsgbaoPlras13mQvDJpIjcZSQ0L4RkYXEkifGJjQMovkGM8U6Z36bydr5G88iuNah/zKEWbcWCK6PEK2mnkHK2fYqv8ANkf9dcVTflUFXOWvRIIUSlZm2bAoDVabYMHQfRPE1sshFt8slLg0A2J6/or32qPEjJs5Ulnad6IVV9jEk/oW7Wp22lss+FgW+8oE+kMdBkOepA7gw==; 31:8wo4HqPAdjYNXgXK4AC+dtWhN3NzKxttl6fV7zVsWxRZG9uHSKOLUXIePpa5PC0MJ5GmOYxwt23u5K1qZR9pPdPqoxFhxIXt41xlvHqvq8qPJz7az3UM1mio3OuVDbi6/T1KbkoGsE8Dpe/ooY5ztRdnQ9dJ2b02htskrDP57h4zrGEzL8WlEqDF9KGm6rvnGDOlt61bBUOSGFPkFfkqnajNjJ97iU4QTS+6n2OKXRM= X-MS-TrafficTypeDiagnostic: AM5PR0802MB2547: NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2547; 20:4skip7kFG3gogbadjReOrrNPYrSbdgXC1q0gVNgxM42bjQOHlnD9W8LkXmnqnc7A/Rxg8iyA/dBVzJlbYuADqbqouQJWX6843ZEuHb3kT7tenDLl0RuQSmQ+gS9cPfR4EFVETQZQgjXPTayYILoM/nRDt4c+uYwS2VOZqst3D6OjpAg0Sj9ETv1fd5oB1wDcZ3zWefY5VHR5oHrXt+9DXPrObz+JR9AXoowS7CbxNVr/9/gD+gNm0ACimIkrg2AM6WrlPDYQ2F30ghpQcG7Cw7J96mPx1Pz4O14+JQQ5VsknI3GJhq8oJtjRFlftUV4xIWOEjSTlzs0LqPU0OBau5w==; 4:ZcU/HKvNgSuvH5vBwMOpMT3XjL9xxqGq+FbtgoM04mwLMSpm1oGqyHxKDoxJFBHutfnnPiWSR9XdwGPS3i5IygT5n8trnnMT2HaoQg11AhwLDQYlHOoDoGZIILitIxgZDxtoX3BFcpcaSZQYXv/D+eFpuorCJYbBjv46T06nJNsETtTdDLJYUiP5HTtV/OwmNgAwFdAQf9gr+3D5qEdn1wIKgOn+r+bKo/fdPyw9fYFg4Q2YBPMK99SRwpEO24nyc256Iw8yH4YCuDI6fx490Kc81kW9qpZZTtr2mQrIg9PQEPssnOmf+/m7up9U1Ymy 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)(3231311)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:AM5PR0802MB2547; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0802MB2547; X-Forefront-PRVS: 0754F7E325 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(396003)(376002)(136003)(39860400002)(189003)(199004)(51416003)(86362001)(76176011)(7736002)(4326008)(66066001)(47776003)(52116002)(97736004)(7696005)(305945005)(25786009)(16526019)(186003)(105586002)(6116002)(3846002)(956004)(106356001)(7416002)(5660300001)(446003)(1076002)(11346002)(26005)(6666003)(2616005)(7406005)(478600001)(53936002)(72206003)(68736007)(486006)(8936002)(36756003)(50226002)(316002)(50466002)(81166006)(476003)(16586007)(81156014)(48376002)(386003)(2906002)(8676002)(6486002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0802MB2547; 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; AM5PR0802MB2547; 23:I+tm0ryqu1AdglF5kY6LgH9v+Dj1Khz+vG97sSB?= wkOx+fCmvHLVaaonWwE+aXzjbRxRZsWLVfgniB/XzQ6A1cxdJAx9ZT4J1rMZkXfp3ll6BgB/THH6DecOMn9zakA1OfS/+YMYzHFNGS8cqzsJwYCDWGCly52M511TLcRFBM1Oqp54ktUnNh2tq0r/oeVserw9zkx4WpE0CwwnJBF4x6luhV2ivDiS6cChbo0GyJ3VRUhqaS1dxsueMEScyxStNF6xRed1E5sznyTsr8WlXqv6uRPqHb9EHsnGGqJybZNppligAwQuSzOJ9CqEg7EIugppDzIVf9QpAE2mqPabBQx/SYh+5NdiDuOZHyFbf4EWUXX1LF52J+rSr981+/wKixargG1wQzNcHk5VprKQl4no0xnZt57uRnzJBxGW2fg7WXQ7PwDUaOlkp0ubvs0HoPoLcAEzzgVmXJhh/3HoD2eVIpcAUHeTlMqjlA0S3v9BEobbSJHxdXo7ZsE6CEq2Xt6bs9YsTo+cSmq+G1wD9PXPZm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KegOFcp4YqBM2b5Viy9ZSc1o7U= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2547; 6:g5c3xYwYU4UlbbKv+jl2BLq+WIfLD1s1+1zj8v3GY4lcZHjdhm9WMyfxRUJUMilNX4S3Omkm2BhZnKlVP1Ek7jm9Efo+HFNjjvd9KpZ1tGTQ6nZZ9sAzU0i/pH+iX0gA4gbFVy7M/VHMAqwSBTzcwboOrOl9Bhk4Th9hethnlI5FvK/VcVmZ3H1fUgJ6xxlsXmxohaCo2gfr0264l+/ukBAN8CAZ2NMtCo264C01S0mxOwiJ5CoRw6wc9ECPamxItJyOgXMIF7JyBY3Xlej6eJQDcTI7nAuEK282XxmgrtZE6SUSTHONtmTIKxQ/pzpArJovGpvSYpIQGI5j7m4/lM9dydorx0icMHAiVVX1p+9sirnMpnEY0hWMppz08tc6O4YZA+Pv79TyHYw6itdL/2YtB9zmvWjyBWOV3CdCKon01kRFsZMyr0/3gZGG6xIDD+o1S3ZaA8F4EXDc6KPQTg==; 5:aY35QMmQv0GUTmMmXU9Ls7tANnYDkt/XZLrO4TJNU9/8wvPmDizJk8DPpedjWdoveiFe3bWrp4pSqzNhZPbRKuyHKQf8iuoYObO1HxGA2N1Rrx88t++cQFku60J5PqZ9lyCt2DcFcdAKb2cVIwYPd2iHLItsV3XR/+yCq/UTjSI=; 7:hLW+d9xEF3c9tQjSMu3PeoUv6X2ZRL1nsbu6GozUNxNymkymw2z+R+nQB8jSfY6rjevA24rCdN0SVQMCaXTApGA838J3VLkXP28Sh04gMQFKQqI1nUYSEhc5pvJhAODB7Wt/nDcu37IIcoTFQUbXdMlx9LDaer0a1lBQUmMkQ49VPNgAGW4iqm2pR/rzUCzGTFomBef4yI+iA4F45BefX7ehIE/ncAdbn1EoDZxtXSAKTg98qmL9JV50vqET4T6j SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2018 16:15:50.6464 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8bb54d92-c0cd-42e2-6ade-08d5fa258c5c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2547 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 together 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. Reviewed-by: Laurent Pinchart Signed-off-by: Alexandru Gheorghe Reviewed-by: Philipp Zabel --- drivers/gpu/drm/drm_atomic_helper.c | 33 +++++++++++++++++++++-------- include/drm/drm_atomic_helper.h | 2 ++ 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 866a2cc72ef6..6dd5036545ec 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -3552,6 +3552,28 @@ 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 +3588,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 Sat Aug 4 16:15:22 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: 10555785 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 426DE157D for ; Sat, 4 Aug 2018 16:16:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F64829CF5 for ; Sat, 4 Aug 2018 16:16:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1FA8329C72; Sat, 4 Aug 2018 16:16:10 +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 73A3B29C72 for ; Sat, 4 Aug 2018 16:16:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7268A6E12B; Sat, 4 Aug 2018 16:16:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0065.outbound.protection.outlook.com [104.47.1.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id DCA736E12B for ; Sat, 4 Aug 2018 16:16:06 +0000 (UTC) Received: from e114479-lin.cambridge.arm.com (217.140.106.49) by AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.14; Sat, 4 Aug 2018 16:16:03 +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 v3 02/10] drm/amd/display: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Sat, 4 Aug 2018 17:15:22 +0100 Message-Id: <20180804161530.12275-3-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> References: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> MIME-Version: 1.0 X-Originating-IP: [217.140.106.49] X-ClientProxiedBy: DB6P189CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:6:2e::18) To AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 899629f2-490d-4d5b-ccf2-08d5fa259408 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0802MB2547; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2547; 3:ydeL5gF/7Ph2NlsX8++NMntQFF5L87lp25j3MnFD932L9jixAugDSulBN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8UgVruLKZPqgW0jikbl53Fc7+7xRc7IuE0ubqncqaHvcAJLs3B4NPNHQ0c6z8WZvqsnkX42xSCKsByHtNE3UDM34wBiZ36rnaSPWPMY/7OUDNt+19RbsFEouaRNQaSA==; 4:u2QOkbSaNgzHyl3ZN0Vaj8DvsCRD5fKDKPtnn6RvXdQ65yKphcJTTdqOv+ZAshCQDGEx1tksn+IoVP5+PWYgrJW+Mi/8wNf5dFTPOf5kLotVGzrXiLnpUlpuu+azkAAvpssoiwH/1Ao3bwZjeEusQsytkjlzB9/gPgUKzrcxQVkmIH/lwYw4z7gyA28VcHthtefye5korhH7RZySA7NRYTdmALoIzs14b4sjjLx7eV+EXKSpK0aWIjydBXoVFQUefXuoFm1tFZhMze1xnf+QeaixbOFQPlNH5adfiyqLVbfGghQ3/9OiXfNe88bq6xMviydRHPvwi+HLdAzOnGMvLA== 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)(3231311)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:AM5PR0802MB2547; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0802MB2547; X-Forefront-PRVS: 0754F7E325 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(396003)(376002)(136003)(39860400002)(189003)(199004)(51416003)(86362001)(76176011)(7736002)(4326008)(66066001)(47776003)(52116002)(97736004)(7696005)(305945005)(25786009)(16526019)(186003)(105586002)(6116002)(3846002)(956004)(106356001)(7416002)(5660300001)(446003)(1076002)(11346002)(26005)(6666003)(2616005)(7406005)(478600001)(53936002)(72206003)(68736007)(486006)(8936002)(36756003)(50226002)(316002)(50466002)(81166006)(476003)(16586007)(81156014)(48376002)(386003)(2906002)(8676002)(6486002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0802MB2547; 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; AM5PR0802MB2547; 23:0eJOkbOR8Z5adursk7lhyS1GprKEcMr5fIiwmxH?= qT3luBzI+J86FWGI6Gex8K/VY67Wa5Fva0FKvT7bpgOl/PXJqlChOCtmqlGttFVTzIgLasKcCrF/b3K9n9rfux6hn1E2eKGrj2qfhBm2lzW2j/+BOPICERxMt1xuYJ7cq2zWezGaPVWgIArvkWqJmPlwpZawwna90no6FG1PxIgLYWK/MkIVkIe7fMSyH8JlLfBkeeJYVWeSYC2dZZEWoQ83lOnHFtvjtkna7rR5+RT6OAO7eKyEbwhvWpOJYbFaM7pnu6xe5yTHS23eGuc+OEXLW0li+Pz0baPPagb6RRFA3EJxryWHa7KHdzG262nmwiNSEXdI5IAB/dF8KhO9P5Z9D3WwRjplKLzgpzfdlegLCMXp/KHoB5JvSzMPrKCTiKkDy8zZXuK8GT2wrNBMmO53k9Q0zQ+2t4R04ABon/QqwVeit07QdxyRz1xdzuRT2fV8An1ltryhZpileQMzuPUhp6LucsbGZXZimIbhRf+JaFTvCRrwkqoIHtShEN19mwp3sC3eAFugNnm58moZEWgdvHzpZ2vxE/s0ayl1TaKZfUcvEyQ6xI/xCuyBVFgfceWtF625v5ZHMfOIe71bitXmtaiCg/ttpYBBFuZ/1WfLNL3aOj5Z4rFaDAM8Or6Xi9ZzvdpIsMwvO0niRIjNgY1itnfUP+7TeW3GzysQt09IFMAtW3arwOObzaHxsedw4VrkQoSea27EqHreQYJyXMaBRYJPmpR8SbJcit82ejLUZNK41QnleoDJ2FiFuWqYaWgd3Prga/K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YyKeNPXtAQ0I0Xd6OmjH7JP8F04rQWY7yRcLS6L3AjvWoG+G6HrXzAhMCClbj7m5l8/petQ+0LKPV4pCS2ErJNZWGfFCoXWgHzW3jXKCGHELlxDX9lXkKm3rLR88JnyHhfSBSkdzT2t85iQQI/JUN67w9DDsv5v6v0Ef8GPVMSjfQwynxPKPLGkhB3jDBihuwWKFi23JlwkxVpcyJaNq6fqryFMaybXThfqFrZA1rTtwjrrN5nZlnjUN1S7HEn6Zs5zY3LA==; 5:Vzpp0chgN0BbQLbpovoACgzixmOxNSMh6bfwHfUi2pRwU8wh8KcBdUn1T8QJcRDd7g4tleCPKPBIxxoLckLw3NrssYnaTC2QlX2UWBxs4MMvS8RmaTyEQsVwk+1YGDXNUsyaNh2j96t3po7zb8MBl+tyVuC2kgp31kMd/qvg0z0=; 7:Rm41WdW+ihDWkGS/uYq6uWiX+JLHh3cs4hqtPvpnZeB41VgFOxgQ357wAJJY9UQtaWM5ZENHPZ1QdlFHJiJVCBeyqSN4er8mU5mtt/mQCv325InvJfvheMbueJpTx9TUiZJBYGkOcqDxtSaDTOHRvsCuP+IvOOjIfqxObr0mCvqdZX6gGqycdMAz1KBOxdkZySRm1El2EKiTIYPh5HQY0MUVorIteoRQarExgRnakW6OKAjJ6mFvrSTLsoVML83s SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2018 16:16:03.5151 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 899629f2-490d-4d5b-ccf2-08d5fa259408 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2547 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 Sat Aug 4 16:15:23 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: 10555791 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 4755A157D for ; Sat, 4 Aug 2018 16:16:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3866929C0C for ; Sat, 4 Aug 2018 16:16:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B46829CF5; Sat, 4 Aug 2018 16:16:13 +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 CF9E529C0C for ; Sat, 4 Aug 2018 16:16:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD8946E132; Sat, 4 Aug 2018 16:16:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0614.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1f::614]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7E4346E131 for ; Sat, 4 Aug 2018 16:16:09 +0000 (UTC) Received: from e114479-lin.cambridge.arm.com (217.140.106.49) by AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.14; Sat, 4 Aug 2018 16:16:05 +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 v3 03/10] drm: mali-dp: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Sat, 4 Aug 2018 17:15:23 +0100 Message-Id: <20180804161530.12275-4-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> References: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> MIME-Version: 1.0 X-Originating-IP: [217.140.106.49] X-ClientProxiedBy: DB6P189CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:6:2e::18) To AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c98e269c-b1ec-4d92-2939-08d5fa259582 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0802MB2547; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2547; 3:RnqN0oBK28mo+OoQ9Gq2h+4G2rwL+1JiBCUmYNouv4alrYDuV6koW9g5ZSrDDjjIC3BFQf/xTRuEsztO2gOvu7ADdxdKdOhVRlTNe9sWjl0H6LpoIGpUp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DbV/dWMV7iznE9ujSmvanLtLrr2kxkug0C3ptjSHN7ycVZDeKKib0+TqdJyl+q57ingoLDmUsf6oej+MFddw==; 4:gfn+qRhK+pV68MIiLp0ABBd024A0WyxGYbFCjG4rsERkCtllLes7zi3CwwNgR8yPZiDayKkj5X6F/8R+1XEgK8NS3OjQJTPMKSveJW/BEFNVZGZlrOAgtmu+1PNXfH+aYLJ7ZvyNh9HgV0zBCKxk+CpnE7W8s6auJfmePyNMUDiPOj6v83+bTOtdb/t6gkrdcEocjdMDkNlkTqRl0Z0NPK5GmriPxbbu9KqevgxCqNXoas4c4mOaeWuFkzX9nsCxmENfHiCx69UlddJEcxoUCYRerlcx9q8jgN8enXC2m3QZhzWedIUrAYQ41s1HoMoV 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)(3231311)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:AM5PR0802MB2547; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0802MB2547; X-Forefront-PRVS: 0754F7E325 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(396003)(376002)(136003)(39860400002)(189003)(199004)(51416003)(86362001)(76176011)(7736002)(4326008)(66066001)(47776003)(52116002)(97736004)(7696005)(305945005)(25786009)(16526019)(186003)(105586002)(6116002)(3846002)(956004)(106356001)(7416002)(5660300001)(446003)(1076002)(11346002)(26005)(6666003)(2616005)(7406005)(478600001)(53936002)(72206003)(68736007)(486006)(8936002)(36756003)(50226002)(316002)(50466002)(81166006)(476003)(16586007)(81156014)(48376002)(386003)(2906002)(8676002)(6486002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0802MB2547; 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; AM5PR0802MB2547; 23:JpMt27/+eloKjJcv4AdnLKjckLYNMPbtf3zoqKN?= 6YNFrEKR10nunI1jOW7K4PPaQBYdzdxX97Bn67yr7ArUsQNOYoo3J0PwhvDH1OyX+X+veWQ6+yxVX/xKwP3vxbhz6huStIOrioEJuGTfVFdoiXg8+JfagxVm3l7rHMUzgZMLNxovW8R5KFRFR/ykirFiUbnb3IfxJDFT/v+QQca299oHSQLcAKKQ+9cvM601PB0eueGt/Hbj/FqDXZmbthguKxGk0zBlMqtQZyB/i8odZVTZlMllmlqmsrF/WL2dfzPN36U7OshvJpe6GaYw4N+Mq8m0M+JI7guQIac9SMKl+3frOsw6C4kNZPNRU3z818lIygUBs0VntSXaa98USeWapfNgKrQrzAOj+WfndsIBUP3D4YrujRqyyh67+FodBowJyXhXCXqs0JHA6Lg9x5Msdx/0bwJDLHe5INgcrVJeRIWOBHcQlD7EvqpEqyLIS3Vj6zMMbYscX8fXI3rXiJUUXiaQQ5bk+6Sv7ZZ5ZpAsfFOiSZEcRIf3j6AWyfcxHjsQgOwhQLGlYw+IvVQpLk3YQFo6CN0uSlOXNu/vBPEa4j07ujjZ565HYGmwE5DhlR83QKqPWmyGBmJKOPVOIotdqVptjU3CnhkHniJIL+EUYOXq0bjoJi5Ov/5zJkj65ymHTcebv0HQ+Cs43Que8ZtB4oSKtV5xUapr2DTPKkQzqDyzEBT1e7YCaEvZ9xTxU4yAHF8OI7xU6xmMaRH7pCWI7VCttdKF4IbqGg+BdJCAmh+/vn+Fv8DtbLd2ZD+A1wR+aMUiD5IFBr97US8ptByRJ22lczCbLdz96D1kUggUUashBCDn2ewzqHC7pYbK7HYYtJzIDqRO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uuw0bPUv8q8HKVJHPyueLEhbdKFw8XQIdn5ppQzFNQiqjSMc6fxbWAg9dwVK1nL25mbkrGsdZfjtSVODdZdlimuFQPrVL46d5rR/SqfeUvqeshwZKXB4rrDDyxgGWss0lFEy6LY1fJPca4dZqfDC9DxDbwhGy79H1hXq8Mv5vYWCvFMUgnSm4efs8JdkuHfzQ==; 5:jfTF3rNPgMi0HcUV/u6RhKYyVDCdS/TxUNN/0Zh2b8CAVYhqfi7p8HLs3wsNsChXzJiofwtzOJL7OUyKo8E8r+n3qieJFG21xfEWYhiJhiYS+7oIJtN5ZSW4HZvWYRfBgj5rNo/qNzuCiNCIsmO129jW8+mEZ+HeYSZaiX/gi+Q=; 7:U9t6NaJRHVXJad4TPwogbLBHWNEXilUGZgNvN8NxTpFF3FNZvQ9r6NtnG6GOA4vyJIH25YxdheNQVnzgIKsi+oSaFwcZZKYgEjqgFsoZRvIGGqrwDExHUl9Di+hWaoBOiGKSucsALcN1il0dWZvm6C1bkKqCaefWIc2zALsEKHCuzooojWyfRumPCsBuNiCS/aSgoom/0ItSmHbZws5t8gHQKWdXMoIYikJGUZ4HWEpdntLJ3afBlbygYDstgdyW SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2018 16:16:05.9902 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c98e269c-b1ec-4d92-2939-08d5fa259582 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2547 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 Sat Aug 4 16:15:24 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: 10555797 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 55BEF13BB for ; Sat, 4 Aug 2018 16:16:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44D9729C0C for ; Sat, 4 Aug 2018 16:16:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3786329CF5; Sat, 4 Aug 2018 16:16:21 +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 DBCEA29C0C for ; Sat, 4 Aug 2018 16:16:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BCF3F6E149; Sat, 4 Aug 2018 16:16:15 +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-eopbgr10053.outbound.protection.outlook.com [40.107.1.53]) by gabe.freedesktop.org (Postfix) with ESMTPS id AB0106E146 for ; Sat, 4 Aug 2018 16:16:13 +0000 (UTC) Received: from e114479-lin.cambridge.arm.com (217.140.106.49) by AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.14; Sat, 4 Aug 2018 16:16:09 +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 v3 04/10] drm: atmel-hlcdc: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Sat, 4 Aug 2018 17:15:24 +0100 Message-Id: <20180804161530.12275-5-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> References: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> MIME-Version: 1.0 X-Originating-IP: [217.140.106.49] X-ClientProxiedBy: DB6P189CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:6:2e::18) To AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 23c1f8b4-6e40-49ac-e42b-08d5fa2597d7 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0802MB2547; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2547; 3:zvgcXUHcMCpCcFFwDypLBTaITNyA0tdIld951mwvWUhm+KUl34GAwX9PzOzfwGg5IRW3JnFZgMR73ZThQX6669/jZalxjz3OaRQkNFtJZpdMjp/6MoOGeGclgEfYVDj6vDQKz9v2k4pqbz1MxIkxnR29BcaZTEmptdrpNwTGuze6/elFtuZenVvwJv07NB83czoqJ9+WAC1B5MCZBWcQ07IBmdnI8XY6HABg7b34u4CMI5Sx8d0xY5YpbjOYVtRt; 25:qzLl4XvwfUnLI8oMW948SpcR04IiGceTpqAuz0p9vqsAl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oOck5MBf95M1SCFjF60W5Sq5Qq5A2nWyTh1K/JQzPSAT63NijI1GFdTCpM1s0JmMAsxU7zCeLmMCnKRhYmZ/HLMlXFLScGK0qi9Ymhpso5aaz3ofvu2bcJben4hyQ+yp5nNCV6meyDmu2VCEojcXY2AmWDTfMmVopzWVS2ZyiXWeVALQVvlY7L4KEBjVAvohL8t3WLsEATnP2Cs1GoM/00+ 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)(3231311)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:AM5PR0802MB2547; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0802MB2547; X-Forefront-PRVS: 0754F7E325 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(346002)(366004)(396003)(376002)(136003)(39860400002)(189003)(199004)(51416003)(86362001)(76176011)(7736002)(4326008)(66066001)(47776003)(52116002)(97736004)(7696005)(305945005)(25786009)(16526019)(186003)(105586002)(6116002)(3846002)(956004)(106356001)(7416002)(5660300001)(446003)(1076002)(11346002)(26005)(6666003)(2616005)(7406005)(478600001)(53936002)(72206003)(68736007)(486006)(8936002)(36756003)(50226002)(316002)(50466002)(81166006)(476003)(16586007)(81156014)(48376002)(386003)(2906002)(8676002)(6486002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0802MB2547; 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; AM5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TcuEVpLWyS0o/7XLIFBOHinU+09y6Su4yalyeXGVodVwseyw==; 5:OS0v8jQMJAjmsKGMnv4CUzNSmbSe/+2Vi+y2WvUSulukitSC8zPwr3xRKysvEl6NjRIP6etHG/Hx7DrlA0RqtGcqpsfob8NJfiXKzjzgRylV1r/KAfSH0Ft+Vp6t3qjZkUO17eGFlUqRqyqw43j5kN3SqDG4ytcaEDQ4K1VyIzY=; 7:iggMg64va4/tIqczTJptrISe/cGmXDGZ5LCvcOG15W6CUrJZ8fhGUCkZMkKoCN+agYs3LFO2MsCCQq4H/sf5NC1J+XTdudzD3cSlvbH/JWEnKUJ5b79OW1xnyW8HDTN8SzfhcXS6tuuVAUDnqxJ70BXh8/Cyatovcpf7Ypj066mOGznMchR77yJnQHCCBESMK9YmTXHxU9YPMojj1PZDdCcuelq/1FXNiR6qZPPiJoCMkaO/vH80+OtcE1s1jNcS SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2018 16:16:09.9105 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 23c1f8b4-6e40-49ac-e42b-08d5fa2597d7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2547 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 Sat Aug 4 16:15:25 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: 10555795 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 DE6A713BB for ; Sat, 4 Aug 2018 16:16:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD96829C0C for ; Sat, 4 Aug 2018 16:16:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C169729CF5; Sat, 4 Aug 2018 16:16:16 +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 662CE29C0C for ; Sat, 4 Aug 2018 16:16:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B66F6E146; Sat, 4 Aug 2018 16:16:15 +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-eopbgr10053.outbound.protection.outlook.com [40.107.1.53]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7C0B96E146 for ; Sat, 4 Aug 2018 16:16:14 +0000 (UTC) Received: from e114479-lin.cambridge.arm.com (217.140.106.49) by AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.14; Sat, 4 Aug 2018 16:16:12 +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 v3 05/10] drm/exynos: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Sat, 4 Aug 2018 17:15:25 +0100 Message-Id: <20180804161530.12275-6-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> References: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> MIME-Version: 1.0 X-Originating-IP: [217.140.106.49] X-ClientProxiedBy: DB6P189CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:6:2e::18) To AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 05a283f5-5767-4365-6b55-08d5fa25994f X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0802MB2547; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2547; 3:yXiwIhFz5OU4Qe0KunnsrYURuyUjB0154fp4nvbZucR0WVzdypieFWaxw0rpGWZ9cZEloVofb5FpTaGEIx7TyiFMWtta+KL9DcraiNxaMSGqF3QZiGIvR55Rz5Fuq/g503ELfPPvxJjrQ45DPobSan8dTM+sZtXC0X9H3EVty7rf16s12zeeqgPaeZPmQoVG3EgFWx9Sdm/85rXL3ceDBQkDLYs5uknODNSMY6l4ZSDtX8j5pxPqLglh147ZDUCX; 25:z66MGtjRV+seYSoTBpkO8MBFU0G004VZRmP0ZDEPVPtokth9EkYB6eBR8y6akjMFnxwquTbZrpfVnQFfbXyoKXc1r/39jhHJpcW0lBGcctKrTEUZNLc1ydIQMbbZEVSijD7Bpl2CDuIaFfYiAv99nBEOeTJpXCvHUqeFzmBBK/1E3NXkg/5YPVHDuYV7b1Tk+mLGsT/zMr+16WwzNtSaguqrqj1xSbQktso1ip3wbvtgVZ4E/RwwcFbOX6NOEhZi0iIgnxJ8+K8x9v67GZBwAbvSHMXuDTVuHXDU8LQvGfb1PMAEllEgf3708NCoz1i0Dx3M73sfV3i0SYywjn/jNg==; 31:93iifDCyaDPG/pBq/lzeo0dssFoABhHKqkyUY6uiwD7H5uoTcUqCYQSaEkEbKnXFL8UtbS44pUnobfafrEJs3E55C9CiaB6szAdp/rv5oARIDbAfuwVmfVN8XvLwdjZBBek11ltLbW21tAZOZs5h95rN426dkSHLzPKKbMoQIafejiXHBIfwVgjA+0LYEFwclpbnT/68Eqoe6KgzE6t5zUWfdR7SczC49ng/7N3lbpY= X-MS-TrafficTypeDiagnostic: AM5PR0802MB2547: NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2547; 20:RMdqc5brDU2oA8iQcEtQgu5I67K8MwCi4n48SSg5a1aXVkt8oKBptiGJBoyUkz/MC3z9tL/uKZrxHrVzjJeb3CdFnJd/zkkNaFPNSyQ2rYD0wbnai+cjyd7VWur9ISTrAVI9pnsmIyMXmUMpD5wmYFnKpHqQjOA5bU3I6tKcAklOfd8g6bERyJuALbe8TUTM7PcFzJNvjKUoRehkn/xfAyhU/vi+eiXMA2iBl4VN78MTkBlABMajzdiLZ0MQ398DGNQozeBWCe76ZQqxLysa9XGTddy6JMNA0CtJbjX/cszZ4flEs112m4NUrHwW0zH+somOJbT3U/kOay13XKqsnA==; 4:iNNvRnei6rdIJZOuM3hduxIRLqIriR9qvD9XHSOD0ndNDBu5wVEbbcjkYaKkliSXf8922JYmrMiZLyGp68E3sjXpsWOh0biOPbWwRwCziN7YqSPF7LvsSCSk9tcz9W3Jwoeq+u1L8jOuovTN6beV71eCFIjCH63B69g2DZaY86QKDdZY2yFeN+/0vsGN5JufPyDvJ/CfjdjqAtEg53K0kRU59sE/Rx/fDuS0vMiJ60L5OI2uGUNuoXLV1zvsJvi27uBfwHkGPGEursIHB5eSLovSa+o8clcf7nwL4PC3VkgG/H/0/d7ShHQEg0bw2cNc 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)(3231311)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:AM5PR0802MB2547; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0802MB2547; X-Forefront-PRVS: 0754F7E325 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(346002)(366004)(396003)(376002)(136003)(39860400002)(189003)(199004)(51416003)(86362001)(76176011)(7736002)(4326008)(66066001)(47776003)(52116002)(97736004)(7696005)(305945005)(25786009)(16526019)(186003)(105586002)(6116002)(3846002)(956004)(106356001)(7416002)(5660300001)(446003)(1076002)(11346002)(26005)(6666003)(2616005)(7406005)(478600001)(53936002)(72206003)(68736007)(486006)(8936002)(36756003)(50226002)(316002)(50466002)(81166006)(476003)(16586007)(81156014)(48376002)(386003)(2906002)(8676002)(6486002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0802MB2547; 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; AM5PR0802MB2547; 23:K6lWYs9WvqvyQhMrdirb656d4s6MbPCr82qKqY0?= ZfXOU4ZgL9HLwClcoMML9zUkO56z1+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j4f78rV5gRjQdKNzPVe2avyZus4wMzdt7ap+6Bptw2Kl+5ww0bnKcA0Gfx/osRHqeddP7y7vkgu2QKFzF9vB1asyKhcB67YvSokUAZOo6OXcofJavS15whEGLRFFB2H9Knl X-Microsoft-Antispam-Message-Info: zah7lEAkoX0lwJGxqxjMouTbkdaGADER7xNSdSzqUa3OND5yeAX567vXATMz/FqnAgDviB9gZZvGelivUnolFAaqQxzban75sypk5/XK4qrm8ItAUULBLqvqqOHdsUSMn30CRiMh8JlhCt6jH+2Lqk996Vup0gpZpwqrChTyJVm8/vZmA/tG9nqmtgDQciedyMTB79aQ1ey2bpdt4i6s0S+hEN/DfjS8ZLkl8UwjIRUhFst3gA/8iHub/eTSA/Au+fwy5jesNEUg90jGsnbyPUT0j7sm7rko8L1P+6Hh9g6lOlEi3+Dx2OabYKQFqJlMTPZE+wF052C2Atc3LjP55zQuwIRc9JxnINtrCK3nQ84= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2547; 6:Y1+OsXnkRBS+1mUmNUQmfNdCm3n0BbPi3pmT1pt2u5EnKAuqNvlUktNocKmIqkqxOLZ+O6oKdZO81pEVw9BYJgs2gTmPx4F1axmhjoPclaKI4Lb3M10saowz3mpQKyx7itVUB0qKtW+rcjS+l7w8lg44yYn+oyxyuJkNyy7IF8boseNNTyie2UjT1GvwubGN6eDC0zaHpcThRBlPZomT3+cTzTBDJL3aqbBEntzBL+fCzc7+HsmLkB+BlsJ01JwArVv+BjdBBzR2Mjs39S+W7HAAJRI5OGwUKww7A2DvDU97HgU1IkjVoBSccHfscIWsmzsVoHzSjBga7cXGOBwu9tJj490cBAeODkbNmbd6mnFHt87COvDcEw2JFKEerHaiFfv2GI64aPOeAMSH+5WYIgeAOX+RiCXkFpvhidglUywUJfUyrdLaYRm1RYmUFotkJCeqVvOBQQ2zwWWNV/UDrA==; 5:DQiiB7ooIJ7XffwKEvYLr9FQrK1LYBCY/0tOk2yKPR7EYuvt8tYiShHrzbgZJCRDIZqksjzzLInRL6smx7th4l243mFQKEJZoHxoOPECRsXhfoNFd6LHIk3KwbOGuq18KMtpKFK0OzEKp+4ldzlpSuDh38bgVqrdxCWKiMfOiSo=; 7:WXtxf9csr/GpPFL32jMG0atOwxy4rGnOoOUzbWJeReuIV5Vsjt0mwX7zjAIYMJWwCHTEKtO+tcMmvZaY0D6BzU3vCqWhC0SgySbb9zOED8PFCH4oHR1IEeVax4wg603oOH3M7kFwOBg68dqlpn6oIC2eVA3eOckJ06L7+s/YGWcRWYCEOaq3QBqp0VS/SOz12M+pfDtd8qXeb0ZEofliHXQWwVHtdvtTuJwWv/fTIUN9adLQlPS3YsqRV9Y6NlZP SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2018 16:16:12.3736 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 05a283f5-5767-4365-6b55-08d5fa25994f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2547 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 Sat Aug 4 16:15:26 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: 10555801 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 4EB2E157D for ; Sat, 4 Aug 2018 16:16:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E01129C0C for ; Sat, 4 Aug 2018 16:16:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31EB729CF5; Sat, 4 Aug 2018 16:16:27 +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 DB84B29C0C for ; Sat, 4 Aug 2018 16:16:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BC9996E153; Sat, 4 Aug 2018 16:16:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0079.outbound.protection.outlook.com [104.47.1.79]) by gabe.freedesktop.org (Postfix) with ESMTPS id 335D36E153 for ; Sat, 4 Aug 2018 16:16:18 +0000 (UTC) Received: from e114479-lin.cambridge.arm.com (217.140.106.49) by AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.14; Sat, 4 Aug 2018 16:16:14 +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 v3 06/10] drm/imx: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Sat, 4 Aug 2018 17:15:26 +0100 Message-Id: <20180804161530.12275-7-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> References: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> MIME-Version: 1.0 X-Originating-IP: [217.140.106.49] X-ClientProxiedBy: DB6P189CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:6:2e::18) To AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7eca791e-ecec-43c1-40ac-08d5fa259ac7 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0802MB2547; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2547; 3:YborpWm/oVqE/K9kJi4XnPTfD64r4LsLPFs8TJVtgMhtqYJ1P1DV1TEyXeSPTK1bQINbNT1xHgbUJPoB2xgInizOkH0T0YbSIyW+bMSNh5/EHDTVLL2/a29SKxDIYdHtYsAOYhPG5Kt//kKnfCmRQJ44Su04wUuv91E/SNJ8CerAJJECIDOELzYeTIE8i3R1iWAgUabE6WepL3lBiLGxBNqYATdZ0SMvMykXpadHimpB2l+CFY5VvjCYp+WQoxp3; 25:o9mtUN1YjVh4uu8vXj0wP5GaOOk+G0Z2ap4CWYW30Ln8bmFvdhtejSw2CZi6MDgnMwCPWJ4gS1i4W6U/tCwfoiKOoba7qRFK1QdqpzV8IewsqaBz8LmBGMp3WM3SwVEdLOng9ekh6/t184iAP1Pp0sIp0DcWHD1LhkD78FIxbWV7oosltcHnnVYe/9l96ijJa7yA7kTCPa2JgbbMmU7mZwniFfpKxdToJVhJPzHeylmVt6RT8LEXDADh8JBbntO4rcQ8l+DmdUSFXUDUV7g2Mkn+hQx20uSezYKH+aQBtJrrtMlVcCRKPbLSAJgimoL7N9SsoSO5bqISqKygMdeYPg==; 31:67taDI/hj96U6xhqW/L9cr3bJQ2ELdS3BayOceisyVg9JyB3+haSqQY4A9JdZbVn6cQvKTUXFog1VwglhcWK7vlG4d+Ibq/gy6K7Oy5/kkoypjxsyXx9irEfXaxv06OWI3iWjeHZ5sBjJfCOFSS1ajG5J5nbp5Gb1ie37T4+0LabzmyiedtoybiYjITozdrXC7rSDrDcIWbGPxpZFFkV31pAZl4p9b4NZGDmsF/jKzI= X-MS-TrafficTypeDiagnostic: AM5PR0802MB2547: NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2547; 20:a97Z4QYvXxC+div8FK9L86nfxgtMPqWPhm/zpjdn05MDgrvNBxCQCPIWVU32WZMdwidq12M1iWrRVyUlCrhWbl2kGd772J8nGLDtmm/s6/MsAlrEsRQC/N2Av8fgRYfwVM2ofSVnhDQiFwkUZLNFbmVnL3Rys0i1P5qHvbBzHnmqLp/Ino+0gzC4gumr8h/cCC2AmO1Dzqlaj9RyCCjTFwvYSdqsTn0gdXnP7GTCwM3l2xX/2KPUzxHWOSidpziz+ZIjiF82kia1613RHNRJ0hehXRM/Y3Mhgq3N9AKaaQN1gNh+vs3jVyFNcsGEcCbBrHnhaSyq1Y5UTmf2XWmxmQ==; 4:St1MecEhBan/+vW1reDW+/kjQf/rNu7/4b9aQtS+h+/fK9R4WMceBVIroCLOKeGaLRGbzFsO3YLq2+0Fxl6PYPSVTJ5YO3D0zF5DcVDEZYDLe+mSFM1/xvXZSLtggywBLGMqgx7rC0uaXm1TkDjVGRARohU9rF3uZ9e8Ap3cKCiJ3XqWUMept9N/INW/LdGvNdDDa5RntYpG7QXi/xReo6sTzIdvxW2ltbVV2uSfT3yMHbWOKwRGV48cKtWCYAWS/GvIDiRtJGtnTVpeFqDf2eLiU34Dop3OLlrTz4CcIc12ckSQND7T8PTDVRtLT1vk 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)(3231311)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:AM5PR0802MB2547; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0802MB2547; X-Forefront-PRVS: 0754F7E325 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(346002)(366004)(396003)(376002)(136003)(39860400002)(189003)(199004)(51416003)(86362001)(76176011)(7736002)(4326008)(66066001)(47776003)(52116002)(97736004)(7696005)(305945005)(25786009)(16526019)(186003)(105586002)(6116002)(3846002)(956004)(106356001)(7416002)(5660300001)(446003)(1076002)(11346002)(26005)(6666003)(2616005)(7406005)(478600001)(53936002)(72206003)(68736007)(486006)(8936002)(36756003)(50226002)(316002)(50466002)(81166006)(476003)(16586007)(81156014)(48376002)(386003)(2906002)(8676002)(6486002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0802MB2547; 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; AM5PR0802MB2547; 23:nGvG89itY2vv0romFS7t8f0iQtJOTZOWtHqXqGG?= p8N8903QgGTK4pJ6+0erFcfh+k1iAosG1QubDCPfpwwvB+CS3ge8/NouJQfweFtd3j3AqJUhrb3kQxk1/1exwn/9eGrOW+DB+fG+OLhr7i/arGz0cYzeWeUAhKVHDC/FR1tthwBworsbGLaDAIRbWOE6Dvt7+LVZ1BQ5g0MORpVb+xllCdWCC+lhQ8XpwcZqH3hB49mQk6VrpzbkCnCfw030yc1OpygqnzPZARbYEnIfIZVjbSg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kcGZ/LpaxwLI1VhsCptFWvnD5nQjOb5pUtPD5ZGsLFN/8IuFiwNDzO8gaNwT1THJQmQYRQ/mLvi4fvbWz8YI7pD6qzQBoQNWgiorCpGaJea7LbIYCzuhPLbNe9p2zQgsOvPC2UCjOlxLUwdkVEv4bnGTsgVee/fFGSjqrpn2S1nQIQ/3ASR SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2018 16:16:14.8376 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7eca791e-ecec-43c1-40ac-08d5fa259ac7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2547 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 Acked-by: Philipp Zabel --- 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 Sat Aug 4 16:15:27 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: 10555805 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 A4196157D for ; Sat, 4 Aug 2018 16:16:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 933A929C0C for ; Sat, 4 Aug 2018 16:16:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 868DD29CF5; Sat, 4 Aug 2018 16:16:32 +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 30B7C29C0C for ; Sat, 4 Aug 2018 16:16:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 923AF6E158; Sat, 4 Aug 2018 16:16:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0040.outbound.protection.outlook.com [104.47.1.40]) by gabe.freedesktop.org (Postfix) with ESMTPS id A73EB6E158 for ; Sat, 4 Aug 2018 16:16:20 +0000 (UTC) Received: from e114479-lin.cambridge.arm.com (217.140.106.49) by AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.14; Sat, 4 Aug 2018 16:16:17 +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 v3 07/10] drm: rcar-du: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Sat, 4 Aug 2018 17:15:27 +0100 Message-Id: <20180804161530.12275-8-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> References: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> MIME-Version: 1.0 X-Originating-IP: [217.140.106.49] X-ClientProxiedBy: DB6P189CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:6:2e::18) To AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f17cab18-3357-4ede-9934-08d5fa259c42 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0802MB2547; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2547; 3:zI9yEoXyk9H814Z6zLD0lE6Zdi45K+UY3rRoygPEebR+ZKX4nSJRyeq8KBo76U6uoHddt4T89c34Kgj4PwvHt8KS7jiEXwG79SpUx673Kyt5UmK4dGamFgPoAisIf44RVjzcYsbocxeKVQvcy/n6ONTJPc9IVf20zFriaW84r6tMybzOXR+4u6smupEzYYgrO9cdbbjxs8Yw5F/MkrVsYVmIOPNWjzX1UC2D48IyaT6iNf5y8GiByIrbuht+mpHl; 25:+1a0jkdWllcxAwlYSeaPwYFke5vc8uyR8YEH7d/X7+jVrsD5YE+NZRpi652sJBpAK0KraO1a+avZGFX4zoorj/qlhxVGWZeKkITky4PQPSiVT6xYhGqqxt0Js5B/TLK2nhzA3s5HCl9P2X4xhjfppO0ab7qIBGEu0pDeh4IgN4HXav/m21IWPnZSIHihFEfvLM7EXe+SidAfJniPvKZUaG+fwsOHOFNIoFjpH/p3HrPCuTk3uQKbf58HjNZI2h9ufX/1eWDmF4gFhTmgr4yrZBj1FsIY52sPiFwB9JaXws3NwabKL6sYd3Ksg463lz/SGpmQxhZ35ZyO8dvH3Ubrhw==; 31:AkObh9ODrXy9QbpDcZBBp2816i1pF8+NrgSBNQGCH4UsnagD5IKFRaSs1XmUPZsY1Xr+dB2lDL2bh5o2yFWlpTkSQGH0QrIv/wMUh8WfXoRPVGHcmTBJUq3dkHbZJa8WWc6vzW60f0DuPcshztusCSmF816pTjCFMC4YhQFgBwaDpkgGJ+A1mlon2+RTteNm6R+UuVdG31EIpRyW7LVqJ85RBhynzjbILuYAE9ERou8= X-MS-TrafficTypeDiagnostic: AM5PR0802MB2547: NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2547; 20:8JaHyV5EWp/JVJ+PbkURAHPNzqev8pPqGJUXHoAAo+DYMasHtN2nX7z1ZX5XbWhmE3PPFxrZ0XYscTJWkTxtNGZFmOTXiEWQCfFtwTDERbZErv5SrqjiaXOuZvXKr14y0GQoB8986bChUhe7eil6Ot9sgw3zSSrNplVWwY4Qb8yAUgMS7wPhZ3rggduzScDFS+PYTf1SDTU9datKgoLQRcpODXKGC399CuR/bFwTyMNkdH9bgHDGBO01fmQOHUi+wS8wtqsG1NNL9RvApvRcqJTBrDoqsdk/e2k79a8E6kcxZTKiFC7IyDwdx5qVM2b3SP3ukGsoILofqQmHbAV6+A==; 4:nZRFZQt1bhxqOw3p9eCjovtzeclPKZomVJe0oF53zjKLpJK23vUZtVb8USag7NOllrgJYtTspzszpM7phr+htcx4UM18/X9pZcX5pshDs+2kk1LKl5YwIyN58DMQFWoutoo/IfslxFZouJsrWP/4ZXriItegtMFzC9I0mdHHRkxu4PdUhujhVE5CKvEbDdlyjal3yyQOVBDHg2Y7510JiUUN/F6M9XldxXesm+KjUNLfkIkJxa+hlxCjt8faEePlQ+FtnRHDPoyBj6VBJdQ99TN06TpcHP7Dx2QydQMWB6ZTptz/6tQa71PkIi0EjVim 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)(3231311)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:AM5PR0802MB2547; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0802MB2547; X-Forefront-PRVS: 0754F7E325 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(346002)(366004)(396003)(376002)(136003)(39860400002)(189003)(199004)(51416003)(86362001)(76176011)(7736002)(4326008)(66066001)(47776003)(52116002)(97736004)(7696005)(305945005)(25786009)(16526019)(186003)(105586002)(6116002)(3846002)(956004)(106356001)(7416002)(5660300001)(446003)(1076002)(11346002)(26005)(6666003)(2616005)(7406005)(478600001)(53936002)(72206003)(68736007)(486006)(8936002)(36756003)(50226002)(316002)(50466002)(81166006)(476003)(16586007)(81156014)(48376002)(386003)(2906002)(8676002)(6486002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0802MB2547; 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; AM5PR0802MB2547; 23:toc5HTA2bQWT3I4pUqCthTePXAgUS+XSTK75hcN?= D/Wo7UGqyBnuNGhJwJKbAKynTdXY8dflvPLfnrGxJ3QpjkTAsyRbz2kkmPw6LXJr8LFtLpJ2sJD+8Yh45uwWqkem0JpITi15ybRkba4nJ0iSSNnrzg/KWf6q4tkTP0jKUcBuYMvilRpsVdx8zE7NmzI1Ql/EQUmWTxlSLx6nRqTRubwjJLqcI6CdIAw32lzOxlZLCtoaASPc97OZE+iVcevvgZ9dIEqBqVtabir6jqPXtYmMTFDzb/Duw+ssb2TLzSyGJz4DK4mphuY7OShDT6nSTFaJQjQsxV/SmBhGBHXkGa2L0DIrZPKOT+zWQckXlOV1ytgRn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Q4scReFMQpn/ckUv3LsGeUol0R5B+ur8dQlg3g+4lxS+Y2Ew5Bf1dWB2hxrpgYbz8yNXcH6Al0t3Z/Z/xFyb SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2018 16:16:17.2697 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f17cab18-3357-4ede-9934-08d5fa259c42 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2547 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. Reviewed-by: Laurent Pinchart Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/rcar-du/rcar_du_plane.c | 6 ++---- drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 5 +---- 2 files changed, 3 insertions(+), 8 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..8861e715c248 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c @@ -690,14 +690,12 @@ static void rcar_du_plane_reset(struct drm_plane *plane) 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..45eb777a16a4 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c @@ -346,11 +346,8 @@ 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 Sat Aug 4 16:15:28 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: 10555811 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 33D7113BB for ; Sat, 4 Aug 2018 16:16:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 232F529C0C for ; Sat, 4 Aug 2018 16:16:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16FF129CF5; Sat, 4 Aug 2018 16:16:40 +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 BD97029C0C for ; Sat, 4 Aug 2018 16:16:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DE96E6E15A; Sat, 4 Aug 2018 16:16:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0056.outbound.protection.outlook.com [104.47.1.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id E3DF06E15A for ; Sat, 4 Aug 2018 16:16:22 +0000 (UTC) Received: from e114479-lin.cambridge.arm.com (217.140.106.49) by AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.14; Sat, 4 Aug 2018 16:16:19 +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 v3 08/10] drm/sun4i: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Sat, 4 Aug 2018 17:15:28 +0100 Message-Id: <20180804161530.12275-9-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> References: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> MIME-Version: 1.0 X-Originating-IP: [217.140.106.49] X-ClientProxiedBy: DB6P189CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:6:2e::18) To AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e1f841eb-7b53-419c-3f9d-08d5fa259d9f X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0802MB2547; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2547; 3:bF8TIiolSsmSkKT7Mal6skJ6aAEA6LO9ZUaFaHzwZZ+YzaKaVeDJBZZtPH+rn1e5xyRlMivYf6B/DfsHyi7ZXAwl9FWSbSxQKTmhxHo28SGFT6zjWN1oUaBGNa4FF4V1NnUv2255EYVSzDgBZn/+0tjepgPv+DqhvpbelWrjyIjgGoWP+W0glTP7wY8hHOU5yfoKvC8X8KYvSbhTIIsPSbKfGSzgVfKE5AAI3oYRsk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d8lQ8WP5ayy+Yw5ETudAX3u5SALBGvG4umnvL90OGvoooaTjdnQPPFKFZZ64E0vHNg4V+VYJ+RwZBSFIwFcUtPHB3WUYdYlsPLeWSoUuch3Yhqbi2Vb50FMURI2GahyPXAHowYvHkj5DRP+BZiVSsfbVsbiZr54x7lRTTlpRC65aX9045bKa4wHreFw+DstnH1DmDhoZgaLM/36p67Pgo/KTiAAzTskItR6Jgk64rSLKliyX9A/xl7xje8e8XCNkpwm+3cKIBqYDLPa2A8gK 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)(3231311)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:AM5PR0802MB2547; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0802MB2547; X-Forefront-PRVS: 0754F7E325 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(346002)(366004)(396003)(376002)(136003)(39860400002)(189003)(199004)(51416003)(86362001)(76176011)(7736002)(4326008)(66066001)(47776003)(52116002)(97736004)(7696005)(305945005)(25786009)(16526019)(186003)(105586002)(6116002)(3846002)(956004)(106356001)(7416002)(5660300001)(446003)(1076002)(11346002)(26005)(6666003)(2616005)(7406005)(478600001)(53936002)(72206003)(68736007)(486006)(8936002)(36756003)(50226002)(316002)(50466002)(81166006)(476003)(16586007)(81156014)(48376002)(386003)(2906002)(8676002)(6486002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0802MB2547; H:e114479-lin.cambridge.arm.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: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btKblwJG9zc7ZmpFYhbpxVtTjMML4lX7iUC5wv/2wcHh1oWs3Xr/9OJd3R0BXvmVGgPyo9XHSuIPa1Lx9d2CQmGyP6/MfQyQ==; 5:2WxKyfUOrnn6Ma82opHJPXRvcGuw3DyHiLKB9NwejMNeZErZA1egk02b1/NDDeaaQuxKdo6xZcAxKBN22/GKyXtmcoBtL1F5KDYQVyRKkboCVnzEebbxYjs1xs5GSmix85Gc9yjWR71fwx+MHS/28G3xvtTxLxP+oyYKfBp12qs=; 7:0mky6FrG1VS4sD9T2ugvK5yndAVp8NeUlV2UjF8NDqKmpNmsCR27Ix3HyBofQS8qxKk3H9BWz5Df9LETrsg+YrniqaIfG0rJxwVfP5I30tmf2AVhRKwtdTxQrPbixrWLu5r46lrdfN8KPyjDAdmIUSRsHDWDrrj/JSrFSAhBGtkI51uh10IyKyer7sK3kdl7WP93q3/0GzEhpljWJZpYgoNjUzkfrrZpIipGF+L+icG9pUFwe+yjmg2Yro79YZHH SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2018 16:16:19.6066 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e1f841eb-7b53-419c-3f9d-08d5fa259d9f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2547 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: Maxime Ripard Signed-off-by: Alexandru Gheorghe --- 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 Sat Aug 4 16:15:29 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: 10555815 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 30F43157D for ; Sat, 4 Aug 2018 16:16:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2046D29C0C for ; Sat, 4 Aug 2018 16:16:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 143C629CF5; Sat, 4 Aug 2018 16:16: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 BE82629C0C for ; Sat, 4 Aug 2018 16:16:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6AAAE6E15F; Sat, 4 Aug 2018 16:16:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0070.outbound.protection.outlook.com [104.47.1.70]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3EFF66E15F for ; Sat, 4 Aug 2018 16:16:25 +0000 (UTC) Received: from e114479-lin.cambridge.arm.com (217.140.106.49) by AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.14; Sat, 4 Aug 2018 16:16:21 +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 v3 09/10] drm/vc4: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Sat, 4 Aug 2018 17:15:29 +0100 Message-Id: <20180804161530.12275-10-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> References: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> MIME-Version: 1.0 X-Originating-IP: [217.140.106.49] X-ClientProxiedBy: DB6P189CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:6:2e::18) To AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7b89b1f3-3e0c-45e4-edc2-08d5fa259ef7 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0802MB2547; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2547; 3:Ky8nNtoOTbOtpSPraWE0sfLkOcAP5k2nqUPnhzEHdbC75f0X+ykh8egVOS8qvhFrZPBBJsdbsTPJoTfwGm5e2Rp4C/1nhD8GdP+JJoYZtYmvoG3XQxAB6cXCdXOgnKTfLEym5Dp5+9ks2D2ZFutnaShOVbKC3J/xBqNUCYvOP/FPyrCgcqTbpBrXsx3DWrwhx868vf9d9Bljv4eEJ6z8hfdG/+sLI6B7BeQxIGX4JgV5MHmgohr0mtOTC+XApbtl; 25:KBlFIOpnsx4WBYWxdvv0BfJqEc1DrXjAS5Ql6t4VeIQNomXEgy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mOx3BmRcU5zzLOyGY9QVsUZEfB/yf9FEJMXVduJcQxZmxRr+4myHspXD3RMhU9OqwUX152VB0/0/hBMonfWX0/kpkd/yCDkggWw3gZRB7taU0uFQ5404EwVfIPZRrJFgrWoLmC0hlqbLfxDMYuMwP4P3aV+oIAJaLftr45PhEl3p89jFkWEhvbZbuFdUslC1TY/90Jm35cL 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)(3231311)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:AM5PR0802MB2547; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0802MB2547; X-Forefront-PRVS: 0754F7E325 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(346002)(366004)(396003)(376002)(136003)(39860400002)(189003)(199004)(51416003)(86362001)(76176011)(7736002)(4326008)(66066001)(575784001)(47776003)(52116002)(97736004)(7696005)(305945005)(25786009)(16526019)(186003)(105586002)(6116002)(3846002)(956004)(106356001)(7416002)(5660300001)(446003)(1076002)(11346002)(26005)(2616005)(7406005)(478600001)(53936002)(72206003)(68736007)(486006)(8936002)(36756003)(50226002)(316002)(50466002)(81166006)(476003)(16586007)(81156014)(48376002)(386003)(2906002)(8676002)(6486002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0802MB2547; 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; AM5PR0802MB2547; 23:umRSz7L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EHdSWi94Z+EIHxqm0ke+lZw==; 5:dWR1nwAltWD0r8ym9NHXxcXUxdofOHAmXKbKIyJ38zjctRYHtVYb4PiN8BvtFAMRo2iAR5HWK9KA057UWBkaYEhAYbx/60AIBPh3aCA/TW3tuFhupTGMaAPtq2g1V+3cPI+GPl3wfrbujwP893ZiZnkufS5odTCfjPGLqjxn0TU=; 7:DOfPTaxR5RF54YXrc9SiUjRnUi3bWAeodJQlm3bPduakh47K1kCI1zk8n0HWxToX1T2af1ceu37rnJGCPqDNN0G4Qij8YISXzbm4SpP50ZkZlrrwK9WK2GF74zqvNfcK1T6iTUEhfcjuARpCB92RokxvlT6j+1UyFOEqXaosdyRvnS5FL9QCL6fBzi52relCvW4j+qgSF55iwR1nJXVZ5kBRdzItcWs9Ovbh3VIHuP3UQ/87367hNRzrZty1wuKu SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2018 16:16:21.8625 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7b89b1f3-3e0c-45e4-edc2-08d5fa259ef7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2547 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: Eric Anholt --- 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 Sat Aug 4 16:15:30 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: 10555819 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 04645157D for ; Sat, 4 Aug 2018 16:16:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6BDC29C0C for ; Sat, 4 Aug 2018 16:16:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DAC0429CF5; Sat, 4 Aug 2018 16:16:48 +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 8FACC29C0C for ; Sat, 4 Aug 2018 16:16:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 076826E161; Sat, 4 Aug 2018 16:16:30 +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-eopbgr10087.outbound.protection.outlook.com [40.107.1.87]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0B06E6E161 for ; Sat, 4 Aug 2018 16:16:28 +0000 (UTC) Received: from e114479-lin.cambridge.arm.com (217.140.106.49) by AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.14; Sat, 4 Aug 2018 16:16:24 +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 v3 10/10] drm/vmwgfx: Use __drm_atomic_helper_plane_reset instead of copying the logic Date: Sat, 4 Aug 2018 17:15:30 +0100 Message-Id: <20180804161530.12275-11-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> References: <20180804161530.12275-1-alexandru-cosmin.gheorghe@arm.com> MIME-Version: 1.0 X-Originating-IP: [217.140.106.49] X-ClientProxiedBy: DB6P189CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:6:2e::18) To AM5PR0802MB2547.eurprd08.prod.outlook.com (2603:10a6:203:a0::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3d8f2a53-a40b-45d4-6c38-08d5fa25a07e X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0802MB2547; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2547; 3:ydQh/kukRcRcN9qtiRhqr1uyOdsiIyjf2xxM6L28QMmVwV6cxe/mbHvjGBJvCZOg82xHqnlCfl2BujyoAYPgOyY9HmA3CqsN8bl10Fq+wLF3/Twoy0GE/tJf/MdLBEHzwA+DRAP5EexKHcguLGqHYTOv2mojm/aJ9MYtdAtW62Aogim33Z2Pk4SIZOj8YfD3cduvJOMTHeCoAhxxZre4JABhJkkOHBsg36KzenEajetcXvafvD3E+J/rpD0siynr; 25:dXnJEKx/PK2UTaaNDZTcsVoJ+BWYpjhxIX44trl/gQHXgMd15XuCvqmz36VK335kI/Tqimv4lxxmccS7CR7jl1OUR+6BI6E4H0bBeuspWf0geuoa+GFGJtaRdkTePBWSs5J8uaJFE/J5bu6/C4/HwI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eCW1RkgiK86qHiI6nD3+gOUuf0t7xw4G9WktcsZIqx92Jt2NmLuEOqXTNiz0FHnh0o9Xgtfn7xINRZ9+AQGZftgNh3RTRPxmah3ytsRqTz3xqHbiRFnlezcDONkslgCR594kFCkNG6PWzc+9eqtLqI= 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)(3231311)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:AM5PR0802MB2547; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0802MB2547; X-Forefront-PRVS: 0754F7E325 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(346002)(366004)(396003)(376002)(136003)(39860400002)(189003)(199004)(51416003)(86362001)(76176011)(7736002)(4326008)(66066001)(575784001)(47776003)(52116002)(97736004)(7696005)(305945005)(25786009)(16526019)(186003)(105586002)(6116002)(3846002)(956004)(106356001)(7416002)(5660300001)(446003)(1076002)(11346002)(26005)(6666003)(2616005)(7406005)(478600001)(53936002)(72206003)(68736007)(486006)(8936002)(36756003)(50226002)(316002)(50466002)(81166006)(476003)(16586007)(81156014)(48376002)(386003)(2906002)(8676002)(6486002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0802MB2547; 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; AM5PR0802MB2547; 23:Gd6kmT4Xuzecsphoi2QsknjxfaAQnjFvVUkxj9i?=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:vKPf/fF5FN8ESvq69niQYXV4r/bVxJAIvFwrb3XiR//sminKQSyuW633YrjlRxy5Zl3kuwTxhWfgCnkVShO3idH6631Wggf6PxGmqqgAaOttxQO5YvxKxFImiaZVtMY+r96t69rRqadCmJEtzE+HiQajfXTXPG8d7rCg3fJ2NPA=; 7:655TUOYkBm2kYBHhcRO48NHOGA13RoG4NAD92ezB+fLyRLS7CN+Z3I00NRbVZE1qUYprJLsitj8f/uMxw1MrAyo7K6g5qRpUyK57bHqcYZE7d4a0FSlFytq2jVxnEL8msiFz8Oac+UtNbz3VoUZtpazeQpRA7EKXXfHSZKD372rAJExkt7gkFM6EAccs/TtvArv8U1qTmzv1j6K2GbhiL9wt3xbbwTQz8JKUio9GOLoRo4itMux9WGRI0UZyRZ4h SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2018 16:16:24.4236 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3d8f2a53-a40b-45d4-6c38-08d5fa25a07e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2547 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 Acked-by: Sinclair Yeh --- 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); }