Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2160911pxv; Sat, 24 Jul 2021 07:15:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMals9fGKBuPX6ffLHKhFdjCtrhZ41aZRpSW+FWmyNRgt7k0nOSqd53x/7DX9JPSNhD4+c X-Received: by 2002:a92:d44b:: with SMTP id r11mr6984422ilm.217.1627136126373; Sat, 24 Jul 2021 07:15:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627136126; cv=none; d=google.com; s=arc-20160816; b=SOia2dLxBMXVOZsc74G8qPSA2rdqhFQwziSY0x17JZxep4zS6wKc+MFjbGr2LoYsgm F6Wu2x0ZAQv3GAnM+DRx9JkI7LwsDIdhSmbZ5fSWo/+WxNd5HWx5QYceFbA0WHqZ3cMp fyE/rX3jSo1Jr3Be4XYIJPVThORHzYi0SEqpH7tosR21qyodcY5aEHRpCdt8gVHf8nTR xNLxgesWtO5rfS5z3SxSDz8LJNSGmOf1tI+HQYEQwbsEgaFqSIcj/i/nHGIbEYREyyOW X+P3s40vG/uXh2E7LISb3iDrXSERblWy61J0Y3r05TaGV3rLm2K+SgMZBjCmhIIq1qnx FG4Q== 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=V4/jlIKZFmXnQ4/sEz3I8fDFoeb9tei6smaJLFHFWeo=; b=EUzYO2OpuUABYLgxtbqlijFlqbscFUl4vb2ptV6UThfr0h+35ZZB0lcIvHQinQUyqF JNg960W8oq/3vbXSQGoHAY5RY4Bx8DYi/UqeMIEFEsPTQ0ArgWyn6+JTMUXju/Qp5k9E Cp5jFvorycy+M1Q9Iw9cdnWXmcdnD0mQfcIB2K8f9ZGoMqrrsELtksKEpaSden0OTKQO NedqmC6ge2R/LOlGBRKjDLxUJljN3p6smKN55CbADgnzcgfA1tAmYauae19HIKOtwDXT SqxVSFwtd4cC0Eh2snKtF+k0/6v7jVuKbWmgpjW2bWLEgWL8ARdxR4a6J9X7rZ+FTM8j k7pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Tkibdwgs; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j25si24754658jaj.93.2021.07.24.07.15.13; Sat, 24 Jul 2021 07:15:26 -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=@redhat.com header.s=mimecast20190719 header.b=Tkibdwgs; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233196AbhGXNdL (ORCPT + 99 others); Sat, 24 Jul 2021 09:33:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:49097 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbhGXNdK (ORCPT ); Sat, 24 Jul 2021 09:33:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627136021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=V4/jlIKZFmXnQ4/sEz3I8fDFoeb9tei6smaJLFHFWeo=; b=Tkibdwgs8exHHHQpHxI6BlBSWCYJDbgDWXrkpGwE4MA9P4qdVVRuuHpu0eeRG2k+bleDda +KSv7G/8AYCRcra5117JmfnwlInRxP6M4bCjid/vCgCBtBUbOmAFi8jyDCzAjGXCjbVAdM 0pwr8snPDDbEizPJtDcJ5ky6LJ5lE8c= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-149-PhHGR7_VO9CL_fWcmUai8A-1; Sat, 24 Jul 2021 10:13:40 -0400 X-MC-Unique: PhHGR7_VO9CL_fWcmUai8A-1 Received: by mail-wr1-f69.google.com with SMTP id v15-20020a5d4a4f0000b0290141a87409b5so2127440wrs.16 for ; Sat, 24 Jul 2021 07:13:40 -0700 (PDT) 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=V4/jlIKZFmXnQ4/sEz3I8fDFoeb9tei6smaJLFHFWeo=; b=haN/3Fs8fQR2bVaxVikPD5awpXDC1y1wP+Nay/ExxKETITQkOmSvamJ30zt3f4Dlw7 vGaz2w8V9M3a+38ERRBMqXFt7SLZbr9UeDdPufaqP8DgAMAG6DA4las/DE7iSP4DKAXc R0e4TgiidO8wd+43B21o4w/ClBO/jJFJ1DtzHUsWCDXax2pOCjLnPhuXsCD2/V02g+Ov /Uf7zgCYrXByNeNNvKKD5umRdHxTFJ/BjuSV1laFxsyt1oiX1QQkJv4+AC0OMmxVF/I7 xNf4NBH8HABPwS0NI0NnnuVWEZ5VM4byUoiuRwpbPsyxOxrN8Y2kuoV7pLSVoWXQPSbI k37g== X-Gm-Message-State: AOAM531OqgO12Gli+1aS4pKyrIzeIZNKCY4+5XH2VNqG2AQxvip0z7ug wVndCU2M/lcCgRpzSXdUrapKkayKpPBfwpztF7HCOlCTegZJd1o1kEsn4ztofXjg4/i89wOptLr 7uyJg2Idr9VzmRLtXPFVjthavCpuDMyCYT4KltD// X-Received: by 2002:adf:ec0c:: with SMTP id x12mr10549974wrn.113.1627136018451; Sat, 24 Jul 2021 07:13:38 -0700 (PDT) X-Received: by 2002:adf:ec0c:: with SMTP id x12mr10549957wrn.113.1627136018291; Sat, 24 Jul 2021 07:13:38 -0700 (PDT) MIME-Version: 1.0 References: <20210723224617.3088886-1-kherbst@redhat.com> In-Reply-To: From: Karol Herbst Date: Sat, 24 Jul 2021 16:13:27 +0200 Message-ID: Subject: Re: [PATCH] nouveau: make backlight support non optional To: Arnd Bergmann Cc: Linux Kernel Mailing List , Lyude Paul , Ben Skeggs , Randy Dunlap , Daniel Vetter , ML nouveau , dri-devel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 24, 2021 at 4:05 PM Arnd Bergmann wrote: > > On Sat, Jul 24, 2021 at 2:52 PM Karol Herbst wrote: > > > > On Sat, Jul 24, 2021 at 2:10 PM Karol Herbst wrote: > > > > > > On Sat, Jul 24, 2021 at 1:56 PM Arnd Bergmann wrote: > > > > > > > > On Sat, Jul 24, 2021 at 11:55 AM Karol Herbst wrote: > > > > > > > > - You run into dependency loops that prevent a successful build when some > > > > other driver has a 'depends on'. Preventing these loops was the main > > > > reason I said we should do this change. > > > > > > > > In theory we could change the other 85 drivers that use 'depends on' today, > > > > and make BACKLIGHT_CLASS_DEVICE a hidden symbol that only ever > > > > selected by the drivers that need it. This would avoid the third problem but > > > > not the other one. > > > > > > > I see. Yeah, I guess we can do it this way then. I just wasn't aware > > > of the bigger picture here. Thanks for explaining. > > > > yeah... that doesn't work. So the issue is, that X86_PLATFORM_DEVICES > > is a little bit in the way. If I remove the select > > X86_PLATFORM_DEVICES then I guess problems once ACPI is enabled, but > > if I keep it, I get cyclic dep errors :/ > > Right, this is the exact problem I explained: since all other drivers use > 'depends on X86_PLATFORM_DEVICES' instead of 'select', you get a > loop again. Prior to changing the BACKLIGHT_CLASS_DEVICE dependency, > nouveau was pretty much on top of everything else in the hierarchy, > changing part of it can result in a loop. > > I see that there are about ten more 'select' statements that look like > they should not be there, and almost all of them were added in order > to be able to 'select MXM_WMI'. > > I think we can go as far as the patch below, which I've put in my > randconfig build machine, on top of your patch. I'm not entirely > sure how strong the dependency on MXM_WMI is: does it cause > a build failure when that is not enabled, or was this select just > added for convenience so users don't get surprised when it's missing? > > Arnd > we use the MXM_WMI in code. We also have to keep arm in mind and not break stuff there. So I will try to play around with your changes and see how that goes. > diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig > index 9c2108b48524..f2585416507e 100644 > --- a/drivers/gpu/drm/nouveau/Kconfig > +++ b/drivers/gpu/drm/nouveau/Kconfig > @@ -3,21 +3,14 @@ config DRM_NOUVEAU > tristate "Nouveau (NVIDIA) cards" > depends on DRM && PCI && MMU > depends on AGP || !AGP > + depends on ACPI_VIDEO || !ACPI > + depends on BACKLIGHT_CLASS_DEVICE > + depends on MXM_WMI || !X86 || !ACPI > select IOMMU_API > select FW_LOADER > select DRM_KMS_HELPER > select DRM_TTM > select DRM_TTM_HELPER > - select BACKLIGHT_CLASS_DEVICE > - select ACPI_VIDEO if ACPI && X86 && INPUT > - select X86_PLATFORM_DEVICES if ACPI && X86 > - select ACPI_WMI if ACPI && X86 > - select MXM_WMI if ACPI && X86 > - select POWER_SUPPLY > - # Similar to i915, we need to select ACPI_VIDEO and it's dependencies > - select INPUT if ACPI && X86 > - select THERMAL if ACPI && X86 > - select ACPI_VIDEO if ACPI && X86 > select SND_HDA_COMPONENT if SND_HDA_CORE > help > Choose this option for open-source NVIDIA support. >