Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5702988pxv; Wed, 7 Jul 2021 09:46:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrK05iSRc4RUzHcO6mSv5SFmjHK2BU8H9juuljCP8AZoz+ItB5oPZiF/4yQo0m5Llvxw8p X-Received: by 2002:aa7:dbc8:: with SMTP id v8mr30824845edt.242.1625676409656; Wed, 07 Jul 2021 09:46:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625676409; cv=none; d=google.com; s=arc-20160816; b=hc86X4IRrbaz9AJPSH4YKzeQJjbnHFExOMy/iPQKuJ5pnasazY9t+YBN43KfLpO9g0 hPAma3lj+fwTT8Ky8GdYar/vGVOcRs4PGkPJiyBO+I+COQ7mwfzI6q11GJXY+o+GdoAZ 6/XzjqBf55js9TpolCorRU82EZro8dVnsFL7TJWbDgH3b1zLXYMwXQQWlZ4sddQUX0o9 flAD5Ycr22j3R2bsP4mPSEJ+N/y8iK/J+O6GMi//5lZ77k6tbOpinQMgHZsQYLgSmVDi wPmtxhBNVXDf87hb3aSsvgzVDbB161SZoLaxqUmRGJL/Z9Am6SkbEpWLC8K5CM0h7vB/ e0sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=N1jcO0yI6pPJfzDKfj/96aZNPkzpA0/0vrFttiKfOXA=; b=T2JpEwyEV/sv8TPka9AvdBNXM4rKbBc5mr5ad8AJDh9PxC0OzbIiu6huINZOw0eYXC PxdH1239uNCpjeqMp+rkldX7QhX7jmORBsVhQdi5a9/d/M9RB+ui5WKaVL1AMIBP0BF0 +ZDGIV6b0HKTKLl/5A8KyU34QUF40AXZZeAUpXRBKPGmhzFznM9Q4RRl/CG7pdTQ5//C VzC1eIya8O+TwBGc79ZDGY2VF2K3udXdbPjK453iZuXjwyZUVEiBW2idwhNrdkZQLIsL /oWHMnAfKt2ZMoG+DrGBOhLoxn8s+8kOsTf/bN2dWsdcEq0n1MFmmgrV5XoNAq41fYA0 xMhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HDl8nggq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb8si23723051ejc.486.2021.07.07.09.46.26; Wed, 07 Jul 2021 09:46:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HDl8nggq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230382AbhGGQp7 (ORCPT + 99 others); Wed, 7 Jul 2021 12:45:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230327AbhGGQp6 (ORCPT ); Wed, 7 Jul 2021 12:45:58 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85A8FC061574 for ; Wed, 7 Jul 2021 09:43:16 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id h18-20020a05600c3512b029020e4ceb9588so4763665wmq.5 for ; Wed, 07 Jul 2021 09:43:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=N1jcO0yI6pPJfzDKfj/96aZNPkzpA0/0vrFttiKfOXA=; b=HDl8nggq4jDLWfJVaXoLXI/XGpjg42wmsm+lscbHy6pywD9OsuSlUU2o4MTcvDEcpx cbErC3do9h7aOzQGK34uVcpgujTryhxd2V7ir+rKQOIMJO0b3+QhwRtK48bXTSQauWYy Dx+TwiTMO1mP8nLA+VAWcnBW+5NqGxa7pyMduyqIObWXu+3a4+E9chHaIUZ62Bm7Xk43 HlxKyjExZmvO/D6kSbAP0Mm/ueEBmxBh1U5UpJ3ozdnH04G6hXBtCAvnrLlDOZNZQXeP DEgg/9ZkBMuvVESagNWQWbBzaTYvz0W28MntvUDeAertPvsyeTjRJxnNM4W12tG4IhVm KuLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=N1jcO0yI6pPJfzDKfj/96aZNPkzpA0/0vrFttiKfOXA=; b=GOTWh4E0DtF7I5VdcDpVz7N/yk6ygwsg617Mgnp05AKBjxzAbETMyTAiA1jfq3bWV9 8AVvTyhUW/EPeDgXhaE4gpIUPRnX4ii2uyma8lflcfcK8+loA0uSpikJlGj/0Nwj1npn w+IU22kZ6TjXtx18hKlBsaEn14/bPe+KH+ZwJufgZjqaeOZ1o74hokF2AbVHAI6DEAYW PIyTDc+nnEU+rFMjStrRCNIjx0MYkAbUqm9XmzsCNsJZiXdKPDYHXNBSHyfVRlozpbF0 QoNE84PSvAk4GqUovnnvbvCEcvRPn0l2HzoznAAYmQ9vCAigfNkRQTZ9X6LKtuci82xu SAPA== X-Gm-Message-State: AOAM531SNSE5rTCt005kZK1AfB1N6J+eQA9Rm+FH4w+s22prFZXXC1BE sHu5rx9NJXCCClKK+xSm/X8= X-Received: by 2002:a1c:7314:: with SMTP id d20mr556224wmb.156.1625676195123; Wed, 07 Jul 2021 09:43:15 -0700 (PDT) Received: from smtp.gmail.com (a95-92-181-29.cpe.netcabo.pt. [95.92.181.29]) by smtp.gmail.com with ESMTPSA id d8sm652693wra.41.2021.07.07.09.43.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jul 2021 09:43:14 -0700 (PDT) Date: Wed, 7 Jul 2021 17:43:05 +0100 From: Melissa Wen To: Beatriz Martins de Carvalho Cc: daniel@ffwll.ch, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH] drm/vkms: Create vkms_config_debufs in vkms_drv.c Message-ID: <20210707164244.ktmizbd6gbuifu73@smtp.gmail.com> References: <20210707092927.336244-1-martinsdecarvalhobeatriz@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210707092927.336244-1-martinsdecarvalhobeatriz@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/07, Beatriz Martins de Carvalho wrote: > Development vkms_config_debufs in vkms_drv.c for the long term plan of > making vkms configurable and have multiple different instances it's > useful to be able to get at the config of each instance in debugfs Hi Beatriz, Thanks for your patch. Changes lgtm. However commit message needs small improvements. Besides typo, it would be good to make the subject clearer in terms of its purpose (creating a debugfs file to get/track vkms config data). Please, address these minor things and add my r-b. Reviewed-by: Melissa Wen > > Signed-off-by: Beatriz Martins de Carvalho > --- > drivers/gpu/drm/vkms/vkms_drv.c | 28 ++++++++++++++++++++++++++++ > 1 file changed, 28 insertions(+) > > diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c > index 027ffe759440..c81fba6c72f0 100644 > --- a/drivers/gpu/drm/vkms/vkms_drv.c > +++ b/drivers/gpu/drm/vkms/vkms_drv.c > @@ -28,6 +28,9 @@ > > #include "vkms_drv.h" > > +#include > +#include > + > #define DRIVER_NAME "vkms" > #define DRIVER_DESC "Virtual Kernel Mode Setting" > #define DRIVER_DATE "20180514" > @@ -86,12 +89,37 @@ static void vkms_atomic_commit_tail(struct drm_atomic_state *old_state) > drm_atomic_helper_cleanup_planes(dev, old_state); > } > > +static int vkms_config_show(struct seq_file *m, void *data) > +{ > + struct drm_info_node *node = (struct drm_info_node *)m->private; > + struct drm_device *dev = node->minor->dev; > + struct vkms_device *vkmsdev = drm_device_to_vkms_device(dev); > + > + seq_printf(m, "writeback=%d\n", vkmsdev->config->writeback); > + seq_printf(m, "cursor=%d\n", vkmsdev->config->cursor); > + seq_printf(m, "overlay=%d\n", vkmsdev->config->overlay); > + > + return 0; > +} > + > +static const struct drm_info_list vkms_config_debugfs_list[] = { > + { "vkms_config", vkms_config_show, 0 }, > +}; > + > +static void vkms_config_debugfs_init(struct drm_minor *minor) > +{ > + drm_debugfs_create_files(vkms_config_debugfs_list, ARRAY_SIZE(vkms_config_debugfs_list), > + minor->debugfs_root, minor); > +} > + > static const struct drm_driver vkms_driver = { > .driver_features = DRIVER_MODESET | DRIVER_ATOMIC | DRIVER_GEM, > .release = vkms_release, > .fops = &vkms_driver_fops, > DRM_GEM_SHMEM_DRIVER_OPS, > > + .debugfs_init = vkms_config_debugfs_init, > + > .name = DRIVER_NAME, > .desc = DRIVER_DESC, > .date = DRIVER_DATE, > -- > 2.25.1 >