From: Gerd Hoffmann <kraxel@redhat.com> To: Keiichi Watanabe <keiichiw@chromium.org> Cc: virtio-dev@lists.oasis-open.org, acourbot@chromium.org, alexlau@chromium.org, dgreid@chromium.org, marcheu@chromium.org, posciak@chromium.org, stevensd@chromium.org, tfiga@chromium.org, hverkuil@xs4all.nl, linux-media@vger.kernel.org Subject: Re: [virtio-dev] [PATCH] [RFC RESEND] vdec: Add virtio video decode device specification Date: Mon, 23 Sep 2019 10:56:37 +0200 [thread overview] Message-ID: <20190923085637.bsaevedklweijgya@sirius.home.kraxel.org> (raw) In-Reply-To: <20190919093404.182015-1-keiichiw@chromium.org> Hi, > Our prototype implementation uses [4], which allows the virtio-vdec > device to use buffers allocated by virtio-gpu device. > [4] https://lkml.org/lkml/2019/9/12/157 Well. I think before even discussing the protocol details we need a reasonable plan for buffer handling. I think using virtio-gpu buffers should be an optional optimization and not a requirement. Also the motivation for that should be clear (Let the host decoder write directly to virtio-gpu resources, to display video without copying around the decoded framebuffers from one device to another). Referencing virtio-gpu buffers needs a better plan than just re-using virtio-gpu resource handles. The handles are device-specific. What if there are multiple virtio-gpu devices present in the guest? I think we need a framework for cross-device buffer sharing. One possible option would be to have some kind of buffer registry, where buffers can be registered for cross-device sharing and get a unique id (a uuid maybe?). Drivers would typically register buffers on dma-buf export. Another option would be to pass around both buffer handle and buffer owner, i.e. instead of "u32 handle" have something like this: struct buffer_reference { enum device_type; /* pci, virtio-mmio, ... */ union device_address { struct pci_address pci_addr; u64 virtio_mmio_addr; [ ... ] }; u64 device_buffer_handle; /* device-specific, virtio-gpu could use resource ids here */ }; cheers, Gerd
WARNING: multiple messages have this Message-ID (diff)
From: Gerd Hoffmann <kraxel@redhat.com> To: Keiichi Watanabe <keiichiw@chromium.org> Cc: virtio-dev@lists.oasis-open.org, acourbot@chromium.org, alexlau@chromium.org, dgreid@chromium.org, marcheu@chromium.org, posciak@chromium.org, stevensd@chromium.org, tfiga@chromium.org, hverkuil@xs4all.nl, linux-media@vger.kernel.org Subject: Re: [virtio-dev] [PATCH] [RFC RESEND] vdec: Add virtio video decode device specification Date: Mon, 23 Sep 2019 10:56:37 +0200 [thread overview] Message-ID: <20190923085637.bsaevedklweijgya@sirius.home.kraxel.org> (raw) In-Reply-To: <20190919093404.182015-1-keiichiw@chromium.org> Hi, > Our prototype implementation uses [4], which allows the virtio-vdec > device to use buffers allocated by virtio-gpu device. > [4] https://lkml.org/lkml/2019/9/12/157 Well. I think before even discussing the protocol details we need a reasonable plan for buffer handling. I think using virtio-gpu buffers should be an optional optimization and not a requirement. Also the motivation for that should be clear (Let the host decoder write directly to virtio-gpu resources, to display video without copying around the decoded framebuffers from one device to another). Referencing virtio-gpu buffers needs a better plan than just re-using virtio-gpu resource handles. The handles are device-specific. What if there are multiple virtio-gpu devices present in the guest? I think we need a framework for cross-device buffer sharing. One possible option would be to have some kind of buffer registry, where buffers can be registered for cross-device sharing and get a unique id (a uuid maybe?). Drivers would typically register buffers on dma-buf export. Another option would be to pass around both buffer handle and buffer owner, i.e. instead of "u32 handle" have something like this: struct buffer_reference { enum device_type; /* pci, virtio-mmio, ... */ union device_address { struct pci_address pci_addr; u64 virtio_mmio_addr; [ ... ] }; u64 device_buffer_handle; /* device-specific, virtio-gpu could use resource ids here */ }; cheers, Gerd --------------------------------------------------------------------- To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
next prev parent reply other threads:[~2019-09-23 8:56 UTC|newest] Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-09-19 9:34 [PATCH] [RFC RESEND] vdec: Add virtio video decode device specification Keiichi Watanabe 2019-09-19 9:34 ` [virtio-dev] " Keiichi Watanabe 2019-09-19 9:52 ` Hans Verkuil 2019-09-19 11:15 ` Keiichi Watanabe 2019-09-19 11:15 ` [virtio-dev] " Keiichi Watanabe 2019-09-19 11:17 ` Keiichi Watanabe 2019-09-19 11:17 ` [virtio-dev] " Keiichi Watanabe 2019-09-23 8:56 ` Gerd Hoffmann [this message] 2019-09-23 8:56 ` [virtio-dev] " Gerd Hoffmann 2019-10-05 6:08 ` Tomasz Figa 2019-10-05 6:08 ` Tomasz Figa 2019-10-07 14:00 ` Dmitry Morozov 2019-10-07 14:00 ` Dmitry Morozov 2019-10-07 14:14 ` Tomasz Figa 2019-10-07 14:14 ` Tomasz Figa 2019-10-07 15:09 ` Dmitry Morozov 2019-10-07 15:09 ` Dmitry Morozov 2019-10-09 3:55 ` Tomasz Figa 2019-10-09 3:55 ` Tomasz Figa 2019-10-11 8:53 ` Dmitry Morozov 2019-10-11 8:53 ` Dmitry Morozov 2019-10-14 12:34 ` Gerd Hoffmann 2019-10-14 12:34 ` Gerd Hoffmann 2019-10-14 13:05 ` Dmitry Morozov 2019-10-14 13:05 ` Dmitry Morozov 2019-10-15 7:54 ` Gerd Hoffmann 2019-10-15 7:54 ` Gerd Hoffmann 2019-10-15 14:06 ` Dmitry Morozov 2019-10-15 14:06 ` Dmitry Morozov 2019-10-17 8:06 ` Tomasz Figa 2019-10-17 8:06 ` Tomasz Figa 2019-10-17 6:40 ` Tomasz Figa 2019-10-17 6:40 ` Tomasz Figa 2019-10-17 7:19 ` Gerd Hoffmann 2019-10-17 7:19 ` Gerd Hoffmann 2019-10-17 8:11 ` Tomasz Figa 2019-10-17 8:11 ` Tomasz Figa 2019-10-17 10:13 ` Gerd Hoffmann 2019-10-17 10:13 ` Gerd Hoffmann 2019-10-29 7:39 ` David Stevens 2019-10-31 7:30 ` Keiichi Watanabe 2019-10-31 7:30 ` Keiichi Watanabe 2019-10-31 9:10 ` David Stevens 2019-10-31 9:10 ` David Stevens 2019-11-07 8:29 ` Keiichi Watanabe 2019-11-07 8:29 ` Keiichi Watanabe 2019-10-14 12:19 ` Gerd Hoffmann 2019-10-14 12:19 ` Gerd Hoffmann 2019-10-17 6:58 ` Tomasz Figa 2019-10-17 6:58 ` Tomasz Figa 2019-10-17 7:44 ` Gerd Hoffmann 2019-10-17 7:44 ` Gerd Hoffmann 2019-10-17 8:23 ` Tomasz Figa 2019-10-17 8:23 ` Tomasz Figa 2019-10-17 10:22 ` Gerd Hoffmann 2019-10-17 10:22 ` Gerd Hoffmann 2019-10-17 15:00 ` Frank Yang 2019-10-17 16:22 ` Frank Yang 2019-10-17 7:06 ` David Stevens
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190923085637.bsaevedklweijgya@sirius.home.kraxel.org \ --to=kraxel@redhat.com \ --cc=acourbot@chromium.org \ --cc=alexlau@chromium.org \ --cc=dgreid@chromium.org \ --cc=hverkuil@xs4all.nl \ --cc=keiichiw@chromium.org \ --cc=linux-media@vger.kernel.org \ --cc=marcheu@chromium.org \ --cc=posciak@chromium.org \ --cc=stevensd@chromium.org \ --cc=tfiga@chromium.org \ --cc=virtio-dev@lists.oasis-open.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.