Re: [virtio-dev] Re: [PATCH v3] Add virtio-input driver.

2015-03-24 Thread Michael S. Tsirkin
On Tue, Mar 24, 2015 at 12:46:21PM +0100, Gerd Hoffmann wrote: Hi, + spin_lock_irqsave(vi-lock, flags); + while ((event = virtqueue_get_buf(vi-evt, len)) != NULL) { + input_event(vi-idev, + le16_to_cpu(event-type), +

Re: [virtio-dev] Re: [PATCH v3] Add virtio-input driver.

2015-03-24 Thread Michael S. Tsirkin
On Tue, Mar 24, 2015 at 02:37:24PM +0100, Gerd Hoffmann wrote: Hi, input layer checks it and ignores events not supported (according to the support bitmaps). Right but support bitmaps come from host too, no? Yes, but the driver will not set invalid bits (bitcount argument for

Re: [virtio-dev] Re: [PATCH v3] Add virtio-input driver.

2015-03-24 Thread Gerd Hoffmann
Hi, input layer checks it and ignores events not supported (according to the support bitmaps). Right but support bitmaps come from host too, no? Yes, but the driver will not set invalid bits (bitcount argument for the virtinput_cfg_bits() function is the number of valid bits of the

Re: [PATCH v3] Add virtio-input driver.

2015-03-24 Thread Michael S. Tsirkin
On Tue, Mar 24, 2015 at 11:26:50AM +0100, Gerd Hoffmann wrote: Hi, +static void virtinput_cfg_abs(struct virtio_input *vi, int abs) +{ + u32 mi, ma, re, fu, fl; + + virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ABS_INFO, abs); + virtio_cread(vi-vdev, struct virtio_input_config,

Re: [PATCH v3] Add virtio-input driver.

2015-03-24 Thread Gerd Hoffmann
Hi, +static void virtinput_cfg_abs(struct virtio_input *vi, int abs) +{ + u32 mi, ma, re, fu, fl; + + virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ABS_INFO, abs); + virtio_cread(vi-vdev, struct virtio_input_config, u.abs.min, mi); + virtio_cread(vi-vdev, struct

Re: [virtio-dev] Re: [PATCH v3] Add virtio-input driver.

2015-03-24 Thread Gerd Hoffmann
Hi, + spin_lock_irqsave(vi-lock, flags); + while ((event = virtqueue_get_buf(vi-evt, len)) != NULL) { + input_event(vi-idev, + le16_to_cpu(event-type), + le16_to_cpu(event-code), +

Re: [PATCH v3] Add virtio-input driver.

2015-03-24 Thread Michael S. Tsirkin
On Tue, Mar 24, 2015 at 08:32:01AM +0100, Gerd Hoffmann wrote: virtio-input is basically evdev-events-over-virtio, so this driver isn't much more than reading configuration from config space and forwarding incoming events to the linux input layer. Signed-off-by: Gerd Hoffmann

[PATCH v4] Add virtio-input driver.

2015-03-24 Thread Gerd Hoffmann
virtio-input is basically evdev-events-over-virtio, so this driver isn't much more than reading configuration from config space and forwarding incoming events to the linux input layer. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- MAINTAINERS | 6 +

Re: [PATCH v3] Add virtio-input driver.

2015-03-24 Thread Michael S. Tsirkin
On Tue, Mar 24, 2015 at 11:26:50AM +0100, Gerd Hoffmann wrote: Hi, +static void virtinput_cfg_abs(struct virtio_input *vi, int abs) +{ + u32 mi, ma, re, fu, fl; + + virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ABS_INFO, abs); + virtio_cread(vi-vdev, struct virtio_input_config,

[PATCH net-next] virtio: change comment in transmit

2015-03-24 Thread Stephen Hemminger
The original comment was not really informative or funny as well as sexist. Replace it with a better explanation of why the driver does stop and what the impacts are. Signed-off-by: Stephen Hemminger step...@networkplumber.org --- a/drivers/net/virtio_net.c 2015-03-24 15:20:25.174671000 -0700

Re: [PATCH] Add virtio gpu driver.

2015-03-24 Thread Dave Airlie
On 25 March 2015 at 08:50, Daniel Stone dan...@fooishbar.org wrote: Hi, On 24 March 2015 at 16:07, Gerd Hoffmann kra...@redhat.com wrote: +static int virtio_gpu_crtc_page_flip(struct drm_crtc *crtc, +struct drm_framebuffer *fb, +

[PATCH] Add virtio gpu driver.

2015-03-24 Thread Gerd Hoffmann
From: Dave Airlie airl...@gmail.com This patch adds a kms driver for the virtio gpu. The xorg modesetting driver can handle the device just fine, the framebuffer for fbcon is there too. Qemu patches for the host side are under review currently. The pci version of the device comes in two

[PATCH v3 06/10] virtio_pci: drop msi_off on probe

2015-03-24 Thread Michael S. Tsirkin
pci core now disables msi on probe automatically, drop this from device-specific code. Cc: Bjorn Helgaas bhelg...@google.com Cc: linux-...@vger.kernel.org Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/virtio/virtio_pci_common.c | 3 --- 1 file changed, 3 deletions(-) diff --git

Re: [virtio-dev] Re: [PATCH v3] Add virtio-input driver.

2015-03-24 Thread Dmitry Torokhov
On Tue, Mar 24, 2015 at 04:25:14PM +0100, Gerd Hoffmann wrote: On Di, 2015-03-24 at 15:14 +0100, Michael S. Tsirkin wrote: On Tue, Mar 24, 2015 at 02:37:24PM +0100, Gerd Hoffmann wrote: Hi, input layer checks it and ignores events not supported (according to the support

Re: [PATCH net-next] virtio: change comment in transmit

2015-03-24 Thread David Miller
From: Stephen Hemminger step...@networkplumber.org Date: Tue, 24 Mar 2015 16:22:07 -0700 The original comment was not really informative or funny as well as sexist. Replace it with a better explanation of why the driver does stop and what the impacts are. Signed-off-by: Stephen Hemminger

Re: [PATCH net-next] virtio: change comment in transmit

2015-03-24 Thread Rusty Russell
Stephen Hemminger step...@networkplumber.org writes: The original comment was not really informative or funny as well as sexist. Replace it with a better explanation of why the driver does stop and what the impacts are. Signed-off-by: Stephen Hemminger step...@networkplumber.org Fair call.

Re: [PATCH v3] Add virtio-input driver.

2015-03-24 Thread Michael S. Tsirkin
On Tue, Mar 24, 2015 at 10:28:05AM -0700, Dmitry Torokhov wrote: + err = input_register_device(vi-idev); + if (err) + goto err_input_register; + + return 0; + +err_input_register: + input_free_device(vi-idev); At

Re: [PATCH net-next] virtio: change comment in transmit

2015-03-24 Thread David Miller
From: Rusty Russell ru...@rustcorp.com.au Date: Wed, 25 Mar 2015 14:29:38 +1030 I note that there's still no comment saying don't do this in netdevice.h; I gather returning NETDEV_TX_BUSY is still considered a Bad Thing? You're not supposed to do it still, that's right. If the driver returns

Re: [PATCH v4] Add virtio-input driver.

2015-03-24 Thread Rusty Russell
Gerd Hoffmann kra...@redhat.com writes: virtio-input is basically evdev-events-over-virtio, so this driver isn't much more than reading configuration from config space and forwarding incoming events to the linux input layer. Signed-off-by: Gerd Hoffmann kra...@redhat.com Is the input layer

Re: [PATCH] Add virtio gpu driver.

2015-03-24 Thread Michael S. Tsirkin
On Tue, Mar 24, 2015 at 05:07:18PM +0100, Gerd Hoffmann wrote: From: Dave Airlie airl...@gmail.com This patch adds a kms driver for the virtio gpu. The xorg modesetting driver can handle the device just fine, the framebuffer for fbcon is there too. Qemu patches for the host side are

Re: [PATCH] Add virtio gpu driver.

2015-03-24 Thread Daniel Vetter
On Tue, Mar 24, 2015 at 05:07:18PM +0100, Gerd Hoffmann wrote: From: Dave Airlie airl...@gmail.com This patch adds a kms driver for the virtio gpu. The xorg modesetting driver can handle the device just fine, the framebuffer for fbcon is there too. Qemu patches for the host side are

Re: [PATCH] Add virtio gpu driver.

2015-03-24 Thread Michael S. Tsirkin
On Tue, Mar 24, 2015 at 05:07:18PM +0100, Gerd Hoffmann wrote: From: Dave Airlie airl...@gmail.com This patch adds a kms driver for the virtio gpu. The xorg modesetting driver can handle the device just fine, the framebuffer for fbcon is there too. Qemu patches for the host side are

Re: [PATCH v3] Add virtio-input driver.

2015-03-24 Thread Dmitry Torokhov
On Tue, Mar 24, 2015 at 11:36:31AM +0100, Michael S. Tsirkin wrote: On Tue, Mar 24, 2015 at 08:32:01AM +0100, Gerd Hoffmann wrote: virtio-input is basically evdev-events-over-virtio, so this driver isn't much more than reading configuration from config space and forwarding incoming events

Re: [PATCH v3] Add virtio-input driver.

2015-03-24 Thread Michael S. Tsirkin
On Tue, Mar 24, 2015 at 09:23:37AM -0700, Dmitry Torokhov wrote: On Tue, Mar 24, 2015 at 11:36:31AM +0100, Michael S. Tsirkin wrote: On Tue, Mar 24, 2015 at 08:32:01AM +0100, Gerd Hoffmann wrote: virtio-input is basically evdev-events-over-virtio, so this driver isn't much more than

Re: [PATCH] Add virtio gpu driver.

2015-03-24 Thread Paul Bolle
Just a license nit. On Tue, 2015-03-24 at 17:07 +0100, Gerd Hoffmann wrote: --- /dev/null +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c @@ -0,0 +1,132 @@ +/* + * 2011 Red Hat, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + *

[PATCH v3] Add virtio-input driver.

2015-03-24 Thread Gerd Hoffmann
virtio-input is basically evdev-events-over-virtio, so this driver isn't much more than reading configuration from config space and forwarding incoming events to the linux input layer. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- MAINTAINERS | 6 +