Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp300233pxu; Fri, 4 Dec 2020 03:44:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmylnhTIZJuEzvYyhanaYml1pVtYtNyQnykkCOll6BioLr24mD3mHlXswTRlIwuxF/v7/4 X-Received: by 2002:a17:906:3099:: with SMTP id 25mr6661595ejv.321.1607082247385; Fri, 04 Dec 2020 03:44:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607082247; cv=none; d=google.com; s=arc-20160816; b=gmoTCN/FHExcKVLcHX6ze/ddpXX/5SGrliFiZLTmybEkIaaHQyCx7vPS5ghqX7xD2y 3dcdP7Nb/0NkmlhBf/aLBzCli91Hy7MpS+yfQ71HxSGvAprPPihUgsLdK+pcKL3Tmd/S PyNV8Qrls9leh9DUm538pJbrmHPRt3oNYB3xU9ZTCnIaaD/cEIDDh76j7baO0MrtcgEy Wj0DuZdECpBe+yV4FWIOadPbIBDVzsulalfjxAJDvo6jF9dOhl/0KTN4npMWgQ15NSRU QNRIh73FFu18wA8NoZkWAiDJIXbgwuF7+5zLCvTzDFFvGPRNVXW7UlkdaC6scrzqrVRt g/OA== 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=WgsTtVr/b1JNUa2uSYC+bnyuIfDmWDZgY06jl/btiUM=; b=LxlZqsf4TfF00YoSrBpSz1M47w5MWHT+a8ISHhqqhH+M1oA1lAT3MYCmOVdkCDdVU3 g2L+3aSo0VPJz25G5L9EKSHS+rKiuSTrKICAP23eBX6NCvYBW71trybjj+Ly/nKHGNPj jIq4XAIjDlixq6NTP7qvekfHCDxIaXxmomPXKcKASOa/6fSBXfkIczZKSQdGKWAD0tEf ry03OwhWAodV0VKFxFW8r8EryxxI/XOziPkdDEmdC54u/CfY3bsUah1iyqgArv3f801L TIY9gyUl6LHiblpbAJOs9k3mGyWFlmCDHFySF8MaFSL2NLKYk9/ayXdE7RO1woJ5x5qa 8JZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OZjTDTLV; 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 n6si2771114edb.575.2020.12.04.03.43.44; Fri, 04 Dec 2020 03:44:07 -0800 (PST) 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=OZjTDTLV; 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 S1730025AbgLDLjF (ORCPT + 99 others); Fri, 4 Dec 2020 06:39:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727385AbgLDLjE (ORCPT ); Fri, 4 Dec 2020 06:39:04 -0500 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69726C061A52; Fri, 4 Dec 2020 03:38:24 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id g185so6733678wmf.3; Fri, 04 Dec 2020 03:38:24 -0800 (PST) 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=WgsTtVr/b1JNUa2uSYC+bnyuIfDmWDZgY06jl/btiUM=; b=OZjTDTLVXvWC3i4bqtbKHDxkCNeLgfToMm3x5guLX875tE+QWIbiVjiqR6c/FlxCUv n2iyMhsxRz2B9QfDtWScNj4mr1NkgbC/VDsiVK/hztmytyEi6VVlk0W/wGKy2spOopTw wiXqOuy8wQkwmY+e19pvbXRKcDJRziBgtAr8UVW16E7PREQJ6PnZUYRbNgS4kN8VXPAT 8fbORoyg7ytq6aGLmkDOR9YJ1PoGKIXk1gvl4Y91Vfm2mpRvUHw/N4Xl/S4EZZpoIlQb 6dFeV5oHbi5RliQtVDq1LlNqLIoaShGGIgxEHRzVsksSx1nsUqgfiE8rG1Q2qKG6x/QT PKkQ== 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=WgsTtVr/b1JNUa2uSYC+bnyuIfDmWDZgY06jl/btiUM=; b=blFcllYWTuqxJRJfJ3TJhOIBn9at8MOJV/+cksUdRu6F+dmsKD/pTXzgqwtZIRE+MM xdkz2X2+KLfBWNYrptjG/GRAbKgJO3xRYLPsQoil5Sx1HEmWbSwMermmScTEsMk3DtDZ jzrXjUxLihlwYQXbDTX/+Sqbbf0WfXaA0Nkzig42a8mREAKKOjauyMq/ks3JTYKep3SX JC5EJe2HHDZwJufBySo1JR1n0+5fw9MDJeroopyTqFf4JCnOibWQ9FgvuE1eROpoSaCq 88gNSzQ80rizTpw43Y31NWGFP4770aj2jGt5BrYu4WX+WhqU1TXU6n1Zhx1BjpWDO0tU De/Q== X-Gm-Message-State: AOAM532y+yrb423czYjQgcy73tuWgFIQYnjtoiUjQdHdL6OLdhNpsdXA rC1IMa6mR5bEfWuOV/xveHE= X-Received: by 2002:a1c:6689:: with SMTP id a131mr3690871wmc.33.1607081903158; Fri, 04 Dec 2020 03:38:23 -0800 (PST) Received: from smtp.gmail.com (a95-92-181-29.cpe.netcabo.pt. [95.92.181.29]) by smtp.gmail.com with ESMTPSA id b18sm3413815wrt.54.2020.12.04.03.38.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2020 03:38:22 -0800 (PST) Date: Fri, 4 Dec 2020 08:38:16 -0300 From: Melissa Wen To: Daniel Vetter Cc: Sumera Priyadarsini , Haneen Mohammed , Rodrigo Siqueira , Dave Airlie , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , Jonathan Corbet , dri-devel , Linux Doc Mailing List , Linux Kernel Mailing List Subject: Re: [PATCH] drm/vkms: Add setup and testing information Message-ID: <20201204113816.ec7wfqrzyello7wd@smtp.gmail.com> References: <20201203191339.u5hfwy6ycrrzeb3z@adolin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sumera, Thanks for the doc improvements. Please see some complimentary comments below. On 12/03, Daniel Vetter wrote: > On Thu, Dec 3, 2020 at 8:13 PM Sumera Priyadarsini > wrote: > > > > Update the vkms documentation to contain steps to: > > > > - setup the vkms driver > > - run tests using igt > > > > Signed-off-by: Sumera Priyadarsini > > --- > > Documentation/gpu/vkms.rst | 47 ++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 47 insertions(+) > > > > diff --git a/Documentation/gpu/vkms.rst b/Documentation/gpu/vkms.rst > > index 13bab1d93bb3..d6782174d23f 100644 > > --- a/Documentation/gpu/vkms.rst > > +++ b/Documentation/gpu/vkms.rst > > @@ -7,6 +7,53 @@ > > .. kernel-doc:: drivers/gpu/drm/vkms/vkms_drv.c > > :doc: vkms (Virtual Kernel Modesetting) > > > > +SETUP > > Absolute bikeshed, but we generally stick to titlecase for titles, so > just "Setup" and "Testing with IGT". > > +===== > > + > > +The VKMS driver can be setup with the following steps: > > + > > +To check if VKMS is loaded, run:: > > + > > + lsmod | grep vkms > > + > > +This should list the VKMS driver. If no output is obtained, then > > +you need to enable and/or load the VKMS driver. > > +Ensure that the VKMS driver has been set as a loadable module in your > > +kernel config file. The following line should be present in the .config > > +file in your kernel root:: > > + > > + CONFIG_DRM_VKMS=m > > + Considering the target audience, I would make it clearer to explore the configuration options using "make *config". As in https://kernelnewbies.org/FirstKernelPatch#Recompiling_the_driver > > +Compile and build the kernel for the changes to get reflected. > > +If your existing config already has VKMS available as a loadable module, > > +then there is no need to build the kernel again. > > +Now, to load the driver, use:: > > + > > + sudo modprobe vkms > > + > > +On running the lsmod command now, the VKMS driver will appear listed. > > +You can also observe the driver being loaded in the dmesg logs. > > + > > +To disable the driver, use :: s/disable/unload/ > > + > > + sudo modprobe -r vkms > > + > > +TESTING WITH IGT > > +================ > > + > > +The IGT GPU Tools is a test suite used specifically for debugging and > > +development of the DRM drivers. > > +The IGT Tools can be installed from > > +`here `_ . > > +Once you have installed IGT, you can run tests using:: > > + > > + ./scripts/run-tests.sh -t > > + > > +For example, to test the functionality of the igt_draw library, > > +we can run the kms_draw_crc test:: > > + > > + ./scripts/run-tests.sh -t kms_draw_crc > > If we run igt tests directly, there's an option to select the right > device. This is important if you have more than one gpu driver > (usually the case if you run this directly, but even on virtual > machines there should usually be a drm driver around). E.g. when I > run a test directly: > > # tests/kms_flip --device drm:/dev/dri/card0 > > I'm not sure whether there's an option that's always going to select > the vkms device. I'm also not sure you can pass these options to > run-tests.sh, I kinda don't use that one myself ... I also run a test directly. Some cases have many subtests, therefore I can pass --run-subtest to specify one. And, to select vkms, I use IGT_FORCE_DRIVER. For example: # IGT_FORCE_DRIVER=vkms tests/kms_flip --run-subtest basic-plain-flip > > Aside from that looks all good to me. +1 Melissa > -Daniel > > > + > > TODO > > ==== > > > > -- > > 2.25.1 > > > > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch