Gerd Hoffmann
2019-Oct-18 11:38 UTC
[PATCH] drm/virtio: print a single line with device features
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_kms.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c index 0b3cdb0d83b0..2f5773e43557 100644 --- a/drivers/gpu/drm/virtio/virtgpu_kms.c +++ b/drivers/gpu/drm/virtio/virtgpu_kms.c @@ -155,16 +155,15 @@ int virtio_gpu_init(struct drm_device *dev) #ifdef __LITTLE_ENDIAN if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_VIRGL)) vgdev->has_virgl_3d = true; - DRM_INFO("virgl 3d acceleration %s\n", - vgdev->has_virgl_3d ? "enabled" : "not supported by host"); -#else - DRM_INFO("virgl 3d acceleration not supported by guest\n"); #endif if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_EDID)) { vgdev->has_edid = true; - DRM_INFO("EDID support available.\n"); } + DRM_INFO("features: %cvirgl %cedid\n", + vgdev->has_virgl_3d ? '+' : '-', + vgdev->has_edid ? '+' : '-'); + ret = virtio_find_vqs(vgdev->vdev, 2, vqs, callbacks, names, NULL); if (ret) { DRM_ERROR("failed to find virt queues\n"); -- 2.18.1
Daniel Vetter
2019-Oct-22 09:05 UTC
[PATCH] drm/virtio: print a single line with device features
On Fri, Oct 18, 2019 at 01:38:32PM +0200, Gerd Hoffmann wrote:> Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> > --- > drivers/gpu/drm/virtio/virtgpu_kms.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c > index 0b3cdb0d83b0..2f5773e43557 100644 > --- a/drivers/gpu/drm/virtio/virtgpu_kms.c > +++ b/drivers/gpu/drm/virtio/virtgpu_kms.c > @@ -155,16 +155,15 @@ int virtio_gpu_init(struct drm_device *dev) > #ifdef __LITTLE_ENDIAN > if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_VIRGL)) > vgdev->has_virgl_3d = true; > - DRM_INFO("virgl 3d acceleration %s\n", > - vgdev->has_virgl_3d ? "enabled" : "not supported by host"); > -#else > - DRM_INFO("virgl 3d acceleration not supported by guest\n"); > #endif > if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_EDID)) { > vgdev->has_edid = true; > - DRM_INFO("EDID support available.\n"); > } > > + DRM_INFO("features: %cvirgl %cedid\n", > + vgdev->has_virgl_3d ? '+' : '-', > + vgdev->has_edid ? '+' : '-');Maybe we should move the various yesno/onoff/enableddisabled helpers from i915_utils.h to drm_utils.h and use them more widely? Anyway Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>> + > ret = virtio_find_vqs(vgdev->vdev, 2, vqs, callbacks, names, NULL); > if (ret) { > DRM_ERROR("failed to find virt queues\n"); > -- > 2.18.1 >-- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Jani Nikula
2019-Oct-23 13:18 UTC
[PATCH] drm/virtio: print a single line with device features
On Tue, 22 Oct 2019, Daniel Vetter <daniel at ffwll.ch> wrote:> On Fri, Oct 18, 2019 at 01:38:32PM +0200, Gerd Hoffmann wrote: >> Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> >> --- >> drivers/gpu/drm/virtio/virtgpu_kms.c | 9 ++++----- >> 1 file changed, 4 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c >> index 0b3cdb0d83b0..2f5773e43557 100644 >> --- a/drivers/gpu/drm/virtio/virtgpu_kms.c >> +++ b/drivers/gpu/drm/virtio/virtgpu_kms.c >> @@ -155,16 +155,15 @@ int virtio_gpu_init(struct drm_device *dev) >> #ifdef __LITTLE_ENDIAN >> if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_VIRGL)) >> vgdev->has_virgl_3d = true; >> - DRM_INFO("virgl 3d acceleration %s\n", >> - vgdev->has_virgl_3d ? "enabled" : "not supported by host"); >> -#else >> - DRM_INFO("virgl 3d acceleration not supported by guest\n"); >> #endif >> if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_EDID)) { >> vgdev->has_edid = true; >> - DRM_INFO("EDID support available.\n"); >> } >> >> + DRM_INFO("features: %cvirgl %cedid\n", >> + vgdev->has_virgl_3d ? '+' : '-', >> + vgdev->has_edid ? '+' : '-'); > > Maybe we should move the various yesno/onoff/enableddisabled helpers from > i915_utils.h to drm_utils.h and use them more widely?I'm trying to take it one step further by adding them to include/linux/string-choice.h [1]. Maybe, uh, fourth time's the charm? BR, Jani. [1] http://lore.kernel.org/r/20191023131308.9420-1-jani.nikula at intel.com -- Jani Nikula, Intel Open Source Graphics Center
Maybe Matching Threads
- [PATCH] drm/virtio: print a single line with device features
- [PATCH] drm/virtio: print a single line with device features
- [PATCH v2] drm/virtio: fix ring free check
- [PATCH] drm/virtio: print a single line with device features
- [PATCH] drm/virtio: Add option to disable KMS support