Message ID | fzn3jb4cdylc7fj4og2hgy73onelzurxmmsrzqix6yswms4ite@d74hat7krnm6 (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <intel-gfx-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 C261AD0C5FB for <intel-gfx@archiver.kernel.org>; Fri, 25 Oct 2024 10:57:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 53E0F10E2B3; Fri, 25 Oct 2024 10:57:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="QJWjC/Bl"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4E4DA10E2B3 for <intel-gfx@lists.freedesktop.org>; Fri, 25 Oct 2024 10:57:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729853868; x=1761389868; h=date:from:to:cc:subject:message-id:mime-version; bh=P7NeDjCRks1p9Wuk8P7MtYKA0aQnbd1yoCu1hY3F9+8=; b=QJWjC/Bl0G3l/b8ogsSc84DJcLcPdzCw5XAtZ3CxuIA9iQEM8KgJjO6H RjIvsLqdAxb30C6nsMee6Mbfmrb7rJ9FQVwzRX/x4N35xGUh0SW23T4B6 03on0iGYLFSvRRqqfHNj+30UhLHFci4I/AtpNslY9njPqyHWtMzcLGB24 lPEr3eKXGMlWtqRGaH8j6DsxYMcXlKv8Vv8+UstxoeHLVNlPkLoSRHK4i KIV+OFSHwHc/NcQYxYc33KfTEBWpadIe/+CAr58AbaQm+z10Fljt9/HEE teiXl+S82N6iKRxb29tYDd+snW5H5ChRTQqKRmwKcFdV355jG/YR0WzEK w==; X-CSE-ConnectionGUID: qGrp9E5mS4awjF/r/gSZsA== X-CSE-MsgGUID: m0I/Il23Q3mD+iyj+99JjA== X-IronPort-AV: E=McAfee;i="6700,10204,11235"; a="29737357" X-IronPort-AV: E=Sophos;i="6.11,231,1725346800"; d="scan'208";a="29737357" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2024 03:57:48 -0700 X-CSE-ConnectionGUID: 1rnQQ2R4QwCP7X56bRLnZQ== X-CSE-MsgGUID: TGW86kMsRZedqVZ078hioA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,231,1725346800"; d="scan'208";a="80991299" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmviesa008.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 25 Oct 2024 03:57:48 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 25 Oct 2024 03:57:47 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Fri, 25 Oct 2024 03:57:47 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 25 Oct 2024 03:57:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bFFWZFNY31qmzXtEMozC5DMQ7SvhwrLyPm4jP06HyOxlXT5zFVUGnyIgIfrqryrRxKrdSPo0/WgyL3t5lejUB2gSbJgoRAgaYxm0AZJ4GMrA0RBpIAtNwo9EEX9qbKq/0tHqhQ9PvfZrL20sthgwNBlDarnG28p2oguO3jVGLd0dmxvVXKCw2S/CJLaCDyz5TuV0b5yw0OVjYzCT0ltBTcplluQ24uqImcMxlkq4dcibxGpH2n65Ztq1impSJsb8kQHtyM5Ig154S61tDguRmY8fD4W65c2mB/2B7cLYP9LFbbLecJtGJe5Zugc9CAe1Xcz7spK0L69etAgpRQOgwg== 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=fXxGEvmgtISJKNuGVOOjAKlO3NulIfMw2hULu3FzLRw=; b=T9mNurNXPK1meVsPnLDp5QxYAWfTn4K/AeWfKZmaNEsM1q7rqSx00DYNDowhza2t1votPKSzyanyGOP56rDuo85HJN02Oi40lK9FiIA3bZVmS/uFunN3kUZd/FBSsLEytaRHoScCp4/JA4nYjJDclgBcam4cyOyBkeW0esN7CcXIp1is87EasLVlJRURjt98Pg/XLhv10fDC3cgJzHCla2QIPh+kcehHFv4eduvgIo4eAr8uZZH6RHa6SB1Zo0OykdEdMKLON+zvr8u6UhB186IX4VI1rJBR2EUW1XJJ8BksgdmnlTrhrJTamJM/pZoyMNtX+RpRkvxihufIJRXhKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from CO1PR11MB5057.namprd11.prod.outlook.com (2603:10b6:303:6c::15) by CH3PR11MB7769.namprd11.prod.outlook.com (2603:10b6:610:123::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.21; Fri, 25 Oct 2024 10:57:45 +0000 Received: from CO1PR11MB5057.namprd11.prod.outlook.com ([fe80::4610:6d6c:9af6:2548]) by CO1PR11MB5057.namprd11.prod.outlook.com ([fe80::4610:6d6c:9af6:2548%7]) with mapi id 15.20.8093.018; Fri, 25 Oct 2024 10:57:45 +0000 Date: Fri, 25 Oct 2024 10:57:35 +0000 From: Krzysztof Karas <krzysztof.karas@intel.com> To: <intel-gfx@lists.freedesktop.org> CC: Andi Shyti <andi.shyti@linux.intel.com> Subject: [PATCH] drm/i915: add GEM_WARN_ON to remap_io_sg Message-ID: <fzn3jb4cdylc7fj4og2hgy73onelzurxmmsrzqix6yswms4ite@d74hat7krnm6> "Organization: Intel Technology Poland sp. z o.o. - ul. Slowackiego 173, 80-298 Gdansk - KRS 101882 - NIP 957-07-52-316" Content-Type: text/plain; charset="utf-8" Content-Disposition: inline X-ClientProxiedBy: MI0P293CA0013.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:44::18) To CO1PR11MB5057.namprd11.prod.outlook.com (2603:10b6:303:6c::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR11MB5057:EE_|CH3PR11MB7769:EE_ X-MS-Office365-Filtering-Correlation-Id: e94f17e2-a849-4fc2-5152-08dcf4e3db1a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?q?+OdAa81g+O70J9A5lRvxFzIdws0qs95?= =?utf-8?q?9MzSqNPPZzlk7OHyfav9dkCZ7m+luxzNUOEi21wnw79o9IVOy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6PntdnoP0LOyfPkWz54i/?= =?utf-8?q?/Oy14PfTlhP5tzL/2ODfEct3hd/rKQRpd0U7XJU2Q71R6jNri0lS9rEVYjvjOJ06H?= =?utf-8?q?dKdKMhVGEH/hd/1oCjcWCIrD7by2SmaLyO2Hq8HxBbfcIYmHm6ZLDrCwo3yLViGh4?= =?utf-8?q?C/DraEm8yUlmPyHoUyFXo1Ds9wOc+BZlJaGq6A99e6QsteyyggtfZGi9bCDMFmKYX?= =?utf-8?q?A5yCz76djlWBqBYtk6+TmCjTFeaET2bqdSoR0NtakI8p/ah3UV1OOBpbxpE7jlY43?= =?utf-8?q?c4DsQ37uR7VAbkulilrt+1Z0HQaxgNfm7PgYZmtByikmY1QTIPYZa74cb351kxdCF?= =?utf-8?q?GMJ05u8s4IMm8?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR11MB5057.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Kllznee8eLzWQPYTfA9PQyWrJSqd?= =?utf-8?q?ZZ7r0tRutc9f1FGThqtkDnQ0KhCtUxk4qtAqf8oXGWb2GQv7LH5zJ60/rxykgsePI?= =?utf-8?q?1KuiV+Ld26FhfqHaGNPEH7ab/pXKJgNvty0YVqyZgXQogDUf6LRoaxH+I3IXuKP9/?= =?utf-8?q?u9/wcGfYvUB3ravdyf4FGwjABYkUw+oWSzUPzBqYcBOEU2IcnJOR0Avw7yBqxMfuT?= =?utf-8?q?wbZ48nnm6e3UgjyrlRDeeWIZYl93mMfiQ4zhCKWbZtzmMcL0EwPsTEVgDhKLhD3yD?= =?utf-8?q?CD69PmnvPdLT/dGWRA179FGy/2oaLaVQWsL1gCR8+P7A6mXXtVMjITZs8CAknT36F?= =?utf-8?q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rBUTEjZVTASRMJgr1FdaGdOTbkfyA/uVeiLvRzcQc2xE4+c+?= =?utf-8?q?8j3b8yKobxPVkI6S/p+dETb4gtVHSdC3+i2H+NKkAOaQNodGHwRJcXz6QJUwF85rz?= =?utf-8?q?FYKlC7TmYdJvdVwq59UvjuQCaV+pMoe74R8hOq6T/PVYrv3YCVcyDVPB655JMLQCy?= =?utf-8?q?92eNhPwZgnT7B8lRmDqOE6/iOGGT0e5IAaMIBkPhS+RJ2fXqPKQhlVCYMrNo/R+05?= =?utf-8?q?8UThwG/QLCgjqJlfLAmcd3X4gzSCLfaTLbqInEQzEAcqLSZlf8xTWLzuGvsNHClWJ?= =?utf-8?q?OeqY92je/M8Z0cMDJp0k5APMfafL9/vvEg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: e94f17e2-a849-4fc2-5152-08dcf4e3db1a X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB5057.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2024 10:57:45.1505 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hzgsTGJ/f84nk0XgGeXZCo9rTwAysobQJ86spdnCX7/r03g7nnkeM8DtvJFz6ZBo7bQqiV7aOfKSYIsIeVrEOZPJsDPCKSatqC1VrrX2yvk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB7769 X-OriginatorOrg: intel.com X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development <intel-gfx.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/intel-gfx>, <mailto:intel-gfx-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/intel-gfx> List-Post: <mailto:intel-gfx@lists.freedesktop.org> List-Help: <mailto:intel-gfx-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/intel-gfx>, <mailto:intel-gfx-request@lists.freedesktop.org?subject=subscribe> Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" <intel-gfx-bounces@lists.freedesktop.org> |
Series |
drm/i915: add GEM_WARN_ON to remap_io_sg
|
expand
|
diff --git a/drivers/gpu/drm/i915/i915_mm.c b/drivers/gpu/drm/i915/i915_mm.c index f5c97a620962..8a2779191f18 100644 --- a/drivers/gpu/drm/i915/i915_mm.c +++ b/drivers/gpu/drm/i915/i915_mm.c @@ -146,7 +146,7 @@ int remap_io_sg(struct vm_area_struct *vma, while (offset >= sg_dma_len(r.sgt.sgp) >> PAGE_SHIFT) { offset -= sg_dma_len(r.sgt.sgp) >> PAGE_SHIFT; r.sgt = __sgt_iter(__sg_next(r.sgt.sgp), use_dma(iobase)); - if (!r.sgt.sgp) + if (GEM_WARN_ON(!r.sgt.sgp)) return -EINVAL; } r.sgt.curr = offset << PAGE_SHIFT;
Since we already have that warning inside `remap_sg` we can also catch this condition inside `remap_io_sg`. Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com> --- drivers/gpu/drm/i915/i915_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)