[PATCH v2 2/2] drm/virtio: Use IDAs more efficiently

2018-10-30 Thread Matthew Wilcox
0-based IDAs are more efficient than any other base. Convert the 1-based IDAs to be 0-based. Signed-off-by: Matthew Wilcox --- drivers/gpu/drm/virtio/virtgpu_kms.c| 5 +++-- drivers/gpu/drm/virtio/virtgpu_object.c | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dr

Re: virtio-gpu without ARCH_HAS_SG_CHAIN

2018-10-30 Thread Christoph Hellwig
There is no good reason to not define ARCH_HAS_SG_CHAIN. To fix your immediate problem just select it from riscv, as riscv uses the generic dma-direct code which is chained S/G safe by definition. And if you want to get extra points do a quick audit of the remaning iommu drivers on architectures

[PATCH v2 1/2] drm/virtio: Handle error from virtio_gpu_resource_id_get

2018-10-30 Thread Matthew Wilcox
ida_alloc() can return -ENOMEM in the highly unlikely case we run out of memory. The current code creates an object with an invalid ID. Signed-off-by: Matthew Wilcox --- drivers/gpu/drm/virtio/virtgpu_object.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dr

Re: [PATCH 0/4] Improve virtio ID allocation

2018-10-30 Thread Matthew Wilcox
On Mon, Oct 29, 2018 at 10:53:39PM +0100, Gerd Hoffmann wrote: > On Wed, Sep 26, 2018 at 09:00:27AM -0700, Matthew Wilcox wrote: > > I noticed you were using IDRs where you could be using the more efficient > > IDAs, then while fixing that I noticed the lack of error handling, > > and I decided to

Re: [PATCH v3 00/20] vmw_balloon: compaction, shrinker, 64-bit, etc.

2018-10-30 Thread gre...@linuxfoundation.org
On Tue, Oct 30, 2018 at 04:32:22PM +, Nadav Amit wrote: > From: Nadav Amit > Sent: September 26, 2018 at 7:13:16 PM GMT > > To: Arnd Bergmann , gre...@linuxfoundation.org > > Cc: Xavier Deguillard , > > linux-ker...@vger.kernel.org>, Nadav Amit , Michael S. > > Tsirkin , Jason Wang , > > lin

Re: [PATCH 2/5] drm/virtio: add uapi for in and out explicit fences

2018-10-30 Thread Emil Velikov
On Tue, 30 Oct 2018 at 13:52, Gerd Hoffmann wrote: > > On Tue, Oct 30, 2018 at 11:31:04AM +, Emil Velikov wrote: > > HI Gerd, > > > > On Tue, 30 Oct 2018 at 06:11, Gerd Hoffmann wrote: > > > > > > Hi, > > > > > > > The execbuffer IOCTL is now read-write to allow the userspace to read > > >

Re: [PATCH 2/5] drm/virtio: add uapi for in and out explicit fences

2018-10-30 Thread Gerd Hoffmann
On Tue, Oct 30, 2018 at 11:31:04AM +, Emil Velikov wrote: > HI Gerd, > > On Tue, 30 Oct 2018 at 06:11, Gerd Hoffmann wrote: > > > > Hi, > > > > > The execbuffer IOCTL is now read-write to allow the userspace to read the > > > out-fence. > > > > > #define DRM_IOCTL_VIRTGPU_EXECBUFFER \ > >

Re: [PATCH 2/5] drm/virtio: add uapi for in and out explicit fences

2018-10-30 Thread Emil Velikov
HI Gerd, On Tue, 30 Oct 2018 at 06:11, Gerd Hoffmann wrote: > > Hi, > > > The execbuffer IOCTL is now read-write to allow the userspace to read the > > out-fence. > > > #define DRM_IOCTL_VIRTGPU_EXECBUFFER \ > > - DRM_IOW(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER,\ > > + DRM_IOWR(DRM_C

Re: [PATCH v3] drm/bochs: add edid support.

2018-10-30 Thread Daniel Vetter
On Tue, Oct 30, 2018 at 11:28:24AM +0200, Jani Nikula wrote: > On Tue, 30 Oct 2018, Daniel Vetter wrote: > > On Mon, Oct 29, 2018 at 09:05:20PM +0100, Gerd Hoffmann wrote: > >> On Mon, Oct 29, 2018 at 07:44:28PM +0200, Jani Nikula wrote: > >> > On Mon, 29 Oct 2018, Gerd Hoffmann wrote: > >> > > R

Re: [PATCH v4 2/2] drm/virtio: add edid support

2018-10-30 Thread Daniel Vetter
On Tue, Oct 30, 2018 at 07:32:06AM +0100, Gerd Hoffmann wrote: > linux guest driver implementation of the VIRTIO_GPU_F_EDID feature. > > Signed-off-by: Gerd Hoffmann Like with bochs, I think drm_do_get_edid() here is overkill and fairly pointless. -Daniel > --- > drivers/gpu/drm/virtio/virtgpu

Re: [PATCH v4] drm/bochs: add edid support.

2018-10-30 Thread Daniel Vetter
On Mon, Oct 29, 2018 at 09:50:48PM +0100, Gerd Hoffmann wrote: > Recent qemu (latest master branch, upcoming 3.1 release) got support > for EDID data. This patch adds guest driver support. > > EDID support in qemu is not (yet) enabled by default, so please use > 'qemu -device VGA,edid=on' for tes

Re: virtio-gpu without ARCH_HAS_SG_CHAIN

2018-10-30 Thread Koenig, Christian
Am 30.10.18 um 08:23 schrieb Gerd Hoffmann: > On Mon, Oct 29, 2018 at 12:46:34PM -0700, Michael Forney wrote: >> Hi, >> >> I was looking at adding virtio-gpu support to tinyemu >> (https://bellard.org/tinyemu/). I got it to work on x86, but just for >> fun I tried it under riscv and ran into an iss

Re: [PATCH v3] drm/bochs: add edid support.

2018-10-30 Thread Jani Nikula
On Tue, 30 Oct 2018, Daniel Vetter wrote: > On Mon, Oct 29, 2018 at 09:05:20PM +0100, Gerd Hoffmann wrote: >> On Mon, Oct 29, 2018 at 07:44:28PM +0200, Jani Nikula wrote: >> > On Mon, 29 Oct 2018, Gerd Hoffmann wrote: >> > > Recent qemu (latest master branch, upcoming 3.1 release) got support >>

Re: [PATCH v3] drm/bochs: add edid support.

2018-10-30 Thread Daniel Vetter
On Mon, Oct 29, 2018 at 09:05:20PM +0100, Gerd Hoffmann wrote: > On Mon, Oct 29, 2018 at 07:44:28PM +0200, Jani Nikula wrote: > > On Mon, 29 Oct 2018, Gerd Hoffmann wrote: > > > Recent qemu (latest master branch, upcoming 3.1 release) got support > > > for EDID data. This patch adds guest driver

Re: virtio-gpu without ARCH_HAS_SG_CHAIN

2018-10-30 Thread Gerd Hoffmann
On Mon, Oct 29, 2018 at 12:46:34PM -0700, Michael Forney wrote: > Hi, > > I was looking at adding virtio-gpu support to tinyemu > (https://bellard.org/tinyemu/). I got it to work on x86, but just for > fun I tried it under riscv and ran into an issue with buffer > allocations (though, this should