From patchwork Mon Dec 5 13:55:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Melissa Wen X-Patchwork-Id: 2606 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2284252wrr; Mon, 5 Dec 2022 06:25:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf5j7nht7SqZdC7VMZR2TVaKf5ih5ANIEbeLXCYn7kycW+aCLJc/0TyffCocgGMpCNYqLgtT X-Received: by 2002:a05:6402:1857:b0:46b:19aa:cfaa with SMTP id v23-20020a056402185700b0046b19aacfaamr33580518edy.229.1670250305653; Mon, 05 Dec 2022 06:25:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670250305; cv=none; d=google.com; s=arc-20160816; b=lm4OedCm8jukImOuKBURPBdEuG/8w1CXO6yJf5+4L2H+YN/BojHzcmVLpz6k4VwYvA YLiLWTufTxbnJIwZlyWGm6rUz0zME6h9ZsUcyRFls2Ddeccksx3fYovBkGiFWvFK6qzS /gIaQJtj5NPxmUN20DaqpfLXAJBUA4ijOGYYpaxZgjFZY+mQZKrbwJlvBf74j75HK1wV /kjIuPMFIUzYH/V/5FwB10cgBLYGh0z8K6vTwNcDqv1OOtbRcK5fTltIEQTX4L9lP6cZ BmqYlWPk6VZ4hBR9l+KcROmGrntaWzV1kum/u0zofQIwX+Hm2P+79a2GQoMk4FoErm7i BXhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=bTIenh40FCC39XN+WcIw5A8gMY4IR7S1+OwUya3n/HQ=; b=0RXChY0oXXRxI5TmcG3r/4y2X6b3htUb3rXfFyZJcXT3ePk97A0aPt51DLo27szpJ7 yObpSAY6MCeJfC2n/lK6SY0DMp7lKKr8mc+VwRRoedYhvKV5eujA9Sy11IoRYP1a3Wyy TaEajbI622LnE/58Scbz/I0x3ZS7e8rwxQF8n8HeI1raKHYK5GUFds7yKz9KsJ6u0Lq7 zUM7QXHOHmbU09kyYWvIbq/RWMHtrXxPTc+TztREI12FbBhIYsGSxw4X/jjBWL4QutwC GkWxdDmz91P+5IIp5DX0e0LQ7GB5rgGDI/9kepSap2npWQ34pdbaf3UIXb6VmXxnxUIr tT+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=hZn4Qk2h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go16-20020a1709070d9000b0077d26491a9csi14001401ejc.141.2022.12.05.06.24.40; Mon, 05 Dec 2022 06:25:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=hZn4Qk2h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231232AbiLEN4e (ORCPT + 99 others); Mon, 5 Dec 2022 08:56:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231516AbiLEN4a (ORCPT ); Mon, 5 Dec 2022 08:56:30 -0500 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BD11D68 for ; Mon, 5 Dec 2022 05:56:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=bTIenh40FCC39XN+WcIw5A8gMY4IR7S1+OwUya3n/HQ=; b=hZn4Qk2htMRvxGIHZ3+p7LU0sl mzdDdAmXoDuzOXVV2dAMJ0+CsPDiF0UcO8eDhbe6Z+u8Kyfj438RZc3fPPdAaE+wUuUUhxpSPQtFp aR8qRujsKTg3/rPK7GCk23WjKJPaEuZxiSWHK7cnDfBR66rCfM1shDOsmHQ7XVBkMlIE1HRcM8++q mEcEJJtF+khg3mEBhd/jAwwdPMPZEafJriLzJgD8sNUOOBSzog+4yQkGi8kkKUYBYGbCt/JLnx0lZ LEvEnuGzskVsd7XOc7EM8HBBHM+dHKYrcZsWOceleKHlrtPOQ9t4nkiNHB9/DE8Vpf66+m+RZ8a3W jj59ROgQ==; Received: from [41.74.137.107] (helo=killbill.home) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1p2Bx2-00FUSn-Or; Mon, 05 Dec 2022 14:56:08 +0100 From: Melissa Wen To: airlied@gmail.com, daniel@ffwll.ch, emma@anholt.net, mwen@igalia.com Cc: Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , Maira Canal , kernel-dev@igalia.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] drm/v3d: replace obj lookup steps with Date: Mon, 5 Dec 2022 12:55:36 -0100 Message-Id: <20221205135538.3545051-1-mwen@igalia.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751384384714441991?= X-GMAIL-MSGID: =?utf-8?q?1751384384714441991?= The first patch just prevents to iterate on a NULL job->bo array during job cleanup. This situation can happen when v3d_lookup_bos() fails to allocate memory for the job->bo array and job->bo_count was already set. The second replace BOs lookup steps in v3d_lookup_bos() with the common code of drm_gem_objects_lookup(). v2: - rebase to drm-misc-next Melissa Wen (2): drm/v3d: cleanup BOs properly when lookup_bos fails drm/v3d: replace obj lookup steps with drm_gem_objects_lookup drivers/gpu/drm/v3d/v3d_gem.c | 55 ++++------------------------------- 1 file changed, 6 insertions(+), 49 deletions(-)