Re: [PATCH RESEND v2 03/32] drm/vkms: Use enabled/disabled instead of 1/0 for debug

José Expósito
2025-11-13T14:09:14Z

On Wed, Oct 29, 2025 at 03:36:40PM +0100, Louis Chauvet wrote:
> Debug information are mainly read by human, so display human
> readable values.

Today I learned. I wasn't aware of those helpers, nice!

Reviewed-by: José Expósito <jose.exposito@redhat.com>

> Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
> ---
> drivers/gpu/drm/vkms/vkms_config.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/vkms/vkms_config.c b/drivers/gpu/drm/vkms/vkms_config.c
> index cfdd5f32f234..391794d391c5 100644
> --- a/drivers/gpu/drm/vkms/vkms_config.c
> +++ b/drivers/gpu/drm/vkms/vkms_config.c
> @@ -1,6 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0+
>
> #include <linux/slab.h>
> +#include <linux/string_choices.h>
>
> #include <drm/drm_print.h>
> #include <drm/drm_debugfs.h>
> @@ -354,8 +355,8 @@ static int vkms_config_show(struct seq_file *m, void *data)
>
> vkms_config_for_each_crtc(vkmsdev->config, crtc_cfg) {
> seq_puts(m, "crtc:\n");
> - seq_printf(m, "\twriteback=%d\n",
> - vkms_config_crtc_get_writeback(crtc_cfg));
> + seq_printf(m, "\twriteback=%s\n",
> + str_enabled_disabled(vkms_config_crtc_get_writeback(crtc_cfg)));
> }
>
> vkms_config_for_each_encoder(vkmsdev->config, encoder_cfg)
>
> --
> 2.51.0
>