* [PATCH v3 10/38] virtio_gpu: correct tags for config space fields
[not found] <20200805134226.1106164-1-mst@redhat.com>
@ 2020-08-05 13:43 ` Michael S. Tsirkin
2020-08-07 11:22 ` Gerd Hoffmann
2020-08-05 13:44 ` [PATCH v3 34/38] drm/virtio: convert to LE accessors Michael S. Tsirkin
1 sibling, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2020-08-05 13:43 UTC (permalink / raw)
To: linux-kernel
Cc: David Airlie, Jason Wang, Cornelia Huck, dri-devel,
virtualization, Gerd Hoffmann
Since gpu is a modern-only device,
tag config space fields as having little endian-ness.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
---
include/uapi/linux/virtio_gpu.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/uapi/linux/virtio_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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v3 34/38] drm/virtio: convert to LE accessors
[not found] <20200805134226.1106164-1-mst@redhat.com>
2020-08-05 13:43 ` [PATCH v3 10/38] virtio_gpu: correct tags for config space fields Michael S. Tsirkin
@ 2020-08-05 13:44 ` Michael S. Tsirkin
2020-08-07 11:22 ` Gerd Hoffmann
1 sibling, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2020-08-05 13:44 UTC (permalink / raw)
To: linux-kernel; +Cc: David Airlie, dri-devel, Gerd Hoffmann, virtualization
Virtgpu is modern-only. Use LE accessors for config space.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
drivers/gpu/drm/virtio/virtgpu_kms.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/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) {
if (vgdev->has_edid)
virtio_gpu_cmd_get_edids(vgdev);
@@ -49,8 +49,8 @@ static void virtio_gpu_config_changed_work_func(struct work_struct *work)
drm_helper_hpd_irq_event(vgdev->ddev);
events_clear |= VIRTIO_GPU_EVENT_DISPLAY;
}
- virtio_cwrite(vgdev->vdev, struct virtio_gpu_config,
- events_clear, &events_clear);
+ virtio_cwrite_le(vgdev->vdev, struct virtio_gpu_config,
+ events_clear, &events_clear);
}
static void virtio_gpu_init_vq(struct virtio_gpu_queue *vgvq,
@@ -165,8 +165,8 @@ int virtio_gpu_init(struct drm_device *dev)
}
/* get display info */
- virtio_cread(vgdev->vdev, struct virtio_gpu_config,
- num_scanouts, &num_scanouts);
+ virtio_cread_le(vgdev->vdev, struct virtio_gpu_config,
+ num_scanouts, &num_scanouts);
vgdev->num_scanouts = min_t(uint32_t, num_scanouts,
VIRTIO_GPU_MAX_SCANOUTS);
if (!vgdev->num_scanouts) {
@@ -176,8 +176,8 @@ int virtio_gpu_init(struct drm_device *dev)
}
DRM_INFO("number of scanouts: %d\n", num_scanouts);
- virtio_cread(vgdev->vdev, struct virtio_gpu_config,
- num_capsets, &num_capsets);
+ virtio_cread_le(vgdev->vdev, struct virtio_gpu_config,
+ num_capsets, &num_capsets);
DRM_INFO("number of cap sets: %d\n", num_capsets);
virtio_gpu_modeset_init(vgdev);
--
MST
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 10/38] virtio_gpu: correct tags for config space fields
2020-08-05 13:43 ` [PATCH v3 10/38] virtio_gpu: correct tags for config space fields Michael S. Tsirkin
@ 2020-08-07 11:22 ` Gerd Hoffmann
0 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2020-08-07 11:22 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: David Airlie, Jason Wang, Cornelia Huck, linux-kernel, dri-devel,
virtualization
On Wed, Aug 05, 2020 at 09:43:42AM -0400, Michael S. Tsirkin wrote:
> Since gpu is a modern-only device,
> tag config space fields as having little endian-ness.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 34/38] drm/virtio: convert to LE accessors
2020-08-05 13:44 ` [PATCH v3 34/38] drm/virtio: convert to LE accessors Michael S. Tsirkin
@ 2020-08-07 11:22 ` Gerd Hoffmann
0 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2020-08-07 11:22 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: David Airlie, dri-devel, linux-kernel, virtualization
On Wed, Aug 05, 2020 at 09:44:48AM -0400, Michael S. Tsirkin wrote:
> Virtgpu is modern-only. Use LE accessors for config space.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-08-07 11:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20200805134226.1106164-1-mst@redhat.com>
2020-08-05 13:43 ` [PATCH v3 10/38] virtio_gpu: correct tags for config space fields Michael S. Tsirkin
2020-08-07 11:22 ` Gerd Hoffmann
2020-08-05 13:44 ` [PATCH v3 34/38] drm/virtio: convert to LE accessors Michael S. Tsirkin
2020-08-07 11:22 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).