Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1272585ybg; Wed, 23 Oct 2019 13:06:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxNUPbHYwSQTmf81YT1lzUdQNx6H3bbRBVqFnLRQ/u/Kol2sTnZc3a5LuWGQKKPiOujlUV/ X-Received: by 2002:a17:906:474b:: with SMTP id j11mr34817146ejs.325.1571861200109; Wed, 23 Oct 2019 13:06:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571861200; cv=none; d=google.com; s=arc-20160816; b=gGsQgfsZ7ov1lYRSmQjEpwKct1YQfnJmK7MyOoruMCBwUIqWlYKGKKgbwlUiwcbJjS fb/XtHrw0CX1NhvOB3trYMEBYcbOWpGITEhMWTWAJ47DdxHJLSxFiypL/Cr5QNovpKy1 f0qCIvGNXceOyB4w8tedISIjCu4l6G8qb7K03jyXj3T4bIMcveZG4zyLea9OCTsg2H5J QqrczzjDl9qVEB920CCIPsW1gkyoMQv84Rpju5vT/pqN0WGQmTwG/EevEcTGHokETusN co6qN15d7e0CdT8liG3q6ey03Nl7U5Gbg0bunJPbWepA5ewZ7WXB4mk14fRE1ja+JZph ZEYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from; bh=WAgeT+MYDI2upZUlgOXLuBNFsE4X1a3WJwhtljOsjcA=; b=oiBcwrci+ZcAKgGbckKm6ecLazmJOgp8Xx95SHDr511Uri/9nq1UfiI1BNXVvzezYR ZG2+V/wf9NOW1fLCl9agrm8Rx8vkIQH1EZycQLE+G7Pf+/YX0TDhWUA3J90DtDKGOAcD sLRJJU6YMTHsbUx6DyHk1qayKOGTNr5EpkF1p+NkWlskstCFQD0R5OhcPAYoC+rCc2HI gimM455pCbNLSLKzNs6t+6tf3//33O8GwZAcAORgI3Xk/0S+rpsGYt/w6ogHwGMqwS+g MIyqOre90YJ6BYLNJlA8clM/hMIYpHatQJ9hQ3Jma8tKKZCTjzaH2bIGW9iSlbNCa5UX +ROA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e15si8175110ejt.370.2019.10.23.13.06.13; Wed, 23 Oct 2019 13:06:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391305AbfJWNSM (ORCPT + 99 others); Wed, 23 Oct 2019 09:18:12 -0400 Received: from mga05.intel.com ([192.55.52.43]:7044 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389425AbfJWNSM (ORCPT ); Wed, 23 Oct 2019 09:18:12 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2019 06:18:12 -0700 X-IronPort-AV: E=Sophos;i="5.68,221,1569308400"; d="scan'208";a="191826942" Received: from jnikula-mobl3.fi.intel.com (HELO localhost) ([10.237.66.161]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2019 06:18:09 -0700 From: Jani Nikula To: Daniel Vetter , Gerd Hoffmann Cc: David Airlie , open list , dri-devel@lists.freedesktop.org, "open list\:VIRTIO GPU DRIVER" Subject: Re: [PATCH] drm/virtio: print a single line with device features In-Reply-To: <20191022090533.GB11828@phenom.ffwll.local> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20191018113832.5460-1-kraxel@redhat.com> <20191022090533.GB11828@phenom.ffwll.local> Date: Wed, 23 Oct 2019 16:18:06 +0300 Message-ID: <87mudreh2p.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 22 Oct 2019, Daniel Vetter wrote: > On Fri, Oct 18, 2019 at 01:38:32PM +0200, Gerd Hoffmann wrote: >> Signed-off-by: Gerd Hoffmann >> --- >> 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