Message ID | g2d547gsiadgmcjqh5rgsqhm4diwk6fmd2hnic5pkatye2zpei@3sjc6v6qj6ex (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 4EF4CD75BD8 for <intel-gfx@archiver.kernel.org>; Thu, 21 Nov 2024 08:53:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DBB9010E8BB; Thu, 21 Nov 2024 08:53:54 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="fAmriGva"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id E66F210E8AF for <intel-gfx@lists.freedesktop.org>; Thu, 21 Nov 2024 08:53:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1732179234; x=1763715234; h=date:from:to:subject:message-id:references:in-reply-to: mime-version; bh=P7NeDjCRks1p9Wuk8P7MtYKA0aQnbd1yoCu1hY3F9+8=; b=fAmriGvaX036P4uNyyggivLdArLdvVjb4+oVwMWinwW2BhGz6Vdi3kaZ CuV7ldVUcXOxw0lFkoLFBIWBzh/tyncl0hgYRSEAExKVb8xWLpqhyJgL6 L1UTrm733pDyrwzHSrAfnsWlXQOwYF9qrjHnJGQuDI9IOfYp55g/m5aCb vE1oMmEufEUe3I+9EbiZlwhLY5ccjqNweJL6O4TFvOJNO74psbR8NqJ+b ZDLlOW6pU2h8uRYXxxOsWpIByyjVlSR/JqEydcYqY0aerNjsmySweM550 4FQDqzU8rJYz/n4cnfCHayliWBLNOwMSH0TjcTXebYpU+YytMYgkvhm6K w==; X-CSE-ConnectionGUID: lIEwi1XRRpeuaO0uY/T1KA== X-CSE-MsgGUID: 4uHbWheSTqia6/Xl3361iQ== X-IronPort-AV: E=McAfee;i="6700,10204,11262"; a="36189986" X-IronPort-AV: E=Sophos;i="6.12,172,1728975600"; d="scan'208";a="36189986" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2024 00:53:53 -0800 X-CSE-ConnectionGUID: XxZ442bpRnCvC9lA8L4x0Q== X-CSE-MsgGUID: zeXnVABxROGOnPN1pmZy4A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,172,1728975600"; d="scan'208";a="90002667" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmviesa007.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 21 Nov 2024 00:53:53 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 21 Nov 2024 00:53:52 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 21 Nov 2024 00:53:52 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.171) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 21 Nov 2024 00:53:52 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HC1/gCXCDuH5ZCZf+FxKq2MD3oYu3v6K1eh5b/ZDn9+QUelBWeSlu61QwUlSJl7q02CJEIVQPX1aVeN6fnhAPi6vPfkDQ9509R5Vt5/NW14HdFkQrpmMnJXJwe9LO3RUtjbTTRBO/99gHOTWQw/AEXXErF+SZm53U2RoZeshfBhpgndB4kGjhfLtCy3V2d19CRZvwzPJEXt/FSYpBZQRifPFqhgp1NSYYGnwRxhjr/mLaRv3dNWWPuvBuKYTmTgzcmKUGZjwzSAQ+aQd0Niu94CgJS8EzbepD7lb4vdVD5SILTMbNWmtDZQLTh9WkapAEm0rmnn77Kv6n/9UXWQYRQ== 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=qXBN+3IDHYt7+j2y/k8ivNtkdblH3bTE87dNeW/w4+EZHZl1QzFrdqOtgtuUzl4FxubOgItAw54/avL5mwriQV+1+L+74HML3sp1H9UbBbkmS57I9YUmoq1xQ+b0wTBAZCRgOaOtdSYuUBK91LzE3QDLj6Gif7b8wUkI5EuBhyfyo0LUV0JtM/HngxYpKyGgNnQDR7tbqoToVFRtfWoOVDCCFuH+U9k5nrlzJnLLssbm3J29WGIIK21+2eqh4+Z45ZQt0xOzdB6jyYtx7f8mhRAqvUC9bKJtf0a5ncoLlculFHe4YKlTAZCNnOX5OWj9JcoGx3Z/xpp6EZTON6qOqw== 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 PH0PR11MB7446.namprd11.prod.outlook.com (2603:10b6:510:26d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.15; Thu, 21 Nov 2024 08:53:49 +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.8158.023; Thu, 21 Nov 2024 08:53:49 +0000 Date: Thu, 21 Nov 2024 08:53:39 +0000 From: Krzysztof Karas <krzysztof.karas@intel.com> To: <intel-gfx@lists.freedesktop.org> Subject: [RESEND] drm/i915: add GEM_WARN_ON to remap_io_sg Message-ID: <g2d547gsiadgmcjqh5rgsqhm4diwk6fmd2hnic5pkatye2zpei@3sjc6v6qj6ex> "Organization: Intel Technology Poland sp. z o.o. - ul. Slowackiego 173, 80-298 Gdansk - KRS 101882 - NIP 957-07-52-316" References: <fzn3jb4cdylc7fj4og2hgy73onelzurxmmsrzqix6yswms4ite@d74hat7krnm6> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <fzn3jb4cdylc7fj4og2hgy73onelzurxmmsrzqix6yswms4ite@d74hat7krnm6> X-ClientProxiedBy: MI1P293CA0004.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:2::13) To CO1PR11MB5057.namprd11.prod.outlook.com (2603:10b6:303:6c::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR11MB5057:EE_|PH0PR11MB7446:EE_ X-MS-Office365-Filtering-Correlation-Id: d54ae8d8-ec6d-4c26-0f06-08dd0a0a043c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366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X6ujzaFSmN8ivFJNBSX1GtN3JKQ5XazLO5L8/8O4X1ZFrsvKzb0Wj4GE?= =?utf-8?q?soFG3i+Sx2xkokoAjPa4Rtq/kPvG8eW3kzHVt2bzUMQX/+jVX+Zxzlxof/6eGb+bL?= =?utf-8?q?GrLb3+CIKHODDG4PUODeLELD2MlXa1DGSEwNGMrsZg7O63mSsK8aX+ssSH6pRUpUy?= =?utf-8?q?ROwM4m5yJZmDrel2uqMQSjTn05elDiecB5sAsCtDe++OEwX8z4J7IBGDyIpzdSVpH?= =?utf-8?q?mQ4LaREoC/uzLwmwF9JithKC6ImYYnuefNe1a5fa9PAIne5qRKGP+ffQuCaOBiZ67?= =?utf-8?q?vcXAp/z/kbKjddlZQnCSaSRK3RmaZTVJUEsDLUN33TrfYHjZLdHK4nL4KAzBHsrmt?= =?utf-8?q?Re4UuTd/xJa/tno9pNk99dndcRX8aG5dA+QJsKNHg1qNYLtAIrO7mA8d4mVrYeZAx?= =?utf-8?q?IvHmpsiQGwcBB?= 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)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?0qXPcaVnjtuMix24/0D+UB7S/XnP?= =?utf-8?q?zAxhkXC1B9IMIn7L1/Ijs6tP/axMtAZct6ssrhqOmMGnp5XGZFw09abFGGfEhTbIs?= =?utf-8?q?YsLLpqKjXLlU5xY4T//i2+Ix6+7HClamWHwTI6Xw8lmo2w27e63thMMNFIhSwRdvs?= =?utf-8?q?RLy9xVy0RPALnzZo+bMPPjRiNaV3iVa1tuK1n64ieKewUbUKh61PhdRQPjr9kcjql?= =?utf-8?q?9ZYnXLgrB/UcjJxkLXryfmMnxU34xpc32F+HL6+qx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VsHXqxh5Elb+JOcOcfpJlFuJlj?= =?utf-8?q?qZB4wzSGq3VbeqmzsiY5m+HJW2yQUgUpBFNw/5hHAjQUu45M4CTuabOqhyLnVLVJn?= =?utf-8?q?ZEINkE0jeyIHMnbURNJULlkj6gRCpLI+1RqaID6bYcpX5JLKW+X0FRp0Qy71uj8vU?= =?utf-8?q?qElt7jMjs6U6ZySrE0a5J04EL9flnOobA4eKwwLpFfS6qO7zFp+GvoJtbouC+Mqvm?= =?utf-8?q?rVXT5zp87JYOYUV9xSXg/06s6p1Qrarx09B4/TkmoMuGeWONEXlwNiSWevF/r5AF5?= =?utf-8?q?TTikep4lCqlGfmZi/jhwrq6VwqeDsTKm03qSnuWXJs48qhzyg7XfFsdi+De9HLlQ9?= =?utf-8?q?RQLUH1wEUbQ4QDEkZ0ixYaWSagnOREdp9quqdVw/W/0HdF6PjOGYf4OtiC+OA6MUP?= =?utf-8?q?h03zpIxOtNbG0ITrN45515R8NWq7YbxwhA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: d54ae8d8-ec6d-4c26-0f06-08dd0a0a043c X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB5057.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2024 08:53:49.4974 (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: S08l6+VCaS9MKgsGt3xHTSXlN1FwzJHftEWKkFeZTYb7ggLE2GBBckEJdydHIVAqKnPqDMS/OOkZNVdKRQb5KvsjX/y9DOLxAX6GbGFQeA4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB7446 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 |
[RESEND] 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(-)