Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp360572pxb; Sat, 10 Apr 2021 05:23:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTXd4mAA+nt2K0+6dq73MvRdkJ/X2tpLj/U+w4X3KCfEQ63OhSEsb5kPUTQavjHAb6pee0 X-Received: by 2002:a17:902:dac4:b029:e6:b39f:7ee2 with SMTP id q4-20020a170902dac4b02900e6b39f7ee2mr17453288plx.85.1618057392898; Sat, 10 Apr 2021 05:23:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618057392; cv=none; d=google.com; s=arc-20160816; b=gKwQ7AuFsLNEU3iNveeAq+fRCWoIfBtipBtUb9yCDm6tgtZqNa3FaHgU6iUA/623Mr Hda1CCwnD/V2LDFLo4FziOdqMhbDg+E8u5hsRTLa6YCCTpjYeaWYkodtC3mOWQOfopuf L7d6Ke7ekA5VcrN/mxgKxYkqPipGs6WmY8x5343Pde4cLL8j3udwgyP8yn7ptWQaG1kB aU9ML4zIKuuLAjqe3OGpS/oA2YnR/9973jt8xWhkldqkgx55OwFPJicgdFVGyy1xyp9b PEKRMpE43UsogvZnOXCzBNx5h0AXGdEqfiaKisV5WDdnVVa8Rt2oCsYw9+ikupo45s3h X2cw== 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=j1DeY1I2aLclFr3MrMe936qBKfvRMzQn/up+0QGkwrw=; b=rEM9lKN2tElqTsNPGPL0XiYwlcDyFT10S2cUwyTKSSeepCB9Q/AwconnvKMFz8J5Q0 cpngV9CzMicLvpb2L+HO9IPvzK9CxqVsP+/WxP8l4qjm06VtRhX+Uy4NBhSD0WTjEy1L CnpepVR0skfZmTVBmgNjHe6VmUNG1fryTQYBR629R1jrDZFaeeQutQdn3tEbxZ24UFV8 KVRq9X9ymX3NBrJW6y5CgYd87foTI4f1yMs7qzcvaedHjWIHLWgEYSnXo69NSwHrB3PM /mJp7TmaFA4d7FCm2ZmHFRsDSmb7jaFpSwiP7ZYEaMCFn2ejBCxYxedDDr9CwDC1Zbuh Zm6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=N9ph+I8k; 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 q4si6151375pfj.237.2021.04.10.05.23.00; Sat, 10 Apr 2021 05:23:12 -0700 (PDT) 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=N9ph+I8k; 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 S234376AbhDJMWB (ORCPT + 99 others); Sat, 10 Apr 2021 08:22:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234091AbhDJMV7 (ORCPT ); Sat, 10 Apr 2021 08:21:59 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 311CBC061762 for ; Sat, 10 Apr 2021 05:21:45 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id d11so4265075wro.13 for ; Sat, 10 Apr 2021 05:21:45 -0700 (PDT) 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=j1DeY1I2aLclFr3MrMe936qBKfvRMzQn/up+0QGkwrw=; b=N9ph+I8koHgubaoJUVsrzMI9F+xy20Q0HyC0VsAzI8aj7DuR/gzYj++RtPW1GX5jg1 Ij3+foOPGPavDGrWnUL5bnMW2plKmCB7PWfGUUJWGODY86E6PQyb3p7Uu57SfrLyXbV5 VWVMr4n8xszs2ntdvQKOOD91enu4XP5qXGMe+SHBCUSFUKnnFAQ96mQkQCoYMfLDefMY bDnTlgVnqrFqr9fCCcS9jlCshqlOkaTSgmMVohhRmyVCT/G4dzjid2egG2l9vOhAOOC7 5aBvSq+vtAH4QyT9nNXYR03M7qE3d1ZwKY3GWM1pSGcgx9jugHR6ngWGmeCKq/bu09n9 epcg== 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=j1DeY1I2aLclFr3MrMe936qBKfvRMzQn/up+0QGkwrw=; b=sAMTPSrek0PCfxNIGXTauW+zQbUs92E7pkJ13OWJBpWIJM5YSO57uQc5MB0AbwbBlW X1MQr9NHFIH9Pt+EV8xfwn0CaIeXNH9H6i+d9UCJDKHVeSeaKzNbBPSei2pul/bUhtH5 zzHAad3zHkn4kEAwDII0M7wamsAPK2bdCYHCJ/3Xw7th9rgDDS04o/ks0t/sm5OFSLqx Uayhfb96G5uSc/jrTxTbsFMS3CztdN2uhLIca8uigP4Zq/gxNsTeVHMLXvLAQ4XqHZ4D x8nzmetvkk8RMVgc7aJM9M2ELWHcex1mZ2jNpBkB8dDRkzjh43RN5Cmobp2UlTUTnpiL qRyQ== X-Gm-Message-State: AOAM530EgeE8u2c9Q2lBEbsGv802oayxKqF8rpQJmteTsNe5OI+I40Nf ZweQ9nNVaBvV576MmbTfKDQ= X-Received: by 2002:adf:d1cd:: with SMTP id b13mr22027021wrd.47.1618057303744; Sat, 10 Apr 2021 05:21:43 -0700 (PDT) Received: from smtp.gmail.com (a95-92-181-29.cpe.netcabo.pt. [95.92.181.29]) by smtp.gmail.com with ESMTPSA id o14sm8023476wrc.3.2021.04.10.05.21.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Apr 2021 05:21:43 -0700 (PDT) Date: Sat, 10 Apr 2021 09:21:34 -0300 From: Melissa Wen To: Pekka Paalanen Cc: Sumera Priyadarsini , hamohammed.sa@gmail.com, rodrigosiqueiramelo@gmail.com, airlied@linux.ie, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH V4 0/2] Add virtual hardware module Message-ID: <20210410122134.7dlbadm5blkm32zg@smtp.gmail.com> References: <20210407101258.72261c5d@eldfell> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210407101258.72261c5d@eldfell> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/07, Pekka Paalanen wrote: > On Mon, 5 Apr 2021 11:41:50 +0530 > Sumera Priyadarsini wrote: > > > This patchset adds support for emulating virtual hardware with VKMS. > > The virtual hardware mode can be enabled by using the following command > > while loading the module: > > sudo modprobe vkms enable_virtual_hw=1 > > Hi, > > every time I see this cover letter subject, I start wondering "what is > this virtual hardware module, yet another one?" and then I read the > cover letter and realise it is about adding an option to VKMS. > > The next time you revise this series, could you perhaps clarify the > subject? +1 > > The idea of having a mode where VKMS behaves like a virtual hardware > driver is good, IMO. I do think "vblank-less mode" describes it better > though, because I would assume things like USB display drivers to work > like this too, and VKMS is already a virtual driver anyway. > > To clarify, as a userspace programmer what I would expect "vblank-less > mode" to be is that the DRM driver completes pageflips and modesets at > arbitrary times, perhaps always immediately or perhaps with a variable > delay that depends on how much processing is needed for the update. > Also vblank events do not fire and vblank counters do not advance. Is > this correct? > yes. And I think this description should be clear in both the cover letter and also the commit message of the patch that add the module option to vkms. > > Thanks, > pq > > > > > The first patch is prep work for adding virtual_hw mode and refactors > > the plane composition in vkms by adding a helper function vkms_composer_common() > > which can be used for both vblank mode and virtual mode. > > > > The second patch adds virtual hardware support as a module option. It > > adds new atomic helper functions for the virtual mode > > and modifies the existing atomic helpers for usage by the vblank mode > > This gives us two sets of drm_crtc_helper_funcs struct for both modes, > > making the code flow cleaner and easier to debug. > > > > This patchset has been tested with the igt tests- kms_writeback, kms_atomic, > > kms_lease, kms_flip, kms_pipe_get_crc and preserves results except for > > subtests related to crc reads and skips tests that rely on vertical > > blanking. This patchset must be tested after incorporating the > > igt-tests patch: https://lists.freedesktop.org/archives/igt-dev/2021-February/029355.html Sumera, Thanks for your patches. In addition to Pekka's comments, consider what I comment in each patch of the series for a next version. Best regards, Melissa > > > > Sumera Priyadarsini (2): > > drm/vkms: Refactor vkms_composer_worker() to prep for virtual_hw mode > > drm/vkms: Add support for virtual hardware mode > > > > drivers/gpu/drm/vkms/vkms_composer.c | 88 +++++++++++++++++----------- > > drivers/gpu/drm/vkms/vkms_crtc.c | 51 +++++++++++----- > > drivers/gpu/drm/vkms/vkms_drv.c | 18 ++++-- > > drivers/gpu/drm/vkms/vkms_drv.h | 4 ++ > > 4 files changed, 109 insertions(+), 52 deletions(-) > > >