Skip to content

Commit 115a71d

Browse files
committed
drm/virtio: convert to LE accessors
Virtgpu is modern-only. Use LE accessors for config space. Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 02e715b commit 115a71d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/gpu/drm/virtio/virtgpu_kms.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ static void virtio_gpu_config_changed_work_func(struct work_struct *work)
3939
u32 events_read, events_clear = 0;
4040

4141
/* read the config space */
42-
virtio_cread(vgdev->vdev, struct virtio_gpu_config,
43-
events_read, &events_read);
42+
virtio_cread_le(vgdev->vdev, struct virtio_gpu_config,
43+
events_read, &events_read);
4444
if (events_read & VIRTIO_GPU_EVENT_DISPLAY) {
4545
if (vgdev->has_edid)
4646
virtio_gpu_cmd_get_edids(vgdev);
@@ -49,8 +49,8 @@ static void virtio_gpu_config_changed_work_func(struct work_struct *work)
4949
drm_helper_hpd_irq_event(vgdev->ddev);
5050
events_clear |= VIRTIO_GPU_EVENT_DISPLAY;
5151
}
52-
virtio_cwrite(vgdev->vdev, struct virtio_gpu_config,
53-
events_clear, &events_clear);
52+
virtio_cwrite_le(vgdev->vdev, struct virtio_gpu_config,
53+
events_clear, &events_clear);
5454
}
5555

5656
static void virtio_gpu_init_vq(struct virtio_gpu_queue *vgvq,
@@ -165,8 +165,8 @@ int virtio_gpu_init(struct drm_device *dev)
165165
}
166166

167167
/* get display info */
168-
virtio_cread(vgdev->vdev, struct virtio_gpu_config,
169-
num_scanouts, &num_scanouts);
168+
virtio_cread_le(vgdev->vdev, struct virtio_gpu_config,
169+
num_scanouts, &num_scanouts);
170170
vgdev->num_scanouts = min_t(uint32_t, num_scanouts,
171171
VIRTIO_GPU_MAX_SCANOUTS);
172172
if (!vgdev->num_scanouts) {
@@ -176,8 +176,8 @@ int virtio_gpu_init(struct drm_device *dev)
176176
}
177177
DRM_INFO("number of scanouts: %d\n", num_scanouts);
178178

179-
virtio_cread(vgdev->vdev, struct virtio_gpu_config,
180-
num_capsets, &num_capsets);
179+
virtio_cread_le(vgdev->vdev, struct virtio_gpu_config,
180+
num_capsets, &num_capsets);
181181
DRM_INFO("number of cap sets: %d\n", num_capsets);
182182

183183
virtio_gpu_modeset_init(vgdev);

0 commit comments

Comments
 (0)