From patchwork Thu Sep 9 01:37:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gurchetan Singh X-Patchwork-Id: 12482155 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4BBCDC433EF for ; Thu, 9 Sep 2021 01:37:29 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0DAF66113E for ; Thu, 9 Sep 2021 01:37:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0DAF66113E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 56DA36E408; Thu, 9 Sep 2021 01:37:24 +0000 (UTC) Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by gabe.freedesktop.org (Postfix) with ESMTPS id 99BE36E3F2 for ; Thu, 9 Sep 2021 01:37:20 +0000 (UTC) Received: by mail-pf1-x429.google.com with SMTP id j16so339954pfc.2 for ; Wed, 08 Sep 2021 18:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GNmySw4shAb2lrXbxm8pa7zgjEZcnRQT9YeNz3m4ru0=; b=jdNGTFsvdtrlvCKIKo47GVvEpT/HQ470dmDmLNBGQywN2cmzIVNbSCQitxlgXmNwQN YnAyCW4AsAgx+iDer8sHMWMmymuqePqfauqdaToX59EnrZGsjMlUg1/aYqyB5m93Sr+3 7O1RFfr6XtbcSeiP8mN87E2oZdgpKaGEwAzyQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GNmySw4shAb2lrXbxm8pa7zgjEZcnRQT9YeNz3m4ru0=; b=eW32yarPF5mmyU7D6UhoHE2WrE7fxL/oxVXRrbmjJQ1eEN4G4mWRpMk4m8TowyHdS8 cksvf34ygH0VmgzWwZDaQTnfJWuCB+Svcf6U4R4rPIluYQhgaUPzYjvwIzMGWynAJULZ wM2YWQoeJUq0S0kML7LiS9f4eMR9d/Ha6hKl7+OZyh2cqXHpjXPE3lV3jRa5u7ngIrXn dcW3AJO/XQffkCoPyecSosXZwRlCZMu17VezmKfJJN3R0BT4rxjTvLGbXBdZPEpcgmw9 XGPGeVT0JMVewsr74I6oe9wu9/+lR3p5wwi1pW5TmFuxqKOW0EgSW6w9pAo7wIZQ1zz4 vZdA== X-Gm-Message-State: AOAM532CXdHGfP4AXd24F1ebNu/1axG1JtbGQ7cvnVCJKoGLE8IPBqp5 yBUNa+XWy7rIL5TV8393cM/C7UylOiuBdpUw X-Google-Smtp-Source: ABdhPJzcParYV4QKdn3QRprcAMLyK869lNeOfInYlZeaMPNB6v5L+3Ae+0Bx+PkLZ/R+zoGZcSi1tQ== X-Received: by 2002:a62:7c05:0:b0:40b:5d8f:6a56 with SMTP id x5-20020a627c05000000b0040b5d8f6a56mr375382pfc.74.1631151440055; Wed, 08 Sep 2021 18:37:20 -0700 (PDT) Received: from gurchetansingh0.mtv.corp.google.com ([2620:15c:202:201:b3e5:2f81:d686:bc91]) by smtp.gmail.com with ESMTPSA id h9sm142488pjg.9.2021.09.08.18.37.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 18:37:19 -0700 (PDT) From: Gurchetan Singh To: dri-devel@lists.freedesktop.org, virtio-dev@lists.oasis-open.org Cc: kraxel@redhat.com Subject: [PATCH v1 00/12] Context types Date: Wed, 8 Sep 2021 18:37:05 -0700 Message-Id: <20210909013717.861-1-gurchetansingh@chromium.org> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Version 1 of context types: https://lists.oasis-open.org/archives/virtio-dev/202108/msg00141.html Changes since RFC: * le32 info --> {u8 ring_idx + u8 padding[3]). * Max rings is now 64. Anthoine Bourgeois (2): drm/virtio: implement context init: probe for feature drm/virtio: implement context init: support init ioctl Gurchetan Singh (10): virtio-gpu api: multiple context types with explicit initialization drm/virtgpu api: create context init feature drm/virtio: implement context init: track valid capabilities in a mask drm/virtio: implement context init: track {ring_idx, emit_fence_info} in virtio_gpu_fence drm/virtio: implement context init: plumb {base_fence_ctx, ring_idx} to virtio_gpu_fence_alloc drm/virtio: implement context init: stop using drv->context when creating fence drm/virtio: implement context init: allocate an array of fence contexts drm/virtio: implement context init: handle VIRTGPU_CONTEXT_PARAM_POLL_RINGS_MASK drm/virtio: implement context init: add virtio_gpu_fence_event drm/virtio: implement context init: advertise feature to userspace drivers/gpu/drm/virtio/virtgpu_debugfs.c | 1 + drivers/gpu/drm/virtio/virtgpu_drv.c | 44 ++++- drivers/gpu/drm/virtio/virtgpu_drv.h | 28 +++- drivers/gpu/drm/virtio/virtgpu_fence.c | 30 +++- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 195 +++++++++++++++++++++-- drivers/gpu/drm/virtio/virtgpu_kms.c | 26 ++- drivers/gpu/drm/virtio/virtgpu_plane.c | 3 +- drivers/gpu/drm/virtio/virtgpu_vq.c | 19 +-- include/uapi/drm/virtgpu_drm.h | 27 ++++ include/uapi/linux/virtio_gpu.h | 18 ++- 10 files changed, 355 insertions(+), 36 deletions(-)