search for: events_read

Displaying 20 results from an estimated 27 matches for "events_read".

2020 Aug 05
1
[PATCH v3 34/38] drm/virtio: convert to LE accessors
...drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c index 0a5c8cf409fb..4d944a0dff3e 100644 --- a/drivers/gpu/drm/virtio/virtgpu_kms.c +++ b/drivers/gpu/drm/virtio/virtgpu_kms.c @@ -39,8 +39,8 @@ static void virtio_gpu_config_changed_work_func(struct work_struct *work) u32 events_read, events_clear = 0; /* read the config space */ - virtio_cread(vgdev->vdev, struct virtio_gpu_config, - events_read, &events_read); + virtio_cread_le(vgdev->vdev, struct virtio_gpu_config, + events_read, &events_read); if (events_read & VIRTIO_GPU_EVENT_DISPLAY) {...
2014 Sep 11
0
[PATCH 2/2] virtio-gpu/2d: add docs/specs/virtio-gpu.txt
...n will have 2D mode only. It provides support for +ARGB Hardware cursors and multiple scanouts (aka heads). + + +features +-------- + +There are no feature bits (yet). +There will be one in the future for 3D mode support. + + +config space +------------ + +struct virtgpu_config { + uint32_t events_read; + uint32_t events_clear; + uint32_t num_scanouts; + uint32_t reserved; +}; + +The two members events_read and events_clear are used to signal events +to the driver. Currently one event is defined for a display +change. When a config space interrupt is received the driver shou...
2014 Sep 11
9
[PATCH 0/2] virtio-gpu: hardware specification
Hi folks, Lets kick off the virtio-gpu review process, starting with the virtio protocol. This is a tiny patch series for qemu. Patch #1 carries the header file describing the virtual hardware: config space, command structs being sent over the rings, defines etc. Patch #2 adds a text file describing virtio-gpu to docs/specs/. It covers 2D support only for now. For anybody who wants to dig a
2014 Sep 11
9
[PATCH 0/2] virtio-gpu: hardware specification
Hi folks, Lets kick off the virtio-gpu review process, starting with the virtio protocol. This is a tiny patch series for qemu. Patch #1 carries the header file describing the virtual hardware: config space, command structs being sent over the rings, defines etc. Patch #2 adds a text file describing virtio-gpu to docs/specs/. It covers 2D support only for now. For anybody who wants to dig a
2014 Sep 11
1
[Qemu-devel] [PATCH 2/2] virtio-gpu/2d: add docs/specs/virtio-gpu.txt
...x 0000000..9455383 > --- /dev/null > +++ b/docs/specs/virtio-gpu.txt > @@ -0,0 +1,165 @@ > +virtio-gpu specification I know you are just following existing bad practice in this directory, but it would be nice to declare copyright and license on this file. > + > +The two members events_read and events_clear are used to signal events > +to the driver. Currently one event is defined for a display > +change. When a config space interrupt is received the driver should > +read the events_read field. The events processed should be written to > +the events_clear field. The dev...
2014 Sep 11
1
[Qemu-devel] [PATCH 2/2] virtio-gpu/2d: add docs/specs/virtio-gpu.txt
...x 0000000..9455383 > --- /dev/null > +++ b/docs/specs/virtio-gpu.txt > @@ -0,0 +1,165 @@ > +virtio-gpu specification I know you are just following existing bad practice in this directory, but it would be nice to declare copyright and license on this file. > + > +The two members events_read and events_clear are used to signal events > +to the driver. Currently one event is defined for a display > +change. When a config space interrupt is received the driver should > +read the events_read field. The events processed should be written to > +the events_clear field. The dev...
2018 Sep 13
0
[PATCH 3/3] drm/virtio: add edid support
...virtio/virtgpu_kms.c index 65060c0852..f6cbbb27e4 100644 --- a/drivers/gpu/drm/virtio/virtgpu_kms.c +++ b/drivers/gpu/drm/virtio/virtgpu_kms.c @@ -44,6 +44,8 @@ static void virtio_gpu_config_changed_work_func(struct work_struct *work) virtio_cread(vgdev->vdev, struct virtio_gpu_config, events_read, &events_read); if (events_read & VIRTIO_GPU_EVENT_DISPLAY) { + if (vgdev->has_edid) + virtio_gpu_cmd_get_edids(vgdev); virtio_gpu_cmd_get_display_info(vgdev); drm_helper_hpd_irq_event(vgdev->ddev); events_clear |= VIRTIO_GPU_EVENT_DISPLAY; @@ -174,6 +176,10 @@ int virti...
2020 Aug 03
0
[PATCH v2 10/24] virtio_gpu: correct tags for config space fields
...rtio_gpu.h b/include/uapi/linux/virtio_gpu.h index 0c85914d9369..ccbd174ef321 100644 --- a/include/uapi/linux/virtio_gpu.h +++ b/include/uapi/linux/virtio_gpu.h @@ -320,10 +320,10 @@ struct virtio_gpu_resp_edid { #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0) struct virtio_gpu_config { - __u32 events_read; - __u32 events_clear; - __u32 num_scanouts; - __u32 num_capsets; + __le32 events_read; + __le32 events_clear; + __le32 num_scanouts; + __le32 num_capsets; }; /* simple formats for fbcon/X use */ -- MST
2020 Aug 05
1
[PATCH v3 10/38] virtio_gpu: correct tags for config space fields
...rtio_gpu.h b/include/uapi/linux/virtio_gpu.h index 0c85914d9369..ccbd174ef321 100644 --- a/include/uapi/linux/virtio_gpu.h +++ b/include/uapi/linux/virtio_gpu.h @@ -320,10 +320,10 @@ struct virtio_gpu_resp_edid { #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0) struct virtio_gpu_config { - __u32 events_read; - __u32 events_clear; - __u32 num_scanouts; - __u32 num_capsets; + __le32 events_read; + __le32 events_clear; + __le32 num_scanouts; + __le32 num_capsets; }; /* simple formats for fbcon/X use */ -- MST
2023 Mar 06
0
[PATCH v1] drm/virtio: Fix handling CONFIG_DRM_VIRTIO_GPU_KMS option
> +++ b/drivers/gpu/drm/virtio/virtgpu_kms.c > @@ -45,9 +45,11 @@ static void virtio_gpu_config_changed_work_func(struct work_struct *work) > if (events_read & VIRTIO_GPU_EVENT_DISPLAY) { > if (vgdev->has_edid) > virtio_gpu_cmd_get_edids(vgdev); > - virtio_gpu_cmd_get_display_info(vgdev); > - virtio_gpu_notify(vgdev); > - drm_helper_hpd_irq_event(vgdev->ddev); > + if (vgdev->num_scanouts) { > + virtio_gpu_c...
2014 Sep 11
0
[PATCH 1/2] virtio-gpu/2d: add hardware spec include file
...ed; + uint32_t width; + uint32_t height; + uint32_t x; + uint32_t y; + uint32_t flags; + } pmodes[VIRTGPU_MAX_SCANOUTS]; +}; + +#define VIRTGPU_EVENT_DISPLAY (1 << 0) + +struct virtgpu_config { + uint32_t events_read; + uint32_t events_clear; + uint32_t num_scanouts; + uint32_t reserved; +}; + +/* simple formats for fbcon/X use */ +enum virtgpu_formats { + VIRGL_FORMAT_B8G8R8A8_UNORM = 1, + VIRGL_FORMAT_B8G8R8X8_UNORM = 2, + VIRGL_FORMAT_A8R8G8B8_UNORM...
2015 Mar 24
10
[PATCH] Add virtio gpu driver.
...ude <linux/virtio_config.h> +#include <drm/drmP.h> +#include "virtgpu_drv.h" + +static void virtio_gpu_config_changed_work_func(struct work_struct *work) +{ + struct virtio_gpu_device *vgdev = + container_of(work, struct virtio_gpu_device, + config_changed_work); + u32 events_read, events_clear = 0; + + /* read the config space */ + virtio_cread(vgdev->vdev, struct virtio_gpu_config, + events_read, &events_read); + if (events_read & VIRTIO_GPU_EVENT_DISPLAY) { + virtio_gpu_cmd_get_display_info(vgdev); + drm_helper_hpd_irq_event(vgdev->ddev); + events_c...
2015 Mar 24
10
[PATCH] Add virtio gpu driver.
...ude <linux/virtio_config.h> +#include <drm/drmP.h> +#include "virtgpu_drv.h" + +static void virtio_gpu_config_changed_work_func(struct work_struct *work) +{ + struct virtio_gpu_device *vgdev = + container_of(work, struct virtio_gpu_device, + config_changed_work); + u32 events_read, events_clear = 0; + + /* read the config space */ + virtio_cread(vgdev->vdev, struct virtio_gpu_config, + events_read, &events_read); + if (events_read & VIRTIO_GPU_EVENT_DISPLAY) { + virtio_gpu_cmd_get_display_info(vgdev); + drm_helper_hpd_irq_event(vgdev->ddev); + events_c...
2015 Mar 24
0
[PATCH] Add virtio gpu driver.
...ude <drm/drmP.h> > +#include "virtgpu_drv.h" > + > +static void virtio_gpu_config_changed_work_func(struct work_struct *work) > +{ > + struct virtio_gpu_device *vgdev = > + container_of(work, struct virtio_gpu_device, > + config_changed_work); > + u32 events_read, events_clear = 0; > + > + /* read the config space */ > + virtio_cread(vgdev->vdev, struct virtio_gpu_config, > + events_read, &events_read); > + if (events_read & VIRTIO_GPU_EVENT_DISPLAY) { > + virtio_gpu_cmd_get_display_info(vgdev); > + drm_helper_hpd_irq...
2015 Mar 24
0
[PATCH] Add virtio gpu driver.
...ude <drm/drmP.h> > +#include "virtgpu_drv.h" > + > +static void virtio_gpu_config_changed_work_func(struct work_struct *work) > +{ > + struct virtio_gpu_device *vgdev = > + container_of(work, struct virtio_gpu_device, > + config_changed_work); > + u32 events_read, events_clear = 0; > + > + /* read the config space */ > + virtio_cread(vgdev->vdev, struct virtio_gpu_config, > + events_read, &events_read); > + if (events_read & VIRTIO_GPU_EVENT_DISPLAY) { > + virtio_gpu_cmd_get_display_info(vgdev); > + drm_helper_hpd_irq...
2015 May 22
1
[PATCH v3 4/4] Add virtio gpu driver.
...ude <linux/virtio_config.h> +#include <drm/drmP.h> +#include "virtgpu_drv.h" + +static void virtio_gpu_config_changed_work_func(struct work_struct *work) +{ + struct virtio_gpu_device *vgdev = + container_of(work, struct virtio_gpu_device, + config_changed_work); + u32 events_read, events_clear = 0; + + /* read the config space */ + virtio_cread(vgdev->vdev, struct virtio_gpu_config, + events_read, &events_read); + if (events_read & VIRTIO_GPU_EVENT_DISPLAY) { + virtio_gpu_cmd_get_display_info(vgdev); + drm_helper_hpd_irq_event(vgdev->ddev); + events_c...
2015 May 22
1
[PATCH v3 4/4] Add virtio gpu driver.
...ude <linux/virtio_config.h> +#include <drm/drmP.h> +#include "virtgpu_drv.h" + +static void virtio_gpu_config_changed_work_func(struct work_struct *work) +{ + struct virtio_gpu_device *vgdev = + container_of(work, struct virtio_gpu_device, + config_changed_work); + u32 events_read, events_clear = 0; + + /* read the config space */ + virtio_cread(vgdev->vdev, struct virtio_gpu_config, + events_read, &events_read); + if (events_read & VIRTIO_GPU_EVENT_DISPLAY) { + virtio_gpu_cmd_get_display_info(vgdev); + drm_helper_hpd_irq_event(vgdev->ddev); + events_c...
2015 Apr 01
3
[PATCH v2 3/4] Add virtio gpu driver.
...ude <linux/virtio_config.h> +#include <drm/drmP.h> +#include "virtgpu_drv.h" + +static void virtio_gpu_config_changed_work_func(struct work_struct *work) +{ + struct virtio_gpu_device *vgdev = + container_of(work, struct virtio_gpu_device, + config_changed_work); + u32 events_read, events_clear = 0; + + /* read the config space */ + virtio_cread(vgdev->vdev, struct virtio_gpu_config, + events_read, &events_read); + if (events_read & VIRTIO_GPU_EVENT_DISPLAY) { + virtio_gpu_cmd_get_display_info(vgdev); + drm_helper_hpd_irq_event(vgdev->ddev); + events_c...
2015 Apr 01
3
[PATCH v2 3/4] Add virtio gpu driver.
...ude <linux/virtio_config.h> +#include <drm/drmP.h> +#include "virtgpu_drv.h" + +static void virtio_gpu_config_changed_work_func(struct work_struct *work) +{ + struct virtio_gpu_device *vgdev = + container_of(work, struct virtio_gpu_device, + config_changed_work); + u32 events_read, events_clear = 0; + + /* read the config space */ + virtio_cread(vgdev->vdev, struct virtio_gpu_config, + events_read, &events_read); + if (events_read & VIRTIO_GPU_EVENT_DISPLAY) { + virtio_gpu_cmd_get_display_info(vgdev); + drm_helper_hpd_irq_event(vgdev->ddev); + events_c...
2020 Aug 03
51
[PATCH v2 00/24] virtio: config space endian-ness cleanup
Config space endian-ness is currently a mess: fields are not tagged with the correct endian-ness so it's easy to make mistakes like instanciating config space in native endian-ness. The following patches adding sparse tagging are currently in my tree. Lightly tested. As a follow-up, I plan to add new APIs that handle modern config space in a more efficient way (bypassing the version check).