* [PATCH] drm/virtio: print a single line with device features
@ 2019-10-18 11:38 Gerd Hoffmann
2019-10-22 9:05 ` Daniel Vetter
0 siblings, 1 reply; 4+ messages in thread
From: Gerd Hoffmann @ 2019-10-18 11:38 UTC (permalink / raw)
To: dri-devel
Cc: Gerd Hoffmann, David Airlie, Daniel Vetter,
open list:VIRTIO GPU DRIVER, open list
Signed-off-by: Gerd Hoffmann <kraxel@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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/virtio: print a single line with device features
2019-10-18 11:38 [PATCH] drm/virtio: print a single line with device features Gerd Hoffmann
@ 2019-10-22 9:05 ` Daniel Vetter
2019-10-23 13:18 ` Jani Nikula
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2019-10-22 9:05 UTC (permalink / raw)
To: Gerd Hoffmann
Cc: dri-devel, David Airlie, Daniel Vetter,
open list:VIRTIO GPU DRIVER, open list
On Fri, Oct 18, 2019 at 01:38:32PM +0200, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@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@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/virtio: print a single line with device features
2019-10-22 9:05 ` Daniel Vetter
@ 2019-10-23 13:18 ` Jani Nikula
2019-10-23 13:34 ` Daniel Vetter
0 siblings, 1 reply; 4+ messages in thread
From: Jani Nikula @ 2019-10-23 13:18 UTC (permalink / raw)
To: Daniel Vetter, Gerd Hoffmann
Cc: David Airlie, open list, dri-devel, open list:VIRTIO GPU DRIVER
On Tue, 22 Oct 2019, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Fri, Oct 18, 2019 at 01:38:32PM +0200, Gerd Hoffmann wrote:
>> Signed-off-by: Gerd Hoffmann <kraxel@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@intel.com
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/virtio: print a single line with device features
2019-10-23 13:18 ` Jani Nikula
@ 2019-10-23 13:34 ` Daniel Vetter
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2019-10-23 13:34 UTC (permalink / raw)
To: Jani Nikula
Cc: Gerd Hoffmann, David Airlie, open list, dri-devel,
open list:VIRTIO GPU DRIVER
On Wed, Oct 23, 2019 at 3:18 PM Jani Nikula <jani.nikula@linux.intel.com> wrote:
>
> On Tue, 22 Oct 2019, Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Fri, Oct 18, 2019 at 01:38:32PM +0200, Gerd Hoffmann wrote:
> >> Signed-off-by: Gerd Hoffmann <kraxel@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@intel.com
Oh nice, r-b: me on that.
I think the rule for new headers like this is "just do it" once you
have enough senior kernel maintainers' approval. Maybe ask Dave Airlie
for ack and with Greg's r-b then just stuff it into drm-misc-next or
so?
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-23 13:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 11:38 [PATCH] drm/virtio: print a single line with device features Gerd Hoffmann
2019-10-22 9:05 ` Daniel Vetter
2019-10-23 13:18 ` Jani Nikula
2019-10-23 13:34 ` Daniel Vetter
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).