Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1228913pxv; Fri, 23 Jul 2021 03:18:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOPb0BTgtU84+f9Dq7/ufw4ddtkZa6JofnyCwq5VqANp+1AtYHFiUaY0zpzf+O2v3IS1Vr X-Received: by 2002:a05:6402:35ca:: with SMTP id z10mr4760740edc.159.1627035514827; Fri, 23 Jul 2021 03:18:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627035514; cv=none; d=google.com; s=arc-20160816; b=l/FaQDT4Jyn5s1er1qZ8IGXsH15OCi3g72/weCeyyzDIU5gvM8SYOqDtbi1Rjwxqbl nwTUf1F/FjU27V0dtyNab3UcWv83gxl6ahpBBUbYACIeuUi70wbFjghpTZfpCKfU0Dtn bcncsLIAPtviMIQ7TV5rML0oa+AHyCjM4akklNGadt1ldx7Wm6AbZ2wHlpL+WhTAAi6g dz+4i3vaoZBWmt1egM8VLtgzstAxCRDKFGfFBYyIYJoGBMA2o36mVMIs88+UO+sgAxWM 5Sg5jGbEihTxB3y/i0qHTPESWhIjoa9PDlAMHTWM6loT4s1lzxXPE3qe2n5L1a9fkx++ M3QQ== 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=jUC3jQMeuHof42LNXo2BT0f9quGc3FRRZyDNOeb9Vxg=; b=fDlTuYQXxP6UpKdhhrCUzCwg5uK9b7M5SmnDgRl1LZVTmZhFRqdjkL2qBPNiyKSQbA iiKdmvij5ZXc7Snm//SLAB6BBaMOGpA/KVfrPXvmnrUdQ69RaZMIPo2DnjXIl9fL6CoQ 6jssyWgiSEbJ2ZfFNUIL86WqMnKqsZyQxnI26dgG8bvNPwDWGYd2JTXANCUaXNFxf89B CsHKqMVtHzZz8crlv8nSPHviQ8GF0aCBjP8H4Og4dM6VgjzcrUg+yY/ND7+EJ53DVvhR HMZTxsz1zapLqK/xx8XvvZRwWz9zGW704kklYCj+sz2Dhzrpu4ZPUQmYAltpxyR8UHRS qFjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gUd3YBzY; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c12si23396507eja.572.2021.07.23.03.18.11; Fri, 23 Jul 2021 03:18:34 -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=@kernel.org header.s=k20201202 header.b=gUd3YBzY; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231249AbhGWJgQ (ORCPT + 99 others); Fri, 23 Jul 2021 05:36:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:42282 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230025AbhGWJgP (ORCPT ); Fri, 23 Jul 2021 05:36:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 48AC160F21 for ; Fri, 23 Jul 2021 10:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627035409; bh=eBzt2n0xOqHlBvF7aRsjRRJPQRR0GZoHKCArOqHMbnA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=gUd3YBzYI3+ChqWwG8xG/YcyCyhLt4pdo/xN/vW5wpAXrWUFVx3R7ty+D33jEix6w sJ9VTEbzDcrVJAG6DGe7ZDpU2BszjzR8pBEuGxcPkmfTyonYCjm189FWGXg3KXhoES /4Qq8g7chg6tVPo11uw3Mt+zAFRW7B+aUSC8olGh/Q0UmiYClcAFcEdMF/xxPaSLkm 8bCZY4Kt+1XCdpbt7DXpg8vOFaUUV+Zs5QQBW9/Z/g60o5+zF2+lSvqsD4qRHmhWUI yrllJ0uG6byClZ+uRF0kLsh2uFnkLmkF1ITL0iX1vJ8jYjcCy2rIGP9/91blbZH985 RnVtr6I0mQy5g== Received: by mail-wm1-f45.google.com with SMTP id b128so485517wmb.4 for ; Fri, 23 Jul 2021 03:16:49 -0700 (PDT) X-Gm-Message-State: AOAM531JXgn+QHh+RJ7qU0z+FYhUfEP9cCofOqKeD/6C80UlWpiVu6Sb LYSol12vuHsrxV/aGfsYMd258e46iCR37A+ZiQY= X-Received: by 2002:a7b:c385:: with SMTP id s5mr3670132wmj.43.1627035407814; Fri, 23 Jul 2021 03:16:47 -0700 (PDT) MIME-Version: 1.0 References: <20210723091534.1730564-1-arnd@kernel.org> In-Reply-To: From: Arnd Bergmann Date: Fri, 23 Jul 2021 12:16:31 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/nouveau/kms/nv50-: fix build failure with CONFIG_BACKLIGHT=n To: Daniel Vetter Cc: Ben Skeggs , David Airlie , Lyude Paul , Arnd Bergmann , =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= , Nikola Cornij , dri-devel , Nouveau Dev , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Arnd