From patchwork Wed Dec 9 19:04:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumera Priyadarsini X-Patchwork-Id: 11962143 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29AAFC433FE for ; Wed, 9 Dec 2020 19:05:05 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 944CE233F8 for ; Wed, 9 Dec 2020 19:05:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 944CE233F8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C6676E1BC; Wed, 9 Dec 2020 19:05:03 +0000 (UTC) Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by gabe.freedesktop.org (Postfix) with ESMTPS id AA2836E188 for ; Wed, 9 Dec 2020 19:05:00 +0000 (UTC) Received: by mail-pl1-x644.google.com with SMTP id g20so612053plo.2 for ; Wed, 09 Dec 2020 11:05:00 -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:mime-version:content-disposition; bh=/UsojO3YT4ojgGWZWe9AgdTF40UliX8euFAjdhHI+5E=; b=D548r6tfjRjuqddyZqi6fpDGFfJXK5WSIO8Ho5JrZxdYuYRITJ+sRRWwNqN3IUalMq rmtgctzQ3zUpEv7Wc38JbJfD9xNy64wqd6UkGHOa0nJ8qu4Nanz6oAllOcvWjOJ5/e1z p8tRiEuqY6EGV+1AZaT78ZX/AHDess2iD6mo0PJa6wb36pcA5Zv2/gNZvLKxJYf5lHnn c1Q+VZGJtercgP3c2Sl3bWSSzfwCEOExRjDsEXoHUqtmxhGQcbGcmYxXCa3LhxxJ117u VUUmBiiOaCZUTdO29sNKlzdHIayKqtdIgd/i+txlYmADMT8RzpcwtYjtjstnyjzwdcOt mbWA== 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:mime-version :content-disposition; bh=/UsojO3YT4ojgGWZWe9AgdTF40UliX8euFAjdhHI+5E=; b=mdZwR/d0MK6ZnkJJZrCH7JpMrJFi1CikOE1b0UDTyJ/xm/sn+DifucYbdmuCHm3JgQ X0ekMwI0/B54izfmOaaw2iWBDpW0VrCSprGEpf7P4Vk21S0rhvf18sJlH2xDBuoosMO4 4Z15HCu1pJXkKqpHYbb9g8aEUNTMXAEXCtykTvkYMEEpX9c5AfUYD+bVSt59UF6HDryz pMxmrDmBFPA7BlhRCBuRrnDSozdN69/XTUQk4yjXeMWwhk/8RnJMP4iJxKVXRV/CNFoy kJBYf9Fmk6np0BQ7NcgxPhpG+4kyzeuipxRFySz5Lxl7b8vp1zz2bn4SDb0tRRvsuj0D vZeA== X-Gm-Message-State: AOAM532pGKWAdT+fFlVa3XDW8ih9VURavpOXlGFCkYaTqY0eQdISmKWv znQlf7Czy5eVoa7KxSAK2wg= X-Google-Smtp-Source: ABdhPJynKIt47cLvQOMnEdiyWNtUNdbLfIaDC7GfpGEwNNwF7mRz6z1XwWljvTc8ahnUQTGmtPnFjw== X-Received: by 2002:a17:902:b582:b029:d6:6008:264d with SMTP id a2-20020a170902b582b02900d66008264dmr3494207pls.80.1607540700315; Wed, 09 Dec 2020 11:05:00 -0800 (PST) Received: from adolin ([49.207.194.238]) by smtp.gmail.com with ESMTPSA id g16sm3177829pfb.201.2020.12.09.11.04.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Dec 2020 11:04:59 -0800 (PST) Date: Thu, 10 Dec 2020 00:34:53 +0530 From: Sumera Priyadarsini To: melissa.srw@gmail.com Subject: [PATCH v3] drm/vkms: Add setup and testing information Message-ID: <20201209190453.c6kp5winikr55n3i@adolin> MIME-Version: 1.0 Content-Disposition: inline X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hamohammed.sa@gmail.com, tzimmermann@suse.de, rodrigosiqueiramelo@gmail.com, corbet@lwn.net, airlied@linux.ie, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Update the vkms documentation to contain steps to: - setup the vkms driver - run tests using igt Signed-off-by: Sumera Priyadarsini Reviewed-by: Daniel Vetter 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 ====