Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3310872pxj; Mon, 14 Jun 2021 20:45:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzK0FsVySNERoTxQrUdRIM+0F8ACVitKChvjN2kcBRG/oaEFFPLhuwsCSkuzq3DeSUgFRCW X-Received: by 2002:a05:6638:197:: with SMTP id a23mr19173643jaq.77.1623728718142; Mon, 14 Jun 2021 20:45:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623728718; cv=none; d=google.com; s=arc-20160816; b=GMmPk4fGrSVx4Na5/yetezoz//1VbO+IubFh/VjRc4E24DnSAi5mUd3uAVEZuyFafI rmuBpX/1xbAIjMuE3XglipMaDnuLkRPovJK0PdZbcmnjMJvF0CowyPgtOWZuonFjLH56 rzRpVpF0jP1yQm02i6JFnBHBjVABkSThBD5KqoXUrRUjrZb59Ryl/+ipnpcGCpoxAwME ndRfJm4FNhpTd5Dr8mzGGKEUzHvnWzWskcvlhM4NnThdfRRWUJqDFVCNz2Vfr/LBrGMz XZW3fQInX9Dhd6OkKfbThr31qmg0S0mM/7JiYLkiKJZUv1z9Wl4bM5CRd03LRyu17G2/ Tirw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=aHGbJbj0ebE6QT9Ys/qhv9gUQ2vgyk5k0OjPBMHdeRg=; b=ONVJscr2jQHVE8NKqDC4XFX1hBk3gqVu0SWSGT5ucMg8FleJuiRBFoOXd6bVgjzGNs UkCT0yVc1GjAxwZutWEbXTgZaQ6tXXY0FUY8qCBcjiqBJuEesfKBOf/Awqpra7PmcTXJ 7vi2Zd6QyEGas5bFvNX4NnB8jPRJpbmV1cXqxOqTSrahX3DNKfUMrfkuytElmg84ZtVo 5ahDRz+zQTp8cjVAVEYDjBCPG/Fk/x2+BG1+OGJDOWcxueEJJldZn0SLpSbGrOgjFbD4 /dpO/0rBiLkkwnSmggnYu95Y+Y53ZH8jfijIl/jPns4fKnZQIX5tMa3V6XaA/O3LKGof YH2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Kkfv5hng; 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 c9si17471232ilr.50.2021.06.14.20.45.04; Mon, 14 Jun 2021 20:45:18 -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=Kkfv5hng; 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 S230040AbhFODqJ (ORCPT + 99 others); Mon, 14 Jun 2021 23:46:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:26191 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229659AbhFODqG (ORCPT ); Mon, 14 Jun 2021 23:46:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623728641; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aHGbJbj0ebE6QT9Ys/qhv9gUQ2vgyk5k0OjPBMHdeRg=; b=Kkfv5hng7EIRy8SgK2v0nzyy63XDc8Cuuw1W+ctL2e+45s+cLEcAS6DmV0ZugZuX+MITIn KfzuVtUMhMuk/0t0mrnqyeNE2MtsqtUhJQsxRYtLS/DLAsJXU41BL6bti5ycpzWyv+ZBT2 TBaMHOkBHGCD5pELyo2duAwsbgfudCs= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-220-vnS2PL6dM6CcaEzxdZBsYw-1; Mon, 14 Jun 2021 23:43:59 -0400 X-MC-Unique: vnS2PL6dM6CcaEzxdZBsYw-1 Received: by mail-qk1-f200.google.com with SMTP id v1-20020a372f010000b02903aa9be319adso17554659qkh.11 for ; Mon, 14 Jun 2021 20:43:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:organization:user-agent:mime-version :content-transfer-encoding; bh=aHGbJbj0ebE6QT9Ys/qhv9gUQ2vgyk5k0OjPBMHdeRg=; b=qxM+Cb6ZRAgvS0m9DbHPMSsE0XalNsHXj6p76kjg6QgnDHc7hMZs/ScDY7cqFsGSI2 L5M32gDMlxtEVBG0kFZ0kQTZ0531FH79F9wlyHuYXEi7wS80drHUdFJovQTzWNXyZgcv rZcvcBub2RQK0AuoX4EsgikD7IVkp7wpj+s7qCRS3Zl42VGEuMLcDmeSXfW0/4pSginW wzvmyJlEx46/7w+0WJiIW8wwzSmk/bPqIqYDxEoHxLLKh51LAA/JjRn98Tx3+n+0IaFE 9MFEc4OVMs0/E4CaftH0VWoHTO90lHJrDkiwFjMVhr8sDGlc5A6zwVgF8Weh+fg2+iGQ Efjw== X-Gm-Message-State: AOAM5312GHB5Px6VURNtxfaW6qZpz8Pmh5vKDVoeu2JzNloe+QQsTuo9 KGamsJDAH2NEqkS1LiwaINjESq93plInRacC/zO590mjC4LjbnR9B4hH/hSs6rRvl4aLOBujyXc ouPhzu86bTnoE2+4W8/YEuRgi X-Received: by 2002:a05:6214:321:: with SMTP id j1mr2711520qvu.38.1623728639294; Mon, 14 Jun 2021 20:43:59 -0700 (PDT) X-Received: by 2002:a05:6214:321:: with SMTP id j1mr2711504qvu.38.1623728639099; Mon, 14 Jun 2021 20:43:59 -0700 (PDT) Received: from Ruby.lyude.net (pool-108-49-102-102.bstnma.fios.verizon.net. [108.49.102.102]) by smtp.gmail.com with ESMTPSA id p3sm11128331qti.31.2021.06.14.20.43.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Jun 2021 20:43:58 -0700 (PDT) Message-ID: Subject: Re: [PATCH] drm: nouveau: fix nouveau_backlight compiling error From: Lyude Paul To: Chen Jiahao , bskeggs@redhat.com, airlied@linux.ie, daniel@ffwll.ch, airlied@redhat.com, nikola.cornij@amd.com, ville.syrjala@linux.intel.com, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: heying24@huawei.com Date: Mon, 14 Jun 2021 23:43:57 -0400 In-Reply-To: <20210615031658.176218-1-chenjiahao16@huawei.com> References: <20210615031658.176218-1-chenjiahao16@huawei.com> Organization: Red Hat Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This needs a fixes tag: Fixes: 6eca310e8924 ("drm/nouveau/kms/nv50-: Add basic DPCD backlight support for nouveau") with that fixed: Reviewed-by: Lyude Paul On Tue, 2021-06-15 at 11:16 +0800, Chen Jiahao wrote: > There is a compiling error in disp.c while not selecting > CONFIG_DRM_NOUVEAU_BACKLIGHT: > > drivers/gpu/drm/nouveau/dispnv50/disp.c: In function > ‘nv50_sor_atomic_disable’: > drivers/gpu/drm/nouveau/dispnv50/disp.c:1665:52: 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:28: error: dereferencing > pointer > to incomplete type ‘struct nouveau_backlight’ >  1670 |  if (backlight && backlight->uses_dpcd) { >       |                            ^~ > > The problem is solved by adding the CONFIG_DRM_NOUVEAU_BACKLIGHT dependency > where struct nouveau_backlight is used. > > Signed-off-by: Chen Jiahao > --- >  drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 ++++ >  1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c > b/drivers/gpu/drm/nouveau/dispnv50/disp.c > index 093e1f7163b3..d266b7721e29 100644 > --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c > +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c > @@ -1662,17 +1662,21 @@ nv50_sor_atomic_disable(struct drm_encoder *encoder, > struct drm_atomic_state *st >         struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev); >         struct nouveau_crtc *nv_crtc = nouveau_crtc(nv_encoder->crtc); >         struct nouveau_connector *nv_connector = > nv50_outp_get_old_connector(state, nv_encoder); > +#ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT >         struct nouveau_backlight *backlight = nv_connector->backlight; > +#endif >         struct drm_dp_aux *aux = &nv_connector->aux; >         int ret; >         u8 pwr; >   > +#ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT >         if (backlight && backlight->uses_dpcd) { >                 ret = drm_edp_backlight_disable(aux, &backlight->edp_info); >                 if (ret < 0) >                         NV_ERROR(drm, "Failed to disable backlight on > [CONNECTOR:%d:%s]: %d\n", >                                  nv_connector->base.base.id, nv_connector- > >base.name, ret); >         } > +#endif >   >         if (nv_encoder->dcb->type == DCB_OUTPUT_DP) { >                 int ret = drm_dp_dpcd_readb(aux, DP_SET_POWER, &pwr); -- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat