From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS 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 BA4C8C43603 for ; Thu, 5 Dec 2019 16:11:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8700D20801 for ; Thu, 5 Dec 2019 16:11:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729901AbfLEQLr (ORCPT ); Thu, 5 Dec 2019 11:11:47 -0500 Received: from plasma6.jpberlin.de ([80.241.56.68]:51361 "EHLO plasma6.jpberlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729406AbfLEQLr (ORCPT ); Thu, 5 Dec 2019 11:11:47 -0500 Received: from hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) by plasma.jpberlin.de (Postfix) with ESMTP id F3C6BBA10A; Thu, 5 Dec 2019 17:11:40 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from plasma.jpberlin.de ([91.198.250.140]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id Fb2yUIUPxfdf; Thu, 5 Dec 2019 17:11:39 +0100 (CET) Received: from webmail.opensynergy.com (unknown [217.66.60.5]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "webmail.opensynergy.com", Issuer "GeoTrust EV RSA CA 2018" (not verified)) (Authenticated sender: opensynergy@jpberlin.de) by plasma.jpberlin.de (Postfix) with ESMTPSA id 778D3A06C4; Thu, 5 Dec 2019 17:11:38 +0100 (CET) Received: from os-lin-dmo.localnet (10.25.255.1) by MXS02.open-synergy.com (10.25.10.18) with Microsoft SMTP Server (TLS) id 14.3.468.0; Thu, 5 Dec 2019 17:11:38 +0100 From: Dmitry Sepp To: CC: , , , , , , , , , , , Subject: [RFC] virtio video driver Date: Thu, 5 Dec 2019 17:11:37 +0100 Message-ID: <4595464.3jghpSLKuc@os-lin-dmo> Organization: OpenSynergy MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Originating-IP: [10.25.255.1] Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hello, My apologies for the long delay. The driver code is now available and provided as a follow-up to the discussion from this thread [1]. The reference Linux kernel 5.4 driver implementation is located here: https://github.com/OpenSynergy/linux/tree/virtio-video-draft-v1 The driver is implemented using the V4L2 API. It allocates a v4l2 device for each probed virtio device and then creates a video device for each function within the respective virtio device. The driver implements the stateful decoder interface [2] and the stateful encoder interface (WIP) [3]. The DMA SG memory allocator tries to map buffers right away. As it is not always suitable, and some implementations might need just a physical address, we had to introduce a set of simple dma ops directly in the driver. The driver is in the RFC state and currently a bit ahead of the spec that was proposed in the discussion mentioned above. On the other hand, the driver unfortunately does not yet include changes proposed in the recent comments [4]. The driver currently supports encoder and decoder functions. Also, it does not fully pass the v4l2-compliance yet, it has been a bit out of the focus so far. Any feedback and contribution would be greatly appreciated. [1] https://markmail.org/message/gc6h25acct22niut [2] https://www.kernel.org/doc/html/v5.4/media/uapi/v4l/dev-decoder.html [3] https://hverkuil.home.xs4all.nl/codec-api/uapi/v4l/dev-encoder.html [4] https://markmail.org/message/yy67elx2adbivdsp Best regards, Dmitry.