From patchwork Tue Oct 29 12:10:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 839329 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:4593:b0:37d:45d0:187 with SMTP id gb19csp329174wrb; Tue, 29 Oct 2024 05:12:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVlqqeEB4I+D08mdNomvUevszo3np43aaPpPHLoEMlUPvFTHbwqGaRLVuaaXoVR5/Kpo45Hqg==@linaro.org X-Google-Smtp-Source: AGHT+IH2+TKaAk09Vz9iNEhXvX1u6Gzr9uWXUgXemTX9h9caY+9uaAgbSrKX9bNL/+jTnkrGWMIr X-Received: by 2002:a05:6808:1886:b0:3e4:d3e6:7269 with SMTP id 5614622812f47-3e6382485ebmr9778467b6e.17.1730203947907; Tue, 29 Oct 2024 05:12:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730203947; cv=none; d=google.com; s=arc-20240605; b=fOev8Lqh2JC+aqckc18+jzbqkfeu6hKA/Jj9HUCdQbJuUWm4LGfYoXIZ4SWJhXHECw z94JEOjUHM2ot3ceTCq+gMa+7SoyCJFCMGG7lLyWaZZrE4Oj7VnEfGWGnuYIkXN4uSc4 z7s9vCzrYkNAKmxOHosowtdShbiky8xxkzm9UtFjLe7J47+QYTBwUkHLoR8fhfm448dj 3xCAZR5rFEuHgOzm9EmiRg8uGIQa5k9vYKGmmQFTd9cndJdnQST38z37bPGWNueygsnL rHEIBXgXQSIymF/JJv+LwnfsDl0BiEXGLP49GrBUzf6O+zTBJJodVuWJbF+bpOdHnk3N U1Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/BNiYYwKg/cSvehabs3gJ4EqBVuo2qMpFiEegCIxlqY=; fh=e52DzqoCGQsndoHy+FCTVMOSIYSVinunqfNVIbzL1G8=; b=AUsY07w47SkNWsCgvNc58TSs92gzzBr4mYHkFIet7PsegtW6d2jJJsFMSQnYyJS/Vd V1LNdeWCL2lEZHCwXcTE5CnbUioEXW1SfEw9DFXbCmS0rGbZen5G1XxSeCwnfHB2wrRS bP+cxE5Lr20RAPYBPgAe/bBlIOIeVbyk3bZmxpC96+mtxXE8//ET+3Us+paJNBTBsXqe Y5aJo94Vb6V3/usoRx7BzP/ccv8cLGGTNalwFlrMe5EXHdltOHcgOA2kUpmqHbdmUS7w rvgUl+BsH8hHVEJLXRBoVKk3P1/MbqpOlpuGJVfbUSBUwaOh3h4/vHpl1fjwe3RzijNx oiaw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t8z4IMOO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4a8c5399b86si2186697137.664.2024.10.29.05.12.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Oct 2024 05:12:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t8z4IMOO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5l3m-0004ea-2x; Tue, 29 Oct 2024 08:10:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5l3a-0004bc-HI for qemu-devel@nongnu.org; Tue, 29 Oct 2024 08:10:45 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t5l3Y-0007TW-UN for qemu-devel@nongnu.org; Tue, 29 Oct 2024 08:10:42 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-431616c23b5so38269945e9.0 for ; Tue, 29 Oct 2024 05:10:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730203839; x=1730808639; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/BNiYYwKg/cSvehabs3gJ4EqBVuo2qMpFiEegCIxlqY=; b=t8z4IMOOm1p9Z8ZJ4QclBKp7vJEIB/1rFbnS7Azlw/NzJLyYphsaAAXbQcnqjD2zIh uqo6dSdr3AV8nsJaiZNkIDgKDhmqbKr1ornStlsXmjcEAn+wftkIZhWJbew35P2ZyRd4 rowjyw6rSRRt0aQQdRLmeqGHS9HYaB9/UlL9A8utvtBMAKj0LTQMMPKx7LklgqZF/FI/ wg0aXbF4Svx9DIQNF2tyVizxNsca7IqdTXPKMa9VwwGaImQPCycWFXihiimKzzL7sHxY Q9rntDNSY0I8bO1XcatPX+tOiD43GX7n/TMVVPyIIkcVbdJKBvtX5PWH6c/zS8Ro0DSH YKSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730203839; x=1730808639; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/BNiYYwKg/cSvehabs3gJ4EqBVuo2qMpFiEegCIxlqY=; b=CiU1ujAXsgUCdS9Dt/ApLHyjDMyCRj/co+bd+VfIe342jqj4F7WIF/en0+22hLQemj R+J8dC/6R+EUgNVBy6UCINFzSWTYCOxTTamUG/Ky/GiF6kZoy+Yi0evN3Bs09OYXujgf QAVHV6g/qbeLei1v5PMR+QQnYkvCXgKhzAaMq1ilaSRHrettLJadx2CKvGquwL5AH8Dd Puiw4RDvCwXvWuJPvKDtAMBHUsFqW/BuPA+lok4RYah6583BXa3NuWnZgwAtxQ/hwPyn XmrkUXoia24w7401zo6lkCThQ/9si4e5ZuTaNT1tsiHyUT9zqNqgHg/1pMKEItzhwBmO 9VZw== X-Gm-Message-State: AOJu0YyQsxL1lEire/DLZmgfCNCMaWtnMqn1FkSGq4rLp34NoFt6JCnN I43wCmVyPHYGP9uN2uFMKv8zxpmGGAfy0JHqe9w8w4IAzzqOoMfUIbt/YJLhBq0= X-Received: by 2002:a05:600c:3042:b0:426:5e32:4857 with SMTP id 5b1f17b1804b1-431b564f547mr15996905e9.0.1730203839549; Tue, 29 Oct 2024 05:10:39 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4319360eb09sm142290695e9.48.2024.10.29.05.10.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 05:10:34 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 3C50D5FB2E; Tue, 29 Oct 2024 12:10:31 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Dmitry Osipenko , Antonio Caggiano , Huang Rui , Antonio Caggiano , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Alex_Benn=C3=A9e?= , "Michael S. Tsirkin" Subject: [PULL 08/13] virtio-gpu: Don't require udmabuf when blobs and virgl are enabled Date: Tue, 29 Oct 2024 12:10:25 +0000 Message-Id: <20241029121030.4007014-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241029121030.4007014-1-alex.bennee@linaro.org> References: <20241029121030.4007014-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Dmitry Osipenko The udmabuf usage is mandatory when virgl is disabled and blobs feature enabled in the Qemu machine configuration. If virgl and blobs are enabled, then udmabuf requirement is optional. Since udmabuf isn't widely supported by a popular Linux distros today, let's relax the udmabuf requirement for blobs=on,virgl=on. Now, a full-featured virtio-gpu acceleration is available to Qemu users without a need to have udmabuf available in the system. Reviewed-by: Antonio Caggiano Signed-off-by: Huang Rui Reviewed-by: Antonio Caggiano Reviewed-by: Marc-André Lureau Signed-off-by: Dmitry Osipenko Message-Id: <20241024210311.118220-9-dmitry.osipenko@collabora.com> Signed-off-by: Alex Bennée diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 3fcc434732..3d9679c1ef 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -1455,6 +1455,7 @@ void virtio_gpu_device_realize(DeviceState *qdev, Error **errp) if (virtio_gpu_blob_enabled(g->parent_obj.conf)) { if (!virtio_gpu_rutabaga_enabled(g->parent_obj.conf) && + !virtio_gpu_virgl_enabled(g->parent_obj.conf) && !virtio_gpu_have_udmabuf()) { error_setg(errp, "need rutabaga or udmabuf for blob resources"); return;