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/HwIPRVHlEySSOjwpRmNMOumHB/J4bWcd1p+7picDsQnmUiWoKv7shRhhm/0DPH3OM4y7yCAkVFBRFji1PVJTALuWxlmLPvrPPFoEQ11hViQbUad6w2faNc+k2tyPQCZuS0foqJlCwuOx0ZHBQbwdWYxBOOOqLrPK8k0IP4WDwTapuTyu+Kye0xMbRTQYZMoq9Ag==; 31:3ujjgQnj/T0Lo575vX3/KmXSFdF8o04AWe9KyfYNh93a+pI4ftxUAw8DTYFY6DCCGWipmuEB8yindH1DKhlcGWUuP+NOnyRQa9/AW29Ds5NbtiZzpdZpSNiQ0HuaosTnwnWxk16zQRYrgHE9ETOi8XLGCqyyHBeSr58DswjFFUEIOiTRGJ9oGfriToW84S8xa6TB7ni3ol5Wh/R2O3p6NtJzGXTkjs8b5zNVIglsrzU= X-MS-TrafficTypeDiagnostic: AM5PR0802MB2547: NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2547; 20:WWhAei6maS6iRZAx3MHkDfCMCEZtiWkn3Cx+QByoM1906wMG6i2JaLuhvMeq0iw9NgPRlLVmGgFhv5u1nDgpzJjAY41gIgyCG7unskHKLQWLuKOJun7GeQ9OYE1NSoSX63HHJdKOh5BAID9VrcMB2QywdtO+oIDKskEHtK2SCOxUT26YlbdqzzfbmS2bOEubMfYNJY8GzC3+aAl0D4DkTu8s6Cuej1a3bBaK5P5de/sg8QuPA//ddAtCc9Ey4sv23kBWwH/fG/5viia1pQTo/lSOkquNps4tlibbNq3NdDIz1M8b971gIO6BqGzA5/mCrjBOpkyeagr+swlO/tnr0g==; 4:LYYmJn+ZqtAy4GvsXNWjZDQmoP5n/xGU4RGcUH/bMBX0BOiDBW6d3IOIzxCDtcNtot9sHp4uPqhygvKS8uC2SiTT4MsfnJ43/vgozwzYPa0+HIAQ+LuDPSpGhCbTwdZoMWQRLffJ6Ozoy2wZSMfferJmEUNDc3tImM1FMN+RoZkZMN/KSNYiUFT2p1vPZ0pzpCs2ivYBvQjs4vz16V0HCeCW1RkgiK86qHiI6nD3+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?= xnhpfnlD7gYmj/w/chJw+6RWcyqBvjGlCw9cP76mY+tcfdsRyCZA2sBmjrpCkhlRSOi1MLt7qDVf4FKacWftURaxgSVbaPFJeC5ODrY0EweE7pgKA2/1ZBPamR1VWruaL4efclpZcj52SBvuw8eSnttH0CNmkfLT8toz5ulK9vqkNzTWHRqPGZqh5RgmiHXJJY2oAj5lnY2Jfi2oWF9RcrdySCEl8s7O+WAR8s+3G5dW14aasgwKGhMQ5VfvH/L9dEmW2fzoNEkDVIdddKxHMLss2f9n+8+ylzUDaouT9Iq/h4nZKvE6AelZaeI8gi9VesIMvmq7rlbbG+UmkcsEVhkWUy1FiFnZW6fQqWZ3GsQh4/fCXpR7sqoaTMt5GINKpQLZkzLn7yWXTU3PFguZPdCphF9nFTB+0IwrMik4ifykyUL3fhKBqed2Nag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DiagnosticMetadata: 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); }