All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>, Gerd Hoffmann <kraxel@redhat.com>
Cc: David Airlie <airlied@linux.ie>,
	open list <linux-kernel@vger.kernel.org>,
	dri-devel@lists.freedesktop.org,
	"open list:VIRTIO GPU DRIVER"
	<virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH] drm/virtio: print a single line with device features
Date: Wed, 23 Oct 2019 16:18:06 +0300	[thread overview]
Message-ID: <87mudreh2p.fsf@intel.com> (raw)
In-Reply-To: <20191022090533.GB11828@phenom.ffwll.local>

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

WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>, Gerd Hoffmann <kraxel@redhat.com>
Cc: David Airlie <airlied@linux.ie>,
	open list <linux-kernel@vger.kernel.org>,
	dri-devel@lists.freedesktop.org,
	"open list:VIRTIO GPU DRIVER"
	<virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH] drm/virtio: print a single line with device features
Date: Wed, 23 Oct 2019 16:18:06 +0300	[thread overview]
Message-ID: <87mudreh2p.fsf@intel.com> (raw)
Message-ID: <20191023131806.RKrlBuRk3wXMnjn68PhjB5WCFQiQzLFfGESuHwraQ9s@z> (raw)
In-Reply-To: <20191022090533.GB11828@phenom.ffwll.local>

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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>, Gerd Hoffmann <kraxel@redhat.com>
Cc: David Airlie <airlied@linux.ie>,
	open list <linux-kernel@vger.kernel.org>,
	dri-devel@lists.freedesktop.org,
	"open list\:VIRTIO GPU DRIVER" 
	<virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH] drm/virtio: print a single line with device features
Date: Wed, 23 Oct 2019 16:18:06 +0300	[thread overview]
Message-ID: <87mudreh2p.fsf@intel.com> (raw)
In-Reply-To: <20191022090533.GB11828@phenom.ffwll.local>

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

  reply	other threads:[~2019-10-23 13:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 11:38 [PATCH] drm/virtio: print a single line with device features Gerd Hoffmann
2019-10-18 11:38 ` Gerd Hoffmann
2019-10-22  9:05 ` Daniel Vetter
2019-10-22  9:05   ` Daniel Vetter
2019-10-23 13:18   ` Jani Nikula [this message]
2019-10-23 13:18     ` Jani Nikula
2019-10-23 13:18     ` Jani Nikula
2019-10-23 13:34     ` Daniel Vetter
2019-10-23 13:34     ` Daniel Vetter
2019-10-23 13:34       ` Daniel Vetter
2019-10-23 13:18   ` Jani Nikula
2019-10-22  9:05 ` Daniel Vetter
  -- strict thread matches above, loose matches on Subject: below --
2019-10-18 11:38 Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mudreh2p.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.