Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp4145471ybh; Tue, 17 Mar 2020 13:07:52 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvscbEwrlW7OEfp0kTZN4JHUjuPyCw+ifB4nfVTUc1yy1UKGqhd6gjmKuiJJQwDOZC56sn3 X-Received: by 2002:aca:d68e:: with SMTP id n136mr502266oig.103.1584475672300; Tue, 17 Mar 2020 13:07:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584475672; cv=none; d=google.com; s=arc-20160816; b=a+NzpCTWTO5McJGfNbzzBNQ448hDUdbTzJRsRJR/ySV7wJm10cDSyVINjKpe+t40Zz 82c3qPVWmbABwUmDwO2fhw87mh8DNNmZaP9bVtpUi/uzcIbEXhImb/5wjkbgSSPKuuRt 0aOVaIdLwzEJHvmji3JgLZ8jGTBqTcl+elNp8XaDexM0t8W/VXCdPIZDIQk5wtpibZRi JTha1Bor8pL/N4f3FD40Pq27gkK5EKtCld0sDdIO5R/oPBfeP6lhMh4Owhjsh/4rOkvU 54eZWsHkrm548epyhzPn8EgzHKkzoP1+7lEh7QRLWX+nx2rA6NTUWeaAo3lQwdDb6y/D 1SAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:references:in-reply-to:message-id:date :subject:cc:to:from; bh=CBPpX9V/bvAC3dQVgqkyUcoVnxVwUZonaxg0UqNNcZo=; b=LZcPwXi2Z9foJPfPt+RsPW26cVe4GA1E9/8d6FhBsIKrcDlAQOQwxaKAiIPVtUvcA8 xodiIRh3bDgTa9a4Ogk+ujKRjxlNaWMuDW6FezwDzrOD78NcfNYch+0z8dNAkfzufkvO +Bnp52rJ3VH0b8q8Nfk/VmOJE9wLBS6fVrj33BJZRO/k9pAtNDVQAppTyWGBETlnK1gZ f473ovX1uJDJ43ZUNCuNPiLmYxEJm49urx5PhcfhZegNi5mIjhrQUBBhLwxpVy2Ot6tj UCfj50D6xqJqucrZtPMspA4CJ1cChUQrRZftuVsVcOEwuGIc9Xogr3WFz4+XKoCtTc7M S4gQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t185si2164687oie.70.2020.03.17.13.07.38; Tue, 17 Mar 2020 13:07:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727041AbgCQUGH (ORCPT + 99 others); Tue, 17 Mar 2020 16:06:07 -0400 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]:3647 "EHLO alexa-out-sd-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726530AbgCQUFg (ORCPT ); Tue, 17 Mar 2020 16:05:36 -0400 Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-02.qualcomm.com with ESMTP; 17 Mar 2020 13:05:35 -0700 Received: from gurus-linux.qualcomm.com ([10.46.162.81]) by ironmsg02-sd.qualcomm.com with ESMTP; 17 Mar 2020 13:05:34 -0700 Received: by gurus-linux.qualcomm.com (Postfix, from userid 383780) id AA68F4BA7; Tue, 17 Mar 2020 13:05:34 -0700 (PDT) From: Guru Das Srinagesh To: linux-pwm@vger.kernel.org Cc: Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Subbaraman Narayanamurthy , linux-kernel@vger.kernel.org, Guru Das Srinagesh , Jani Nikula , Joonas Lahtinen , David Airlie , Daniel Vetter , Chris Wilson , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Rodrigo Vivi , Maarten Lankhorst Subject: [PATCH v9 01/11] drm/i915: Use 64-bit division macro Date: Tue, 17 Mar 2020 13:05:16 -0700 Message-Id: <19661821c8eb32291e72ec091c267f915c365c52.1584473399.git.gurus@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the PWM framework is switching struct pwm_state.duty_cycle's datatype to u64, prepare for this transition by using DIV_ROUND_UP_ULL to handle a 64-bit dividend. Cc: Jani Nikula Cc: Joonas Lahtinen Cc: David Airlie Cc: Daniel Vetter Cc: Chris Wilson Cc: "Ville Syrjälä" Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: Rodrigo Vivi Cc: Maarten Lankhorst Signed-off-by: Guru Das Srinagesh --- drivers/gpu/drm/i915/display/intel_panel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c index bc14e9c..843cac1 100644 --- a/drivers/gpu/drm/i915/display/intel_panel.c +++ b/drivers/gpu/drm/i915/display/intel_panel.c @@ -1868,7 +1868,7 @@ static int pwm_setup_backlight(struct intel_connector *connector, panel->backlight.min = 0; /* 0% */ panel->backlight.max = 100; /* 100% */ - panel->backlight.level = DIV_ROUND_UP( + panel->backlight.level = DIV_ROUND_UP_ULL( pwm_get_duty_cycle(panel->backlight.pwm) * 100, CRC_PMIC_PWM_PERIOD_NS); panel->backlight.enabled = panel->backlight.level != 0; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project