Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3912693pxu; Wed, 9 Dec 2020 03:58:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmWktV9XP5Ip86a7CnAxCHRSlRufdK3z5K3RV+7uSDf2TeMXNF5hIob/ZVscUG3r+uzCeZ X-Received: by 2002:a17:906:3813:: with SMTP id v19mr1753881ejc.462.1607515121993; Wed, 09 Dec 2020 03:58:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607515121; cv=none; d=google.com; s=arc-20160816; b=zGmEtSgbF7OYD7aegqbConmr2XZw91geBGCbSUY5imdeKJUMavPCaJLBAIQkp9qpYZ Ro8BHmutELX0G2Zx2FpWe5qmTahFWsnMw/oDqVv1DPtXiKRvNlZEEfsBMhaDtvpap6wu uOKwYAzZ5fkuV296HTkSZKHNj9IApfElDOJnCf+OXS3prvZjkDYdznbnJqXQFv0QuyNR e4WBnKe3vHN71CLs2XFSw/sP8A8iMmahDSViD38gbtQ3e2PcGWMRehJ1CbnfvEFlLbPF 7oFZTyRPvOwmfcc5KM9H57llfXMVxtEP/CQyqprrU6TBsZKNmT64CwVALOvRJFAuZljd az1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=6K9mAP1Beqp+70UsfH1hWBqgYfQ6/jJCVxMp4Od9dXQ=; b=QCYpTckE7yWsEqJUsarPo6NtC8KjDTtz5HGKkOMAyrEX1+m3q2F5EyCzL1ebZzrjFT hi20XBNuaVtqYUMs826lxR+4eernWiuEZyu8VhrSbg95GamkopHCUsGQDSsShgPzjK6G r7FThMTnMTUiJE9Co8jvtCnlxhkTH3to8vhsSqUTjCHN7q6Pce0elRCMiqTyCIkK4Ggq cvFkMT9jtSR3Hkzh08BEHtuUDNBEDoJTm2MVgRw+q2+pkOCjEBfLaZx7h6/LDpcG0bMy 8HtnMJ9J3boe0pyNnCzi9sQwD4wuQJlSri1tcchCZzJYK90Kc6c9U1e2roU0EANm2X3w vuBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=WKdOiNEf; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t19si631074eji.402.2020.12.09.03.58.19; Wed, 09 Dec 2020 03:58:41 -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=@ffwll.ch header.s=google header.b=WKdOiNEf; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730962AbgLILyr (ORCPT + 99 others); Wed, 9 Dec 2020 06:54:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729260AbgLILyq (ORCPT ); Wed, 9 Dec 2020 06:54:46 -0500 Received: from mail-ot1-x341.google.com (mail-ot1-x341.google.com [IPv6:2607:f8b0:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84E91C0613CF for ; Wed, 9 Dec 2020 03:54:05 -0800 (PST) Received: by mail-ot1-x341.google.com with SMTP id d8so1050094otq.6 for ; Wed, 09 Dec 2020 03:54:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6K9mAP1Beqp+70UsfH1hWBqgYfQ6/jJCVxMp4Od9dXQ=; b=WKdOiNEfE025+NhMJCC590FBPhDDL1gRy0WjSNyvkYadzIexHP3ThUxvECLe1OuNFR gv8Stf1j5kWZLMbSVAWg3172rw0MOhLjpV6nkIjUZyiPnEz1MgvmkPV9P5VjzHgzLmis yhDvxljzamNcH+ChzOkE0EUK1i16q+nl7nWgQ= 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:cc; bh=6K9mAP1Beqp+70UsfH1hWBqgYfQ6/jJCVxMp4Od9dXQ=; b=e4G/aN3RgfWMkVFpz12nxv+H2e/dNxhyNPwNTELFicX+Lu+UxJCPnBQdZ289Uos7nw JC2P8RRA2n/ZJHq+1mqGpSEZge7Q8ctu3qLvEWzZfVTTiuqvgb6VMWru3+wOhChpAtXK NoA9hbd3JWjFIKuos6wpVPpVu6IrVTZTinzVTvBW/m2roW35BESWw85Od/UZlhN9bGxl HxMO6yqePZ2cUfzlYTe0Blr/Vxb6ehoA2MydRNTnsYJKYKWHY9vcabd3QYK4CgDII/1w Dhna9CHCr2CBA+NNr8yhqkQfMVAUbpwyrDjSU/7Z7LwakM4DXMrK0Y+Zv5M8s8pWp8hH wF/A== X-Gm-Message-State: AOAM530h6n1CtN88mEiFlLBaZGVs1/CToOKT8ZYYXE5guZjmOFX6LDzw s8G6hOvi11ju/PtF7m+YbMUQhxDcudjY4I0/Rci9UQ== X-Received: by 2002:a9d:470f:: with SMTP id a15mr1324186otf.303.1607514844917; Wed, 09 Dec 2020 03:54:04 -0800 (PST) MIME-Version: 1.0 References: <20201208203735.ukqrgjmlntbvxc7e@adolin> <20201209005408.GP401619@phenom.ffwll.local> In-Reply-To: From: Daniel Vetter Date: Wed, 9 Dec 2020 12:53:53 +0100 Message-ID: Subject: Re: [PATCH V2] drm/vkms: Add setup and testing information To: Sumera Priyadarsini Cc: Melissa Wen , Haneen Mohammed , Rodrigo Siqueira , David Airlie , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , Jonathan Corbet , dri-devel , Linux Doc Mailing List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 9, 2020 at 12:33 PM Sumera Priyadarsini wrote: > > 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.... I think IGT_FORCE_DRIVER is deprecated, so better not to mention that. IGT_DEVICE and --device are the new thing. I think just adding a sentence that IGT_DEVICE also works with the run-tests scripts would be good perhaps. -Daniel > > > > > Reviewed-by: Daniel Vetter > > > > > + > > > TODO > > > ==== > > > > > > -- > > > 2.25.1 > > > > > > > -- > > Daniel Vetter > > Software Engineer, Intel Corporation > > http://blog.ffwll.ch > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch