From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 6D00DC4338F for ; Mon, 9 Aug 2021 13:21:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3AF6060C3E for ; Mon, 9 Aug 2021 13:21:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235428AbhHINVy (ORCPT ); Mon, 9 Aug 2021 09:21:54 -0400 Received: from mga05.intel.com ([192.55.52.43]:42451 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234597AbhHINVn (ORCPT ); Mon, 9 Aug 2021 09:21:43 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10070"; a="300278504" X-IronPort-AV: E=Sophos;i="5.84,307,1620716400"; d="scan'208";a="300278504" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Aug 2021 06:21:03 -0700 X-IronPort-AV: E=Sophos;i="5.84,307,1620716400"; d="scan'208";a="514951933" Received: from lmajkows-mobl1.ger.corp.intel.com (HELO localhost) ([10.249.39.191]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Aug 2021 06:20:59 -0700 From: Jani Nikula To: Arnd Bergmann , Karol Herbst Cc: ML nouveau , Randy Dunlap , Linux Kernel Mailing List , dri-devel , Ben Skeggs Subject: Re: [PATCH] nouveau: make backlight support non optional In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20210723224617.3088886-1-kherbst@redhat.com> Date: Mon, 09 Aug 2021 16:20:55 +0300 Message-ID: <87tujyoitk.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 24 Jul 2021, Arnd Bergmann wrote: > On Sat, Jul 24, 2021 at 4:14 PM Karol Herbst wrote: >> >> 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. > > Ok, should find any randconfig build failures for arm, arm64 or x86 over the > weekend. I also this on linux-next today > > ld: drivers/gpu/drm/i915/display/intel_panel.o: in function > `intel_backlight_device_register': > intel_panel.c:(.text+0x2804): undefined reference to `backlight_device_register' > ld: intel_panel.c:(.text+0x284e): undefined reference to > `backlight_device_register' > ld: drivers/gpu/drm/i915/display/intel_panel.o: in function > `intel_backlight_device_unregister': > intel_panel.c:(.text+0x28b1): undefined reference to > `backlight_device_unregister' > > and I added this same thing there to see how it goes: Last I checked (and it was a while a go) you really had to make all users of BACKLIGHT_CLASS_DEVICE depend not select it, otherwise you end up with recursive dependencies. BR, Jani. > > diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig > index 87825d36335b..69c6b7aec49e 100644 > --- a/drivers/gpu/drm/i915/Kconfig > +++ b/drivers/gpu/drm/i915/Kconfig > @@ -3,6 +3,8 @@ config DRM_I915 > tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics" > depends on DRM > depends on X86 && PCI > + depends on ACPI_VIDEO || !ACPI > + depends on BACKLIGHT_CLASS_DEVICE > select INTEL_GTT > select INTERVAL_TREE > # we need shmfs for the swappable backing store, and in particular > @@ -16,10 +18,6 @@ config DRM_I915 > select IRQ_WORK > # i915 depends on ACPI_VIDEO when ACPI is enabled > # but for select to work, need to select ACPI_VIDEO's dependencies, ick > - select DRM_I915_BACKLIGHT if ACPI > - select INPUT if ACPI > - select ACPI_VIDEO if ACPI > - select ACPI_BUTTON if ACPI > select SYNC_FILE > select IOSF_MBI > select CRC32 > @@ -64,13 +62,7 @@ config DRM_I915_FORCE_PROBE > Use "*" to force probe the driver for all known devices. > > config DRM_I915_BACKLIGHT > - tristate "Control backlight support" > - depends on DRM_I915 > - default DRM_I915 > - select BACKLIGHT_CLASS_DEVICE > - help > - Say Y here if you want to control the backlight of your display > - (e.g. a laptop panel). > + def_tristate DRM_I915 > > config DRM_I915_CAPTURE_ERROR > bool "Enable capturing GPU state following a hang" -- Jani Nikula, Intel Open Source Graphics Center