Message ID | 20240823085341.8081-1-chenyufan@vivo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1DDF8C531DC for <dri-devel@archiver.kernel.org>; Fri, 23 Aug 2024 08:54:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 672EE10E367; Fri, 23 Aug 2024 08:54:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=vivo.com header.i=@vivo.com header.b="dmiNhiFK"; dkim-atps=neutral Received: from HK2PR02CU002.outbound.protection.outlook.com (mail-eastasiaazon11010054.outbound.protection.outlook.com [52.101.128.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2BB1710E367 for <dri-devel@lists.freedesktop.org>; Fri, 23 Aug 2024 08:54:01 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=U36jZ0mZrcfnpWf4lgpP3QXRpccoMY2IZzVbLnMZBGk0cvya7+cIHpkS1j2VvSK5GZM1cw36fsg22GSEDTM3DEF5++b3d0PhTKKMvZCZp0PHgmUDSnrZWJU59/VFVbGnWA0LIZVX+kDXVO10qugt29vG//n/OPyvX1IedSjTkdxlLsMPs5fgeQ5XXHdGJs9lk53dQmm2+g0huojcWuKJuG6Awks4VD+IuNcEb5WNkHH2+1kPULFQ53LPvhtyqv1IJkLLTOUP4nnRcjnQdSOO99zeHNYeyDEyq0o/8KYYJhzYOoI6sLB8W+x3xWLWbmAx4E4liPwarju22luD8gWMJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tCbXIgdb0DW5NKaDI/HCebq1mwkoi24fiX+E2GLe4Kg=; b=LAJjPvOXyTY1dkS3wRNTlfWQUKOmJEfh43MY/rCvGeBefhPB0ET+Ww4iSFlD31teww1e110+rYwapZb5EAE8EsWmaF6b9hEYa7zSrqk4Fel9Lm/avKgW4daFEKJbOMIkgVjC8Ai48DRS4LqMjgX3NcVSsIbtDWUz/29f20JHQkrQgtWAIfwo0ews/Hb4c9nPL4JQ+OiVyXRjTDePbxw0nC/k/HpEWBbPdOi473THmxYAigxF0m9WfYx/V84yVL+RCdh8fyfZBxaetLGyhlPjBeDzO9F5DP+ddKodQs/FcgiEiUl6afXSUbFjGMFp5a2U1uxrTNV92szCOfGqIjvmXA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tCbXIgdb0DW5NKaDI/HCebq1mwkoi24fiX+E2GLe4Kg=; b=dmiNhiFKeH09DjCUmydEGilOXOuodmfwYmUahrcYPefsdTqmI7nbs01q5tQyCuLIShZlYtI8N9AUNpP8FsepGe46RienStvWVPwOYbmRwv8aWMgh0k2CtlKO9jIXXu02E5NxIr349mM7uoApQOAjCx1sla808q6HCKOJvXYmRHVKDbaixUBUbtewqN0oAZm+Cmc78et1UfweB37VIQt4pMkygLNzwbOZv0b4kv3ieJQOL4ON519cMizp/knG5rjwf7ZJ5+6jzlDzJyavYNHiEIMHKCf2+TJ8VeIjn3cfJqj02LiPdaXuMxmTiR7PJviWuiAu46nedpXPVovILBqFcg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from KL1PR0601MB5487.apcprd06.prod.outlook.com (2603:1096:820:bf::14) by SEYPR06MB5351.apcprd06.prod.outlook.com (2603:1096:101:69::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.20; Fri, 23 Aug 2024 08:53:55 +0000 Received: from KL1PR0601MB5487.apcprd06.prod.outlook.com ([fe80::2129:59e5:6c67:311f]) by KL1PR0601MB5487.apcprd06.prod.outlook.com ([fe80::2129:59e5:6c67:311f%7]) with mapi id 15.20.7897.014; Fri, 23 Aug 2024 08:53:54 +0000 From: Chen Yufan <chenyufan@vivo.com> To: Frank Binns <frank.binns@imgtec.com>, Matt Coster <matt.coster@imgtec.com>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Donald Robson <donald.robson@imgtec.com>, Sarah Walker <sarah.walker@imgtec.com>, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, Chen Yufan <chenyufan@vivo.com> Subject: [PATCH v2] drm/imagination: Convert to use time_before macro Date: Fri, 23 Aug 2024 16:53:40 +0800 Message-Id: <20240823085341.8081-1-chenyufan@vivo.com> X-Mailer: git-send-email 2.39.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TYAPR01CA0113.jpnprd01.prod.outlook.com (2603:1096:404:2a::29) To KL1PR0601MB5487.apcprd06.prod.outlook.com (2603:1096:820:bf::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: KL1PR0601MB5487:EE_|SEYPR06MB5351:EE_ X-MS-Office365-Filtering-Correlation-Id: 17fda4c6-b8cf-4513-54e9-08dcc3511e2d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|7416014|52116014|921020|38350700014; X-Microsoft-Antispam-Message-Info: OKUYek/iUsWcI5dXZ7Go/8h6dhuzyL+BJk92G8UjAWX0wHqxcczGGzGShSBrdWlMoHMms/yjRnFrKio21FXdtKoIWEuAKryibxzBy7bI/ncgbAbkBuJXacM8pN0cO3fk7yaiWP796u53Haji2wTcM4M1Z4+ASE1nR5T2b2FvugScmOia5MVNFo5XoKwkBPsdYTG527Y77NEojmvykLhL1NJw1pBXo1uQkkLtdXQSxs8kVJMROnOldaHkZcj8KwamATZq44spTFzA+zuIaYYi2Db6MZrlfZgGauGNiTpwaYYsBu8s+aXVY60IKuFHJaNHytejoNmYmfsFlznUTqengOMlsf0tAFy4wKvCnvDB9cpoId2+90bGNLtfiuI1AVqW614KT6EsEYelSv2exBIiQQkVFA7b2pu07P7TgOyMUZQe5R/y8574Ddxh+WaawJcKvRBIZ0BPJ51Bw78XqlFD1+w9QLZxHF0XJKDJXD+E/6oVFd7i79wY/rhNik/tqD+NK9FN5YbCd6WrY6khC6bgR25vK0E30lnV/78PPn9wUHLGRh1ZxWGdMyfSmAyVCi7h50WqlZwp5d/CcewTEXchW0DicZL/akJvJWpjX6WLgG6rgPCEXXDJjm/4a0LzVJYkSkjyjaJZCEJCInmzkJzaTOgLlDNdPXSoiamEePJorc74c+KLpYV6+hjzPivE4e1pbiyKMhrQ7euplUeoDNt0Xpn0nENSYjbqbHG50gitTeO4Ld6lZ7HTjPMk9YlYsg7JaKQ8+M6e0GiIaIjH3w8NAJlLC/2EIrEGbhhnbQOESoeaXJkp1o4+l2qsrj8XFcnIf1XUPxCHe3LZudm8w3wlZqsJrLrbZyICapiI/XxW6X93ys0DvV5XRkLuK2TFhl1zDmo45Vvl9sfwt/Qb5UeBzHigU5F65kl0orA2aYafo+sK07ZSUEt/cqDdUyAsljMfoa9U5rQ9lpV7ztQTZLsSLVAznH+9ct98HLFT2vHrwgYHdxjOg292lqZCXFQymRFEeOWJuxkS3KdDf/he81PMbJqA16CwiGDeBnvAdFBm9THJPP48pMjutV5iYC9F9dbtO08sGtdSRmjdFx98GMcf+cwP1n8sfyeFQj/rxJl9KGtv74wgNvKVikXvyAdJhfw8gGCSNdc2N3JsDRcSeZGNXHaCbUROOVF17VBemI3Jo7ASi0VXQIVGj8eykL3uhpYJsSLtEG7RqnRMKAXmpf8KTHGEf48yrRDa9qJT+PjfLfg0uWTb1/EybZIRx6PKoKtVW3btZMjqRiyIpq3JUcUi1cKftQAC8cqhUB9OHKuu1ii+F76Mr2/rna/Tc6p1Qo9kMXKFvoIrEXKau0m9m75f9UZHmen8mHQtIJArQSbmpNWsm82B8WiJPhkQ7H6FAUg6prVtsR9cRslh5Qu5AhijupvzrVLJJ0SQib5vcTCGJKU= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:KL1PR0601MB5487.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(7416014)(52116014)(921020)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gaxCi9F8eHnpXCj5FuWv7Uo6gJrmoRnwRVEZGT5RspMx9nOV3cn/UHsEbKUhNPSgTRjhLskXUfhqIA7ntbb1D+/onCTZuiG56he+m5uC7xPCdkW4sXySKqkXvCkVJhYw28LQfZC30cihBIJQ1sObzfuKP1W9GFANAMM7SnvD7Q5Wa+tSX54CAPyk2sLx43qE47UewdnOqEz6tH+UXTnIdXSH63ScWT5+4BPW38vd0CARIgTX13a07CcJUQ/xewOrH48+9Natm4yh0pKcD0efx/wTV+Sdu9z40FijJ3hk3dng6uJiBbZx1q3SEeIQdbpSclKKZoDJDbXX8hPoif7CH5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WBKuRS4YZ617LHn0pSY2G78e0JKyQ2OeTOjoJ2Vq6sLPG0PoJhh8Tw9B81ygoJXhFuj4m800XKTHaGJfw0euGxyuutV7Of/gU2qgIeoX239drhb6mSwftjzIK2HpL5yFH0pavLSjcaE/AFOwkwFdd903KsTzuCt18gi3XYeUqb2DhON2yEByuorq3/DDe2+ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 17fda4c6-b8cf-4513-54e9-08dcc3511e2d X-MS-Exchange-CrossTenant-AuthSource: KL1PR0601MB5487.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2024 08:53:54.7785 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eSl539hSLGXkk/VKKBimT/+IZfUVmReoiFueZ94NB5zf8sOy17sZBs51NnfGuuSmz5GSPO66FIbbVGcOs4deLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5351 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
[v2] drm/imagination: Convert to use time_before macro
|
expand
|
diff --git a/drivers/gpu/drm/imagination/pvr_ccb.c b/drivers/gpu/drm/imagination/pvr_ccb.c index 4deeac7ed..2bbdc05a3 100644 --- a/drivers/gpu/drm/imagination/pvr_ccb.c +++ b/drivers/gpu/drm/imagination/pvr_ccb.c @@ -321,7 +321,7 @@ static int pvr_kccb_reserve_slot_sync(struct pvr_device *pvr_dev) bool reserved = false; u32 retries = 0; - while ((jiffies - start_timestamp) < (u32)RESERVE_SLOT_TIMEOUT || + while (time_before(jiffies, start_timestamp + RESERVE_SLOT_TIMEOUT) || retries < RESERVE_SLOT_MIN_RETRIES) { reserved = pvr_kccb_try_reserve_slot(pvr_dev); if (reserved)
Use time_*() macros instead of using jiffies directly to handle overflow issues. Fixes: cc1aeedb98ad ("drm/imagination: Convert to use time_before macro") Signed-off-by: Chen Yufan <chenyufan@vivo.com> --- The modifications made compared to the previous version are as follows: 1. Change the prefix of subject. 2. Add fixes. 3. Drop the cast of RESERVE_SLOT_TIMEOUT. --- drivers/gpu/drm/imagination/pvr_ccb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)