Message ID | 20220818184302.10051-6-hdegoede@redhat.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-acpi-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C73BBC32773 for <linux-acpi@archiver.kernel.org>; Thu, 18 Aug 2022 18:44:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344794AbiHRSoO (ORCPT <rfc822;linux-acpi@archiver.kernel.org>); Thu, 18 Aug 2022 14:44:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344872AbiHRSnx (ORCPT <rfc822;linux-acpi@vger.kernel.org>); Thu, 18 Aug 2022 14:43:53 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B64CF2F39E for <linux-acpi@vger.kernel.org>; Thu, 18 Aug 2022 11:43:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660848222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PCSmY8k1Kok4+Y5KifM65gc7LPbBGxwniOYLc7Z6cXs=; b=h6kA0MnJkpltrNHR5BwTQxlZ82+QtT4YRUMLhAWomL/r1H9XoxVCT+WbqEt4olTqKYVsPF b3COKswDX7wQgEr6oW3J6MbaUsy6QiRde2Hi1LdWenPpKEahhXzSbQV37xJOCVXnevR5Pu og6XJByy4YuEkW0uyp87SUygLw11UL8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-167-ttxspPBOMsOlwLolhevS1g-1; Thu, 18 Aug 2022 14:43:36 -0400 X-MC-Unique: ttxspPBOMsOlwLolhevS1g-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DEB3D101A54E; Thu, 18 Aug 2022 18:43:34 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.192.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4A398492C3B; Thu, 18 Aug 2022 18:43:31 +0000 (UTC) From: Hans de Goede <hdegoede@redhat.com> To: Ben Skeggs <bskeggs@redhat.com>, Karol Herbst <kherbst@redhat.com>, Lyude <lyude@redhat.com>, Daniel Dadap <ddadap@nvidia.com>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, Jani Nikula <jani.nikula@linux.intel.com>, Joonas Lahtinen <joonas.lahtinen@linux.intel.com>, Rodrigo Vivi <rodrigo.vivi@intel.com>, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>, Alex Deucher <alexander.deucher@amd.com>, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com>, Pan@vger.kernel.org, Xinhui <Xinhui.Pan@amd.com>, "Rafael J . Wysocki" <rafael@kernel.org>, Mika Westerberg <mika.westerberg@linux.intel.com>, Lukas Wunner <lukas@wunner.de>, Mark Gross <markgross@kernel.org>, Andy Shevchenko <andy@kernel.org> Cc: Hans de Goede <hdegoede@redhat.com>, nouveau@lists.freedesktop.org, Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>, intel-gfx <intel-gfx@lists.freedesktop.org>, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, Len Brown <lenb@kernel.org>, linux-acpi@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH v3 05/31] drm/nouveau: Don't register backlight when another backlight should be used Date: Thu, 18 Aug 2022 20:42:36 +0200 Message-Id: <20220818184302.10051-6-hdegoede@redhat.com> In-Reply-To: <20220818184302.10051-1-hdegoede@redhat.com> References: <20220818184302.10051-1-hdegoede@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Precedence: bulk List-ID: <linux-acpi.vger.kernel.org> X-Mailing-List: linux-acpi@vger.kernel.org |
Series |
drm/kms: Stop registering multiple /sys/class/backlight devs for a single display
|
expand
|
diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c index a2141d3d9b1d..91c504c7b82c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_backlight.c +++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c @@ -34,6 +34,8 @@ #include <linux/backlight.h> #include <linux/idr.h> +#include <acpi/video.h> + #include "nouveau_drv.h" #include "nouveau_reg.h" #include "nouveau_encoder.h" @@ -405,6 +407,11 @@ nouveau_backlight_init(struct drm_connector *connector) goto fail_alloc; } + if (!acpi_video_backlight_use_native()) { + NV_INFO(drm, "Skipping nv_backlight registration\n"); + goto fail_alloc; + } + if (!nouveau_get_backlight_name(backlight_name, bl)) { NV_ERROR(drm, "Failed to retrieve a unique name for the backlight interface\n"); goto fail_alloc;