search for: virtio_gpu_config

Displaying 20 results from an estimated 45 matches for "virtio_gpu_config".

2020 Aug 05
1
[PATCH v3 34/38] drm/virtio: convert to LE accessors
...---- 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_...
2023 Feb 24
2
[PATCH] drm/virtio: Add option to disable KMS support
...;vdev, VIRTIO_RING_F_INDIRECT_DESC)) { vgdev->has_indirect = true; } @@ -218,6 +220,7 @@ int virtio_gpu_init(struct virtio_device *vdev, struct drm_device *dev) goto err_vbufs; } +#if defined(CONFIG_DRM_VIRTIO_GPU_KMS) /* get display info */ virtio_cread_le(vgdev->vdev, struct virtio_gpu_config, num_scanouts, &num_scanouts); @@ -229,6 +232,7 @@ int virtio_gpu_init(struct virtio_device *vdev, struct drm_device *dev) goto err_scanouts; } DRM_INFO("number of scanouts: %d\n", num_scanouts); +#endif virtio_cread_le(vgdev->vdev, struct virtio_gpu_config, num_...
2023 Feb 28
2
[PATCH v3] drm/virtio: Add option to disable KMS support
...> <dmitry.osipenko at collabora.com> wrote: >> >> On 2/27/23 20:38, Rob Clark wrote: >> ... >>> + if (IS_ENABLED(CONFIG_DRM_VIRTIO_GPU_KMS)) { >>> + /* get display info */ >>> + 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) {...
2023 Feb 27
1
[PATCH v3] drm/virtio: Add option to disable KMS support
...at 9:57 AM Dmitry Osipenko <dmitry.osipenko at collabora.com> wrote: > > On 2/27/23 20:38, Rob Clark wrote: > ... > > + if (IS_ENABLED(CONFIG_DRM_VIRTIO_GPU_KMS)) { > > + /* get display info */ > > + 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) { > > +...
2018 Sep 13
0
[PATCH 2/3] virtio-gpu: add VIRTIO_GPU_F_EDID feature
...+struct virtio_gpu_get_edid { + struct virtio_gpu_ctrl_hdr hdr; + __le32 scanout; +}; + +/* VIRTIO_GPU_RESP_OK_EDID */ +struct virtio_gpu_resp_edid { + struct virtio_gpu_ctrl_hdr hdr; + __le32 scanout; + __le32 size; + __u8 edid[512]; +}; + #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0) struct virtio_gpu_config { -- 2.9.3
2018 Oct 05
0
[PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
...struct virtio_gpu_get_edid { + struct virtio_gpu_ctrl_hdr hdr; + __le32 scanout; +}; + +/* VIRTIO_GPU_RESP_OK_EDID */ +struct virtio_gpu_resp_edid { + struct virtio_gpu_ctrl_hdr hdr; + __le32 scanout; + __le32 size; + __u8 edid[1024]; +}; + #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0) struct virtio_gpu_config { -- 2.9.3
2018 Oct 05
0
[PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
...> Wouldn?t it be enough to stick to EDID 2.0 (256 bytes)? > > If not, maybe add comment to explain why you chose 1024. EDID in the wild can be up to 512 bytes. -Daniel > > > +}; > > + > > #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0) > > > > struct virtio_gpu_config { > > -- > > 2.9.3 > > > > _______________________________________________ > dri-devel mailing list > dri-devel at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog...
2020 Aug 03
0
[PATCH v2 10/24] virtio_gpu: correct tags for config space fields
...-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
2020 Aug 05
1
[PATCH v3 10/38] virtio_gpu: correct tags for config space fields
...-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
2020 Sep 07
0
[PATCH v3 2/2] drm/virtio: set max_segment
...ers/gpu/drm/virtio/virtgpu_kms.c @@ -167,6 +167,7 @@ int virtio_gpu_init(struct drm_device *dev) DRM_ERROR("failed to alloc vbufs\n"); goto err_vbufs; } + dev->max_segment = virtio_max_dma_size(vgdev->vdev); /* get display info */ virtio_cread_le(vgdev->vdev, struct virtio_gpu_config, -- 2.27.0
2018 Sep 13
0
[PATCH 3/3] drm/virtio: add edid support
..._driver virtio_gpu_driver = { .feature_table = features, diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/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);...
2023 Mar 01
1
[PATCH v5] drm/virtio: Add option to disable KMS support
...canouts = 0; + vgdev->has_edid = false; + dev->driver_features &= ~(DRIVER_MODESET | DRIVER_ATOMIC); + } else { + DRM_INFO("number of scanouts: %d\n", num_scanouts); } - DRM_INFO("number of scanouts: %d\n", num_scanouts); virtio_cread_le(vgdev->vdev, struct virtio_gpu_config, num_capsets, &num_capsets); DRM_INFO("number of cap sets: %d\n", num_capsets); - ret = virtio_gpu_modeset_init(vgdev); - if (ret) { - DRM_ERROR("modeset init failed\n"); - goto err_scanouts; + if (vgdev->num_scanouts) { + ret = virtio_gpu_modeset_init(vgdev);...
2020 Apr 30
2
[PATCH 0/1] Add uvirtio for testing
On Wed, Apr 29, 2020 at 08:59:18PM -0700, lepton wrote: > On Wed, Apr 29, 2020 at 4:58 AM Gerd Hoffmann <kraxel at redhat.com> wrote: > > > > > 3) Need to be verbose on how the vring processing work in the commit log of > > > patch 1 > > > > Ecven better a file documenting the interface somewhere in > > Documentation/ > I put a uvirtio-vga.c
2015 Sep 21
2
[PATCH v2 4/6] virtio-gpu: add 3d/virgl support
...S, virtio_gpu_get_caps_ioctl, + DRM_AUTH|DRM_UNLOCKED), +}; diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c index 782766c..12a1091 100644 --- a/drivers/gpu/drm/virtio/virtgpu_kms.c +++ b/drivers/gpu/drm/virtio/virtgpu_kms.c @@ -52,6 +52,41 @@ static void virtio_gpu_config_changed_work_func(struct work_struct *work) events_clear, &events_clear); } +static void virtio_gpu_ctx_id_get(struct virtio_gpu_device *vgdev, + uint32_t *resid) +{ + int handle; + + idr_preload(GFP_KERNEL); + spin_lock(&vgdev->ctx_id_idr_lock); + handle = idr_alloc(&am...
2015 Sep 21
2
[PATCH v2 4/6] virtio-gpu: add 3d/virgl support
...S, virtio_gpu_get_caps_ioctl, + DRM_AUTH|DRM_UNLOCKED), +}; diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c index 782766c..12a1091 100644 --- a/drivers/gpu/drm/virtio/virtgpu_kms.c +++ b/drivers/gpu/drm/virtio/virtgpu_kms.c @@ -52,6 +52,41 @@ static void virtio_gpu_config_changed_work_func(struct work_struct *work) events_clear, &events_clear); } +static void virtio_gpu_ctx_id_get(struct virtio_gpu_device *vgdev, + uint32_t *resid) +{ + int handle; + + idr_preload(GFP_KERNEL); + spin_lock(&vgdev->ctx_id_idr_lock); + handle = idr_alloc(&am...
2015 Mar 24
10
[PATCH] Add virtio gpu driver.
...virtio_gpu_modeset == -1) + return -EINVAL; +#endif + + if (virtio_gpu_modeset == 0) + return -EINVAL; + + return drm_virtio_init(&driver, vdev); +} + +static void virtio_gpu_remove(struct virtio_device *vdev) +{ + struct drm_device *dev = vdev->priv; + drm_put_dev(dev); +} + +static void virtio_gpu_config_changed(struct virtio_device *vdev) +{ + struct drm_device *dev = vdev->priv; + struct virtio_gpu_device *vgdev = dev->dev_private; + + schedule_work(&vgdev->config_changed_work); +} + +static struct virtio_device_id id_table[] = { + { VIRTIO_ID_GPU, VIRTIO_DEV_ANY_ID }, + { 0 }, +}; +...
2015 Mar 24
10
[PATCH] Add virtio gpu driver.
...virtio_gpu_modeset == -1) + return -EINVAL; +#endif + + if (virtio_gpu_modeset == 0) + return -EINVAL; + + return drm_virtio_init(&driver, vdev); +} + +static void virtio_gpu_remove(struct virtio_device *vdev) +{ + struct drm_device *dev = vdev->priv; + drm_put_dev(dev); +} + +static void virtio_gpu_config_changed(struct virtio_device *vdev) +{ + struct drm_device *dev = vdev->priv; + struct virtio_gpu_device *vgdev = dev->dev_private; + + schedule_work(&vgdev->config_changed_work); +} + +static struct virtio_device_id id_table[] = { + { VIRTIO_ID_GPU, VIRTIO_DEV_ANY_ID }, + { 0 }, +}; +...
2015 Mar 24
0
[PATCH] Add virtio gpu driver.
...(virtio_gpu_modeset == 0) > + return -EINVAL; > + > + return drm_virtio_init(&driver, vdev); > +} > + > +static void virtio_gpu_remove(struct virtio_device *vdev) > +{ > + struct drm_device *dev = vdev->priv; > + drm_put_dev(dev); > +} > + > +static void virtio_gpu_config_changed(struct virtio_device *vdev) > +{ > + struct drm_device *dev = vdev->priv; > + struct virtio_gpu_device *vgdev = dev->dev_private; > + > + schedule_work(&vgdev->config_changed_work); > +} > + > +static struct virtio_device_id id_table[] = { > + { VIRTI...
2015 Mar 24
0
[PATCH] Add virtio gpu driver.
...(virtio_gpu_modeset == 0) > + return -EINVAL; > + > + return drm_virtio_init(&driver, vdev); > +} > + > +static void virtio_gpu_remove(struct virtio_device *vdev) > +{ > + struct drm_device *dev = vdev->priv; > + drm_put_dev(dev); > +} > + > +static void virtio_gpu_config_changed(struct virtio_device *vdev) > +{ > + struct drm_device *dev = vdev->priv; > + struct virtio_gpu_device *vgdev = dev->dev_private; > + > + schedule_work(&vgdev->config_changed_work); > +} > + > +static struct virtio_device_id id_table[] = { > + { VIRTI...
2015 Oct 02
0
[PATCH v3 4/7] virtio-gpu: add 3d/virgl support
...S, virtio_gpu_get_caps_ioctl, + DRM_AUTH|DRM_UNLOCKED), +}; diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c index 782766c..06496a1 100644 --- a/drivers/gpu/drm/virtio/virtgpu_kms.c +++ b/drivers/gpu/drm/virtio/virtgpu_kms.c @@ -52,6 +52,41 @@ static void virtio_gpu_config_changed_work_func(struct work_struct *work) events_clear, &events_clear); } +static void virtio_gpu_ctx_id_get(struct virtio_gpu_device *vgdev, + uint32_t *resid) +{ + int handle; + + idr_preload(GFP_KERNEL); + spin_lock(&vgdev->ctx_id_idr_lock); + handle = idr_alloc(&am...