Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D440EC64ED8 for ; Mon, 27 Feb 2023 15:40:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229800AbjB0Pk0 (ORCPT ); Mon, 27 Feb 2023 10:40:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229698AbjB0PkY (ORCPT ); Mon, 27 Feb 2023 10:40:24 -0500 Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45B861E5FB for ; Mon, 27 Feb 2023 07:40:23 -0800 (PST) Received: by mail-oi1-x235.google.com with SMTP id r40so4472049oiw.0 for ; Mon, 27 Feb 2023 07:40:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=CyTB/8yjHEGeVb5eYubYQqNDzW1fdOoIcMGH96ABpv4=; b=oI9zcZYjxrQqI5sYOaUtqe/5zhMZErmABdHSldC6FrXKdAHLIc51dMDe5gV3uHW+Sj WduVlXX2H1y0qnMrwVnxVOL79HAsX+q/8PqyZmSxC3+q7tzpSAdM6VvzBN8SwQ1x7DMV IYzXTUyH7EroFrtoQC45sSNzp7yFQDODcKIMPCKQMKXnkZtC3eohfaP5y3+hME4QLIUA zx9gWufCFU8QRWqia6+SjTJSW+nLIgw2Z164GAbcHI3Q9e1UmOTnGU1/R86td0RUWYe8 yFfrdDSXHf/vtV5Q2HbH0bMJ0ssqfaOizzn0u6O7K12fvzRYES8no82mhajBy8V7g6gC oYCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CyTB/8yjHEGeVb5eYubYQqNDzW1fdOoIcMGH96ABpv4=; b=NOBYb+izfeMo47YSjyjiyHq1XDjbsCc002GRs0L+4YXPwGAXDHMXdaOGceWFqsuxlX tSLni2KVPxDWMqZFf5Z445t1GwSx3TxWaFANF8X7FVDRuv/z672OGTVbjnuGFUxNrYmx f255FPpVNfD2Qpva+Q1spIZB/kSzrsnFAEJJ0uTx0MX3biO2SHBMyPUf2TbeKNeaw9dy BpY3m1UTgNSoXtpqXFPC+v2OGKQghH8s00VEXSYq1uCVAtMmQ3n0KcgoPIW6ZXZXO9XE FhQJo73sHMpDWWsD4PM/eCZWr2LEQTN9HN7Xw/b99VJYl2wx7xXY95dxuojklHcD9Dqm Eznw== X-Gm-Message-State: AO0yUKViHuDoz5zMi6Pxc2MOXlRn5WI8XLzdH9HS16IrOO02lMVpQ09W 9q7CQiR7+D7ca77hEnFGMo08GAi/GAKHunB9ibM= X-Google-Smtp-Source: AK7set+WPiN+PMC33D7dGKvMOq4tjpD5BANv/fOXy/omKUC1JZ4GUk6hlHvST2Ba9zIlMFuhIdoN5PtweesP99tGF+U= X-Received: by 2002:a05:6808:486:b0:384:23ed:1ff6 with SMTP id z6-20020a056808048600b0038423ed1ff6mr1448259oid.3.1677512422552; Mon, 27 Feb 2023 07:40:22 -0800 (PST) MIME-Version: 1.0 References: <20230224180225.2477641-1-robdclark@gmail.com> <20230227063821.dg2gbjjwcekbxyzw@sirius.home.kraxel.org> In-Reply-To: <20230227063821.dg2gbjjwcekbxyzw@sirius.home.kraxel.org> From: Rob Clark Date: Mon, 27 Feb 2023 07:40:11 -0800 Message-ID: Subject: Re: [PATCH] drm/virtio: Add option to disable KMS support To: Gerd Hoffmann Cc: dri-devel@lists.freedesktop.org, Chia-I Wu , Ryan Neph , Dmitry Osipenko , Rob Clark , David Airlie , Gurchetan Singh , Daniel Vetter , "open list:VIRTIO GPU DRIVER" , open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 26, 2023 at 10:38 PM Gerd Hoffmann wrote: > > On Fri, Feb 24, 2023 at 10:02:24AM -0800, Rob Clark wrote: > > From: Rob Clark > > > > Add a build option to disable modesetting support. This is useful in > > cases where the guest only needs to use the GPU in a headless mode, or > > (such as in the CrOS usage) window surfaces are proxied to a host > > compositor. > > Why make that a compile time option? There is a config option for the > number of scanouts (aka virtual displays) a device has. Just set that > to zero (and fix the driver to not consider that configuration an > error). The goal is to not advertise DRIVER_MODESET (and DRIVER_ATOMIC).. I guess that could be done based on whether there are any scanouts, but it would mean making the drm_driver struct non-const. And I think it is legitimate to allow the guest to make this choice, regardless of what the host decides to expose, since it is about the ioctl surface area that the guest kernel exposes to guest userspace. BR, -R