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.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, 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 7100EC4338F for ; Fri, 23 Jul 2021 15:23:25 +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 36E4C60F02 for ; Fri, 23 Jul 2021 15:23:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 36E4C60F02 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DE0516F412; Fri, 23 Jul 2021 15:23:24 +0000 (UTC) Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4FC276F412 for ; Fri, 23 Jul 2021 15:23:23 +0000 (UTC) Received: by mail-wr1-x433.google.com with SMTP id w12so2703356wro.13 for ; Fri, 23 Jul 2021 08:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=VpD6pBpuIHkxy1hH2QDgXSeXKJgN811ge6cKz/eevh8=; b=ia6NdzfXPkb9IiHoHZzpTRtoWu2xUftCOAginiO6qKMddK3ZUnSobx3m4IJXfhqYZW 8xT5CdNA9mt6zcu1EutCvhFGozYYPio0BuAX1DqfGwq3HC95h+FjoJTxYCuaZGDyEQ7h upzVl/RQp0BQ7Eb+s7tnf5zRfBp+oWiUU1j5U= 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 :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=VpD6pBpuIHkxy1hH2QDgXSeXKJgN811ge6cKz/eevh8=; b=LL1AADvlhU5/vCROPwhm8yVCNuFMoFPMbmuSOEIbFGestQub1cidO0aMHRVJxLf6OI vyAclzjcfQ7LdwYdZ2VauwQE+b9tg+e2PuPq1OzuN06f4ks1LQ2pWi4KsNFXn8yUJZuB ITfuRBxkUrDt4t09v7SoVwvytNoPkGQSZHXHcxdkmyl9WCVhrbdpc2OoXoMI1Ql4eFgE 7QcHLO2NtKiC+A4+gIPiv8/wjlnHaqAer/f1VkB3mOR9dBlrHRJwx99NS2Oxn6t6v32b qIaZxhuneXQD0+cwNPAdgeAo8eAxYnC3tXRAl6b0FbWYH7mMD2/n85mxztC4X7Iri/Fo I3ag== X-Gm-Message-State: AOAM533Y3HJX8hdz41ImNg+JVUD6CMRIQuJoa63NpSjG+UwnsWKZ6y// VGE2W5+QtDc0Zu4rwk4vwd62tA== X-Google-Smtp-Source: ABdhPJxWjpKj9xIb+Pq3LUjDM/QHddsL70N5mpK2d8rkq2dS+LUwjZ9DqSk3/vwkpEz8h0zdiMQdtQ== X-Received: by 2002:adf:edd1:: with SMTP id v17mr5736357wro.276.1627053801948; Fri, 23 Jul 2021 08:23:21 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id r19sm35170770wrr.32.2021.07.23.08.23.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jul 2021 08:23:21 -0700 (PDT) Date: Fri, 23 Jul 2021 17:23:19 +0200 From: Daniel Vetter To: Arnd Bergmann Message-ID: Mail-Followup-To: Arnd Bergmann , Ben Skeggs , David Airlie , Lyude Paul , Arnd Bergmann , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , Nikola Cornij , dri-devel , Nouveau Dev , Linux Kernel Mailing List References: <20210723091534.1730564-1-arnd@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 5.10.0-7-amd64 Subject: Re: [Nouveau] [PATCH] drm/nouveau/kms/nv50-: fix build failure with CONFIG_BACKLIGHT=n X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , David Airlie , Nouveau Dev , Linux Kernel Mailing List , dri-devel , Nikola Cornij , Ben Skeggs , Daniel Vetter , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" On Fri, Jul 23, 2021 at 12:16:31PM +0200, Arnd Bergmann wrote: > On Fri, Jul 23, 2021 at 11:25 AM Daniel Vetter wrote: > > > > On Fri, Jul 23, 2021 at 11:15 AM Arnd Bergmann wrote: > > > > > > From: Arnd Bergmann > > > > > > When the backlight support is disabled, the driver fails to build: > > > > > > drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_sor_atomic_disable': > > > drivers/gpu/drm/nouveau/dispnv50/disp.c:1665:59: error: 'struct nouveau_connector' has no member named 'backlight' > > > 1665 | struct nouveau_backlight *backlight = nv_connector->backlight; > > > | ^~ > > > drivers/gpu/drm/nouveau/dispnv50/disp.c:1670:35: error: invalid use of undefined type 'struct nouveau_backlight' > > > 1670 | if (backlight && backlight->uses_dpcd) { > > > | ^~ > > > drivers/gpu/drm/nouveau/dispnv50/disp.c:1671:64: error: invalid use of undefined type 'struct nouveau_backlight' > > > 1671 | ret = drm_edp_backlight_disable(aux, &backlight->edp_info); > > > | ^~ > > > > > > The patch that introduced the problem already contains some #ifdef > > > checks, so just add another one that makes it build again. > > > > > > Fixes: 6eca310e8924 ("drm/nouveau/kms/nv50-: Add basic DPCD backlight support for nouveau") > > > Signed-off-by: Arnd Bergmann > > > > Can we just toss the idea that BACKTLIGHT=n is a reasonable config for > > drm drivers using backlights, and add depends BACKLIGHT to all of > > them? > > > > I mean this is a perfect source of continued patch streams to keep us > > all busy, but beyond that I really don't see the point ... I frankly > > have better things to do, and especially with the big drivers we have > > making backlight optional saves comparitively nothing. > > -Daniel > > Yes! I'd definitely be in favor of that, I've wasted way too much time trying > to sort through dependency loops and other problems with backlight support. > > Maybe we should leave the drivers/video/fbdev/ drivers untouched in this > regard, at least for the moment, but for the drivers/gpu/drm users of > backlight that would be a nice simplification, and even the smallest ones > are unlikely to be used on systems that are too memory constrained to > deal with 4KB extra .text. Yeah I think we can do this entirely ad-hoc, i.e. any time the backlight wheel wobbles off again we nail it down for good for that driver with a depends on BACKGLIGHT and remove any lingering #ifdef all over. If you want maybe start out with the biggest drm drivers in a series, I think if nouveau/amdgpu/i915 folks ack this you're good to go to just convert as things get in the way. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau