Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp14885036rwd; Sun, 25 Jun 2023 06:14:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7PtsDtl9sjS3nRiXVUJ++W7k+yP8dR1RD+n3S/6lQET752ibmRnYlrrgNQY5ENZtBZypax X-Received: by 2002:a17:90a:1999:b0:25e:ad19:5f46 with SMTP id 25-20020a17090a199900b0025ead195f46mr16177703pji.12.1687698874484; Sun, 25 Jun 2023 06:14:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687698874; cv=none; d=google.com; s=arc-20160816; b=Msf4a6uODiZxgH4wyhz5pIB3vyebcTiUrBJRFDiAKZdQmxp9FD6is0ZfS0I3iF52TM sDcyBkG7pVzsJ0/crxPYk8enOMwmTwE2i8eYBhQrRJb8aWad7GIhJ/OzpdR8ZVeO3Vbk d7Pdci+NeLe0Q4d12gTtwaDoc6SCWYLIb1sJ+Hl3KkUCFacsrYqhm+yY55uT1riHT9In +kwqJegCmA2MCVzmHPBj/hcj1Mp/7UxvYdXs7UhnjOc0Rb8nV/jjiGCof3qyQ31+DTFK zVjwOFLfkOwxG2jlOj/oesdUSiDNR9Sx+S+ozoDNhnAamSKM9LDziq+dJ2sf9YoBFLTv yfdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=del9UBhqfOPjpRz94v5/IlGq2dOm6ZeO95re2KtNpFU=; fh=KljH3Xr3kinMnuzCUKtFyYzrhi1keKBS5tAc+SB886s=; b=nOEHBBdu1WsXfL/6TMj02CbJD35MRfGpZTVfdzWZzD2+3+qrG+hnMdkyfminmVZPgy YbZTp+o4EPfwHNylAJ5P/uMAnDvmx7bC28zySBJuLCZ4FKBBwJiLrQwaP40KqhaYRlJM zUElA3T5cKy6zKhTx9fRXemeQam7GcdssnFNcvgjcFIjv60lT7kdr5t0O08Vji9nmrUJ HdvElWu7el24itLN7pSqDyynRwTloXN5y8wdbtyAqkhdT0Ct0+quIYV40Pbu8NJZ0nRD SiHUleTQXu26WKxR6g9Xfz81zLipRfOBz8bLFIcyWmGtMSSnuE6aIfVXZKrGEYhXMtgy CXWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=P5ZIZ4UQ; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a17090ad48400b00262f093d1f3si163016pju.56.2023.06.25.06.14.19; Sun, 25 Jun 2023 06:14:34 -0700 (PDT) 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=pass header.i=@collabora.com header.s=mail header.b=P5ZIZ4UQ; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231640AbjFYMmV (ORCPT + 99 others); Sun, 25 Jun 2023 08:42:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230516AbjFYMmU (ORCPT ); Sun, 25 Jun 2023 08:42:20 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7873D131 for ; Sun, 25 Jun 2023 05:41:47 -0700 (PDT) Received: from [192.168.2.254] (109-252-154-132.dynamic.spd-mgts.ru [109.252.154.132]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id D7F6F66031BB; Sun, 25 Jun 2023 13:41:44 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1687696905; bh=0I1rLltUXkTnuQd/Jvq/oa9s7KLLg1FujdfDbdaVAKk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=P5ZIZ4UQKOsnlyXzqxUVqKQrAzvPU4bSOV3uz5j0Nmdim+LPgprXn5ucXF9fiCKSp 76huK/CIkDaX9pT7AHfWvykF+cyojiAgGZ9TdRQuQiD0Yia7xueQWSiFFMzny7FNhS 8O73csA8e/KRNaqvaseQhERP++r+ocEBniHGrcpLP76mfyrXsjIBffwoHtCbzjrfIu TXGDf4XZ4hEtDNVgVuT3jZgtfwdcIgAdlInclE2TezCUEdswbBevWdD2mXKA8F8ssW 21GKN5ubwDAnXRtNOiPA7oVseYQzj6ri51mDCzxEeLzcSYHhPZxVk62XD93C5G9BMg ognpTBMa0dhxw== Message-ID: <0ca8034d-0377-26b9-51c8-8caff6c4174a@collabora.com> Date: Sun, 25 Jun 2023 15:41:41 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.1 Subject: Re: [PATCH v6 3/3] drm/virtio: Support sync objects Content-Language: en-US To: Geert Uytterhoeven Cc: David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Rob Clark , =?UTF-8?B?TWFyZWsgT2zFocOhaw==?= , Pierre-Eric Pelloux-Prayer , Emil Velikov , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com, virtualization@lists.linux-foundation.org References: <20230416115237.798604-1-dmitry.osipenko@collabora.com> <20230416115237.798604-4-dmitry.osipenko@collabora.com> From: Dmitry Osipenko In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On 6/25/23 11:47, Geert Uytterhoeven wrote: > Hi Dmitry, > > On Sun, Apr 16, 2023 at 1:55 PM Dmitry Osipenko > wrote: >> Add sync object DRM UAPI support to VirtIO-GPU driver. Sync objects >> support is needed by native context VirtIO-GPU Mesa drivers, it also will >> be used by Venus and Virgl contexts. >> >> Reviewed-by; Emil Velikov >> Signed-off-by: Dmitry Osipenko > > Thanks for your patch! > >> --- a/drivers/gpu/drm/virtio/virtgpu_submit.c >> +++ b/drivers/gpu/drm/virtio/virtgpu_submit.c > >> +static int >> +virtio_gpu_parse_deps(struct virtio_gpu_submit *submit) >> +{ >> + struct drm_virtgpu_execbuffer *exbuf = submit->exbuf; >> + struct drm_virtgpu_execbuffer_syncobj syncobj_desc; >> + size_t syncobj_stride = exbuf->syncobj_stride; >> + u32 num_in_syncobjs = exbuf->num_in_syncobjs; >> + struct drm_syncobj **syncobjs; >> + int ret = 0, i; >> + >> + if (!num_in_syncobjs) >> + return 0; >> + >> + /* >> + * kvalloc at first tries to allocate memory using kmalloc and >> + * falls back to vmalloc only on failure. It also uses GFP_NOWARN > > GFP_NOWARN does not exist. https://elixir.bootlin.com/linux/v6.4-rc7/source/include/linux/gfp_types.h#L38 -- Best regards, Dmitry