Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4721015pxu; Thu, 10 Dec 2020 04:00:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJwzWSS0k2JYAVMxd/Ce2BGLVZDvO/EyJCNVv4s8wbbAlVyHdcBVEeV6HPQdBP43ppXSIv28 X-Received: by 2002:a17:907:b09:: with SMTP id h9mr6174819ejl.155.1607601645138; Thu, 10 Dec 2020 04:00:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607601645; cv=none; d=google.com; s=arc-20160816; b=wC+Wb7fWdZIxPaF4OB8bWkF0GZtiRG1zYPFlWHDy63OPw+TyqtWf9il8wEyad6YcDT ngstooKEaYXPgZlOZaLVcJh0XIkkRyciVjIDsqYscskZpOJ1Zd5vIKx9aezb6k7bCa3Z YvBB/nW+JYjPKbmbmLfgKA/ZmaWJpeT9wsMafGyeMqmM3jzMXfXA+cA9JKt8J/BTkzDY YoGaY+UwBPHpfcwzbgBRyoerBAzI9gM+tQkeWzliCs+79JjIsWnUA4tE14fsBrFkH2l3 d75fRh4sNAS4oFMvWcs4Z9Mejr7T4etW05b2PQAku2CtYgPuYt/dKvRdUxSHZ3C67/8k oUUw== 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:to:from:date:dkim-signature; bh=SFeiWCONYDarnfPLxLW1GxMdDbdLJCJ6938SVXgGsFI=; b=CB4H0Y3Kiz0Gp7H8f8Nt15uxxcnBrV7UBLE8HnE/khCgkt4AY4GJnKn/yqmHZAJNmo 8PXyDwU98oXM4C5t9XgG0VUXsFr5BxQ7i3TAkFlJhX3/aFpengO0odl/k0aoR9jMBLH8 OxTpW0wJEZGA7PDYXzL4autnGOnkedcCfcHPVrVUoXN52SWck9GGCVErMOS8+rnadlMM X2iguL6J+CYhhI4IbtiHliN4wyIvr+9SuODt/IXfQsiNkAuGlKIMKsY8iWhj58GOggsl D0ca6Gz7T7M7mM6ML2ieF4VH7ZakG3P59yh2509uCjNRwo7yWQSPk99QvPeBbn507PT/ 970g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Wow/eRHQ"; 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 g3si2344843ejf.612.2020.12.10.04.00.21; Thu, 10 Dec 2020 04:00:45 -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="Wow/eRHQ"; 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 S1726439AbgLJLNZ (ORCPT + 99 others); Thu, 10 Dec 2020 06:13:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389335AbgLJLNP (ORCPT ); Thu, 10 Dec 2020 06:13:15 -0500 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BE2DC061794; Thu, 10 Dec 2020 03:12:29 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id w5so1298723wrm.11; Thu, 10 Dec 2020 03:12:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=SFeiWCONYDarnfPLxLW1GxMdDbdLJCJ6938SVXgGsFI=; b=Wow/eRHQYpgpieT0j7r5lB7tKLAF3Tt+hJrpqcDSjFfJYz20LQ+diyhM0ZVnoAV9Nz svMA/XHdPDg8QxFV7PEhxcfGReeiEUgPmb6pU1I1ghxf8TC4oO9RX5bxUeyUT62VV2g0 MeA7PgP7E8mVqaNtxIkF0buWLHLP6fzp+U5bmL1E9RpYX20V4VyXERi5UtldErmgtGvV dA8ejSMjV7XL1am3sNk9btBuXWkGKGBKSiji43Y1XMqmrNGgndSZPFyvJjgcfgasHHWL Rlb/zOfsBBsnfG0VU6XfAmWkLV/oUt4TmMgNJtZuBTJ0Rdqro8xMF7XQV3L0YuCIe/yu 7I1g== 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:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=SFeiWCONYDarnfPLxLW1GxMdDbdLJCJ6938SVXgGsFI=; b=Q0wN6Y+tbNbwTuazWTHzPUu5wNys2X34/y31rHEYApeV79pjLI/iDBxORKjUKrXKS6 D5X/G5mws6I+NSNIAxxWixZitnv9/9i1AsaXsBBDlVBmKfOViSJKpURusZOrgcdoi4Hy 049tj8fiPAVncf7qXLvkO1JUgSPG9d9v2R0A0SrwNBG5gWEiWw9UjM5kzK1fjIeoq1Kq nPSQxmq5uCpzjUbHBPVGdSRxFyYILxixbkCahUVWKxHZMxqMBW5ekNru2WUt+z+0d0+a rKnZ3Q6ya0iIJRs+RiNH4CVMfgkwyOgPVRyGtVoJK2HrfdMPQu+xg1Vzofl1oLvykdTK KbYw== X-Gm-Message-State: AOAM532FQYeCvEk1HsuVvpDe/2VHkjXzHFIbqvw/iyA/+lMpwbl1EzbQ 76YKT54kWwp8kzECDkRpJP0= X-Received: by 2002:adf:f146:: with SMTP id y6mr7778814wro.298.1607598748151; Thu, 10 Dec 2020 03:12:28 -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 r2sm8799281wrn.83.2020.12.10.03.12.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Dec 2020 03:12:27 -0800 (PST) Date: Thu, 10 Dec 2020 08:12:21 -0300 From: Melissa Wen To: Sumera Priyadarsini , hamohammed.sa@gmail.com, rodrigosiqueiramelo@gmail.com, airlied@linux.ie, mripard@kernel.org, maarten.lankhorst@linux.intel.com, tzimmermann@suse.de, corbet@lwn.net, dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] drm/vkms: Add setup and testing information Message-ID: <20201210111221.evhku6xjhgxmu4ys@smtp.gmail.com> References: <20201209190453.c6kp5winikr55n3i@adolin> <20201209221711.GC401619@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201209221711.GC401619@phenom.ffwll.local> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/09, Daniel Vetter wrote: > On Thu, Dec 10, 2020 at 12:34:53AM +0530, Sumera Priyadarsini wrote: > > Update the vkms documentation to contain steps to: > > > > - setup the vkms driver > > - run tests using igt > > > > Signed-off-by: Sumera Priyadarsini > > ___ > > Changes in v2: > > - Change heading to title case (Daniel) > > - Add examples to run tests directly (Daniel) > > - Add examples to run subtests (Melissa) > > > > Changes in v3: > > - Add example using run-tests.sh script(Daniel) > > Reviewed-by: Daniel Vetter > Applied to drm-misc-next. Thanks for these improvements, Melissa > > --- > > Documentation/gpu/vkms.rst | 70 ++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 70 insertions(+) > > > > diff --git a/Documentation/gpu/vkms.rst b/Documentation/gpu/vkms.rst > > index 13bab1d93bb3..9e030c74a82e 100644 > > --- a/Documentation/gpu/vkms.rst > > +++ b/Documentation/gpu/vkms.rst > > @@ -7,6 +7,76 @@ > > .. kernel-doc:: drivers/gpu/drm/vkms/vkms_drv.c > > :doc: vkms (Virtual Kernel Modesetting) > > > > +Setup > > +===== > > + > > +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. Do:: > > + > > + make nconfig > > + > > + Go to `Device Drivers> Graphics support` > > + > > + Enable `Virtual KMS (EXPERIMENTAL)` > > + > > +Compile and build the kernel for the changes to get reflected. > > +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 :: > > + > > + 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 `_ . > > + > > +The tests need to be run without a compositor, so you need to switch to text > > +only mode. You can do this by:: > > + > > + sudo systemctl isolate multi-user.target > > + > > +To return to graphical mode, do:: > > + > > + sudo systemctl isolate graphical.target > > + > > +Once you are in text only mode, you can run tests using the --device switch > > +or IGT_DEVICE variable to specify the device filter for the driver we want > > +to test. IGT_DEVICE can also be used with the run-test.sh script to run the > > +tests for a specific driver:: > > + > > + sudo ./build/tests/ --device "sys:/sys/devices/platform/vkms" > > + sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/ > > + sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./scripts/run-tests.sh -t > > + > > +For example, to test the functionality of the writeback library, > > +we can run the kms_writeback test:: > > + > > + sudo ./build/tests/kms_writeback --device "sys:/sys/devices/platform/vkms" > > + sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/kms_writeback > > + sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./scripts/run-tests.sh -t kms_writeback > > + > > +You can also run subtests if you do not want to run the entire test:: > > + > > + sudo ./build/tests/kms_flip --run-subtest basic-plain-flip --device "sys:/sys/devices/platform/vkms" > > + sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/kms_flip --run-subtest basic-plain-flip > > + > > TODO > > ==== > > > > -- > > 2.25.1 > > > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch