Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1408643pxb; Fri, 21 Jan 2022 18:00:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2Q4fs18Gt2Ya/kFjci7OptULXDtUs1+7KMeRlwCsXMcRFLAAaef/4hRDrWt6QEUzqmFj0 X-Received: by 2002:a63:10c:: with SMTP id 12mr4690448pgb.67.1642816800391; Fri, 21 Jan 2022 18:00:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642816800; cv=none; d=google.com; s=arc-20160816; b=TNNBC9vb9bSAHBrhU/6E4grQEWaXA4eZE6i2edcJStiSO31A7tbQ0QairhsjoRoxHK LkIghlxKiYG8fn50KSob1/ebSsDSH1FQ5RWllQzN74uY4S2WKmtX91R4aMRZtHCXc1r1 LRY+HFauAq0gkQ6vUUuwYAO+HncTtcFwQbhKvwm0goDS2M3nriIIvkN9ivnQXXrLDT2u n7wyIZEPOUEtx2JscaIXIuVZE5vlZgrpMf1iI1UdTm2OzeZyp1DrxwHkn1yuYn1g7h+d jaNm0owJTBAwMtYe53N5IsZie8Dgp3D4anJP6vn5K8zKwEdnsHZ4z4nxLK6QECzSyEDk bZ8w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WJAypc7GOb09YdvN33B2vpee2uXuBcVdkBylIc96AeA=; b=iY59tiudFu2B0AJZNWRJeRraA+jp0Jt0isUUgy9xbwmT4yWBtUjd3YMjhdh+9cn6R9 Rf4zTVNsZwnGPL5NLh27mTYraPiG9bTZQ1mm4cYDp9srdzG+uyaphE74MwXYIdYunvxK x+LyRsBNL/nk/5Adhiouj8S0YDr1wS9bLxsC8eaJjxnhWHGDaJjO/dWcn424+V7Pl9H3 gIC6EpQZ6ukqE7J3OM8QkYnfp2JjjLBw0/fC7Lynl6WHG10p7K6ZlbP3ZYdXCy6Kob1l TFmyj6kHgpIs1ICzu2pisUUGpO2/0mumW+6pCiVhixI/dJMaJNqZIchal30jC2vHDZg+ 9rgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=K5JwDApw; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j190si4422262pgd.766.2022.01.21.17.59.48; Fri, 21 Jan 2022 18:00:00 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=K5JwDApw; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378874AbiAUQyS (ORCPT + 99 others); Fri, 21 Jan 2022 11:54:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233943AbiAUQyQ (ORCPT ); Fri, 21 Jan 2022 11:54:16 -0500 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60CC6C06173B for ; Fri, 21 Jan 2022 08:54:16 -0800 (PST) Received: by mail-ot1-x32d.google.com with SMTP id x31-20020a056830245f00b00599111c8b20so12500769otr.7 for ; Fri, 21 Jan 2022 08:54:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WJAypc7GOb09YdvN33B2vpee2uXuBcVdkBylIc96AeA=; b=K5JwDApwVvttoj1FuEQWHcNMeEk9ffV26USk+IVo7z4R+E0TB6ZLbA+uyyhQbQIeIW 7/HguzO/fxNh33d2a1NipgqeVvG2HGQkV2/EUEuAcyenIBmOSItP0HQtiTRTMSQCTB19 Q8JRE466S0mqUGFHRMq6HnMj6W7VTJm84rdOAn/bB0D6pKxs4VHgQ12wQqE8s4vSm8ad pfC/q04FuRUVchCnEmBr9uvyn9AHV11GeeDBs4nU09hWmqoVn7DMtgVKdhjraXSGsd9L S0FyshtxeBr3TgNQJXcg1xT2BR2QOjvt6FqBAdNWocPYRpii+5V1Wc/NGPoJFEjoJ972 JFQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WJAypc7GOb09YdvN33B2vpee2uXuBcVdkBylIc96AeA=; b=NMIvzb9X6rqtPiV74Fa4DGvUgBE47WPBXef/XGRKL7HIAFHl6W05AOeO8xOcXZvFTa Ub9ZJFqx5VSzMAQ7QvS09zV62PNpKt2AbjwTAvxobAbwAhBoP8hOym34kPe3wIj+GsPH 67kAG5miVITYqghhwyBUXHkMddQ92kBkBUJEwMm87abcvoKmUOvj4spdvyzEXqWp/YLb 8p/u4pasliMQb0YesrvnDRSnHmvBRi35jY3fHF/ZXp/F8zS6s1AMUKpwfQWsuNly5UZ3 bRTQDEuZB6kNPTlcIOFP84wyChTD0rl84Csav9DY/z0e+z0+jOM9hj678cZwKTYo9c1U elig== X-Gm-Message-State: AOAM531YIFmG4CvWlKZNTf2rnNbIneWuMippFO6Ne++W7c+nZUwChSH1 XD84thRV29vfIIxn6TK/ZMDPUTUb6zI= X-Received: by 2002:a9d:650e:: with SMTP id i14mr3360247otl.350.1642784055795; Fri, 21 Jan 2022 08:54:15 -0800 (PST) Received: from thinkpad.localdomain ([2804:14d:5cd1:5d03:cf72:4317:3105:f6e5]) by smtp.gmail.com with ESMTPSA id y8sm1089271oou.23.2022.01.21.08.54.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 08:54:15 -0800 (PST) From: Luiz Sampaio To: Ben Skeggs , Karol Herbst , Lyude Paul , David Airlie , Daniel Vetter Cc: linux-kernel@vger.kernel.org, Luiz Sampaio , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org Subject: [PATCH 01/31] gpu: nouveau: nouveau_led: changing LED_FULL to actual value Date: Fri, 21 Jan 2022 13:54:06 -0300 Message-Id: <20220121165436.30956-2-sampaio.ime@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220121165436.30956-1-sampaio.ime@gmail.com> References: <20220121165436.30956-1-sampaio.ime@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The enum led_brightness, which contains the declaration of LED_OFF, LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports max_brightness. --- drivers/gpu/drm/nouveau/nouveau_led.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_led.c b/drivers/gpu/drm/nouveau/nouveau_led.c index 2c5e0628da12..df4a734510e1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_led.c +++ b/drivers/gpu/drm/nouveau/nouveau_led.c @@ -45,7 +45,7 @@ nouveau_led_get_brightness(struct led_classdev *led) duty = nvif_rd32(device, 0x61c884) & 0x00ffffff; if (div > 0) - return duty * LED_FULL / div; + return duty * 255 / div; else return 0; } @@ -62,7 +62,7 @@ nouveau_led_set_brightness(struct led_classdev *led, enum led_brightness value) u32 div, duty; div = input_clk / freq; - duty = value * div / LED_FULL; + duty = value * div / 255; /* for now, this is safe to directly poke those registers because: * - A: nvidia never puts the logo led to any other PWM controler -- 2.34.1