Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp657557pxb; Tue, 5 Apr 2022 17:35:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/so5mSR+5KVOTPB2NMzb8sma7sXajVTyqaRVk4VcW6RhWl1OcbQNY/zJ2mrk2VzMp5VX1 X-Received: by 2002:a17:902:bc8c:b0:156:bc64:fa47 with SMTP id bb12-20020a170902bc8c00b00156bc64fa47mr5972131plb.135.1649205345149; Tue, 05 Apr 2022 17:35:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649205345; cv=none; d=google.com; s=arc-20160816; b=rBj4twGhC+u40iVWV02fAJJyVcQjnu5mhYkDutgjbGAMZDLxPVQy/ebQn44I1odvKu nW1k8BgtHcNrJnX7fGYdyZlmWQJsHo466I20cOXu+19QfG9UGtkCWY+OvREWJRDBxBfx egPbY1PeExPwKEwGjjVKyE4ZpuzG8fulouCsXWL5+lJ5gGt8LK/8pPXqNvdJfEKxan2A Y2kjGiNdvfURG93QcGoTJQyk64uo2tf4lXlkaVaa4YmeAYtigP0AIUeoOYNtS7S0ysNz PwF953aMrydM+0F6jt/NKXt/aNmGrzCPmxMrWLEwV8S1ARaKm13LmicSet+1ViDzz1kv ZNHA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ScsT6TGClZumRgZzjHG+3/vJeKzXVGowb4336Hewyng=; b=jzB3vynF9rg8ChBcDvutSq23PFd3+hBBF5hOsM9Xg3iXWoOjPf4pPsn++OF+9IMK/k CHXAHrRLOGStFbPh17zttWhmHXyt5VRvLofllqY1lJli8M7w7KrFYoxkz8xeqjF8++Ku o+G34zvedxCqkxnVJkjQ1K3exa7X0yPGJaX1pSyLDREvu81v3sg2zUJf6fSAUje+/nD0 RauXuqmPzb8uilOxYIVzF23yfFjwW+xmX4u8g0dazoMFtl+xti86qNYMA47sTm6VEW7f ETvxxtoBxiPxvVowDQAF2/gNy7mleYVcJaFk+bIpScpzyvNRuMxj682xkoXDP/AGYNvF k9mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=k9BJku+0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i18-20020a17090332d200b0015454fc398asi4018903plr.572.2022.04.05.17.35.27; Tue, 05 Apr 2022 17:35:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=k9BJku+0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353685AbiDEMI6 (ORCPT + 99 others); Tue, 5 Apr 2022 08:08:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244517AbiDEIwW (ORCPT ); Tue, 5 Apr 2022 04:52:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B5DFD64EE; Tue, 5 Apr 2022 01:41:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A6E21614E4; Tue, 5 Apr 2022 08:41:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2BF1C385A1; Tue, 5 Apr 2022 08:41:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148064; bh=OZyYgrz1VCHrilKgZnyeOPJvQBaO39yx7428M/0XhW4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k9BJku+0VsRRw0XTewuR/VPkElWkrkarMsP01dAP7I3k2llrqvesOPzq7UgvMoPek t0ofVMQCKE9uTldi840fw2IP2iQsvAQX6lpX9L6FFks58PTm+20AyXBZBeO+GjZxE7 +aV9z67aYT1WmopYGPh7HiiWmDBPmrE1WEYvXkQM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lyude Paul , Karol Herbst Subject: [PATCH 5.16 0188/1017] drm/nouveau/backlight: Just set all backlight types as RAW Date: Tue, 5 Apr 2022 09:18:21 +0200 Message-Id: <20220405070359.821308434@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lyude Paul commit b21a142fd2055d8276169efcc95b624ff908a341 upstream. Currently we can get a warning on systems with eDP backlights like so: nv_backlight: invalid backlight type WARNING: CPU: 4 PID: 454 at drivers/video/backlight/backlight.c:420 backlight_device_register+0x226/0x250 This happens as a result of us not filling out props.type for the eDP backlight, even though we do it for all other backlight types. Since nothing in our driver uses anything but BACKLIGHT_RAW, let's take the props\.type assignments out of the codepaths for individual backlight types and just set it unconditionally to prevent this from happening again. Signed-off-by: Lyude Paul Fixes: 6eca310e8924 ("drm/nouveau/kms/nv50-: Add basic DPCD backlight support for nouveau") Cc: # v5.15+ Reviewed-by: Karol Herbst Link: https://patchwork.freedesktop.org/patch/msgid/20220204193319.451119-1-lyude@redhat.com Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/nouveau/nouveau_backlight.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/gpu/drm/nouveau/nouveau_backlight.c +++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c @@ -101,7 +101,6 @@ nv40_backlight_init(struct nouveau_encod if (!(nvif_rd32(device, NV40_PMC_BACKLIGHT) & NV40_PMC_BACKLIGHT_MASK)) return -ENODEV; - props->type = BACKLIGHT_RAW; props->max_brightness = 31; *ops = &nv40_bl_ops; return 0; @@ -340,7 +339,6 @@ nv50_backlight_init(struct nouveau_backl else *ops = &nva3_bl_ops; - props->type = BACKLIGHT_RAW; props->max_brightness = 100; return 0; @@ -408,6 +406,7 @@ nouveau_backlight_init(struct drm_connec goto fail_alloc; } + props.type = BACKLIGHT_RAW; bl->dev = backlight_device_register(backlight_name, connector->kdev, nv_encoder, ops, &props); if (IS_ERR(bl->dev)) {