Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3901614pxu; Wed, 9 Dec 2020 03:37:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIaJYKuW97X+NW6o9Q0A1OhvlBM0rAslyTBO/o63FSh7jiiUw/0xsDe5dzMY/ncOpttpBV X-Received: by 2002:a17:906:13da:: with SMTP id g26mr1649367ejc.285.1607513856683; Wed, 09 Dec 2020 03:37:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607513856; cv=none; d=google.com; s=arc-20160816; b=it0b2LhACjSKqwz1vdg1rG8Jg3+YMOeRwwK1NQYACZj4F8cPp3HJPswDN59q26hJCs D79LWDumHEZ4Lgf5UTU9PKL58/SS+Hsyl/m0HiI0cYZEaUZic1Gwn8gOvcE+P50USGIN qDsiwGsFghKTUrPG+cVhh83S1cyBxzfMiUzYhBKx7/otTzbyrzruVS/eHfyRRztsLMoC dNafTRqxsKMHs1oF8cw7aMrYgVONlU5cgyZ3lAzBfjnBhdzjid/QKzhKmBRN6N20BKim 2LCZuAyerkdGNTyj1ryyP7/Kp2MvpIhQtwFW3XekgaSPQLJiuFCPh49+Py5o2yKjL7jH AKtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=nes0rcZuTwmOxtwOikKB2O8R1AmvIbu+0dxh8W69ZI4=; b=YltH2saQd/3Usj0vyJy24qSCHjeLhobhiSssh8P+NKSv18NiC5qhNnXCAjCNcgOVqa aKdBTRXpKaXh/XlCWtcZlcZ0dv7DSCFJeLPJb/prG3IMqCDyWhNQNOYXH6E7oiqbs4De 9PVrzrYvbb1kXYtKP7n+k/4mDrgTIRf7s58Rz/mZzVtkHI1oNJwKE5tPknamjaJ5W5qS BgJrUKTsz/it/MTqE9bOWJL5ggCX/I+kan32AcJ5n38h3TDRVGAgfSUUFHdR1A4gj6/j 1NLQVp3mVNS8pr6lw1CZaG9SwG8n5YJ14Xg1fv0cj4WfMnr/4q7N7dWO5L6rLV1L2TbO c6mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G7cBFz8V; 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 hs21si654846ejc.395.2020.12.09.03.37.13; Wed, 09 Dec 2020 03:37:36 -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=G7cBFz8V; 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 S1730497AbgLILee (ORCPT + 99 others); Wed, 9 Dec 2020 06:34:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727970AbgLILee (ORCPT ); Wed, 9 Dec 2020 06:34:34 -0500 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C3AAC0613CF; Wed, 9 Dec 2020 03:33:54 -0800 (PST) Received: by mail-pl1-x644.google.com with SMTP id u4so766698plr.12; Wed, 09 Dec 2020 03:33:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=nes0rcZuTwmOxtwOikKB2O8R1AmvIbu+0dxh8W69ZI4=; b=G7cBFz8V5bYKV/tYPiKBAf7ZuEueNDSI9R2RSC0QmUtnucEhxcU7hhSDzkuND627RA j9Us9+dJHv670BVlglnG6W88jVqDqj+oV0d3i7hRkVtOOEjlWlbHipTEBozyMRJWGx2X SEUerN1AhgMR9uOVgHgG7UAGmfQozfpzQEi5JFnQLp8B69UgGZ5X0r64m1+HFwHnYeN5 yLZxtzpgCqrb4mzT7HezYZHW3u7NqQROhvI/q5V9Ah64t0Yot9rb7sFaZQ7yvo0sI3Fa PGn9kSm8wAMtvoKlPUkltL3GxsZkLx00Ufp9WA2Tms7wwO2LlV4ZydaKriNUlhvv5pyk 9e5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=nes0rcZuTwmOxtwOikKB2O8R1AmvIbu+0dxh8W69ZI4=; b=j3kRH3KNPvYE+CCUHzeU/9NfqQJosHg6M4OUNRplKyhrCZIgnujglUvH5+WwSsR+Gn XhZsenbLYnTcRIVcGCeIxASmMIJo4IkxpIyXFqllP1CnFD2apQ6qNwj2utF4kAZMSP6x UjPpZJINOkXsfC5ABf1/QrIrG84lcXsNPDnrOPirJOhmb3bp7qGj8c6ATLvvG1HA3N0+ 3SEde+gm4TWlUIYFh613E0D6LMxsUtgZzFi/livU35Uuv+M3v2Mp37EFtmVWEI7GwBRi QbW05Y/RumF3mJEwYd4vmycPY3B2pRK1F/DtT3088L7qiTRpwYx4yu8elMIFLS3IXl0n +WhA== X-Gm-Message-State: AOAM530fQb+tBiBN1VTFZGh4KPteZaYXRTNWUbUVNKcEBiGhtzrYjQ54 4U6f0ELXDrpg7fFxYo+Xn3RtfaHOeTVUrnv+iBo= X-Received: by 2002:a17:902:ee11:b029:db:c0d6:581a with SMTP id z17-20020a170902ee11b02900dbc0d6581amr1631361plb.54.1607513633716; Wed, 09 Dec 2020 03:33:53 -0800 (PST) MIME-Version: 1.0 References: <20201208203735.ukqrgjmlntbvxc7e@adolin> <20201209005408.GP401619@phenom.ffwll.local> In-Reply-To: <20201209005408.GP401619@phenom.ffwll.local> From: Sumera Priyadarsini Date: Wed, 9 Dec 2020 17:03:42 +0530 Message-ID: Subject: Re: [PATCH V2] drm/vkms: Add setup and testing information To: Sumera Priyadarsini , Melissa Wen , hamohammed.sa@gmail.com, rodrigosiqueiramelo@gmail.com, David Airlie , 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 Content-Type: multipart/mixed; boundary="0000000000001c25d105b6066f37" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --0000000000001c25d105b6066f37 Content-Type: text/plain; charset="UTF-8" On Wed, Dec 9, 2020 at 6:24 AM Daniel Vetter wrote: > > On Wed, Dec 09, 2020 at 02:07:35AM +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) > > --- > > Documentation/gpu/vkms.rst | 67 ++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 67 insertions(+) > > > > diff --git a/Documentation/gpu/vkms.rst b/Documentation/gpu/vkms.rst > > index 13bab1d93bb3..d6739fbbe503 100644 > > --- a/Documentation/gpu/vkms.rst > > +++ b/Documentation/gpu/vkms.rst > > @@ -7,6 +7,73 @@ > > .. 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:: > > + > > + sudo ./build/tests/ --device "sys:/sys/devices/platform/vkms" > > + sudo IGT_DEVICE="sys:/sys/devices/platform/vkms" ./build/tests/ > > + > > +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 > > + > > +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 > > Does IGT_DEVICE also work with run-tests.sh? Aside from my curious > question, patch looks good to me, thanks a lot. Good catch, it does. Melissa, IGT_FORCE_DRIVER also works. I think I was used test/kms_flip earlier instead of ./build/test/kms_flip hence the fluke. Should I add these also to the docs, was wondering if it will get too confusing.... > > Reviewed-by: Daniel Vetter > > > + > > TODO > > ==== > > > > -- > > 2.25.1 > > > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch --0000000000001c25d105b6066f37 Content-Type: text/markdown; charset="US-ASCII"; name="withruntest.md" Content-Disposition: attachment; filename="withruntest.md" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kihc3ewc0 YHN1ZG8gSUdUX0RFVklDRT0ic3lzOi9zeXMvZGV2aWNlcy9wbGF0Zm9ybS92a21zIiAuL3Njcmlw dHMvcnVuLXRlc3RzLnNoIC10IGttc193cml0ZWJhY2tgCgpbOTQ0NS4zMTc5OTNdIFsxLzRdIGtt c193cml0ZWJhY2sgKHdyaXRlYmFjay1waXhlbC1mb3JtYXRzKQpbOTQ0NS42MjM0OTldIFsyLzRd IGttc193cml0ZWJhY2sgKHdyaXRlYmFjay1pbnZhbGlkLXBhcmFtZXRlcnMpCls5NDQ3LjA3NjI2 M10gWzMvNF0ga21zX3dyaXRlYmFjayAod3JpdGViYWNrLWZiLWlkKQpbOTQ0Ny4zNzE0MDJdIFs0 LzRdIGttc193cml0ZWJhY2sgKHdyaXRlYmFjay1jaGVjay1vdXRwdXQpCkRvbmUuCgoKCmBzdWRv IElHVF9ERVZJQ0U9InN5czovc3lzL2RldmljZXMvcGxhdGZvcm0vdmttcyIgLi9idWlsZC90ZXN0 cy9rbXNfd3JpdGViYWNrYAoKSUdULVZlcnNpb246IDEuMjUtZ2MzNmY3OTczICh4ODZfNjQpIChM aW51eDogNS4xMC4wLXJjMmRybXN1bW8rIHg4Nl82NCkKU3RhcnRpbmcgc3VidGVzdDogd3JpdGVi YWNrLXBpeGVsLWZvcm1hdHMKU3VidGVzdCB3cml0ZWJhY2stcGl4ZWwtZm9ybWF0czogU1VDQ0VT UyAoMC4wMDBzKQpTdGFydGluZyBzdWJ0ZXN0OiB3cml0ZWJhY2staW52YWxpZC1wYXJhbWV0ZXJz ClN1YnRlc3Qgd3JpdGViYWNrLWlud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