Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp249635ybz; Tue, 21 Apr 2020 20:02:14 -0700 (PDT) X-Google-Smtp-Source: APiQypKr9w68lSFF3ur+GmjCljWhd3fWYBTqYZ1dPlu8+TNyEZfQa61CuFwT4NBrJE44NYW1scHf X-Received: by 2002:a05:6402:88a:: with SMTP id e10mr11953900edy.252.1587524534314; Tue, 21 Apr 2020 20:02:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587524534; cv=none; d=google.com; s=arc-20160816; b=jgjBGZ6ch2pn+Xd+/95ttD2Jur4BX7sH3KKKg7bzOp8BZ4QhApBYJxeOT0/Rd2s82W b9Ig+GqhJ0FlceWp1DH74UVHmRpamhJGDPGF8ouRDd0FJ7+cUmK5UU2Im+8R3DTN3xfI eST2HzUQeaHu2hxPrX2KwEgm8Cy8f+HHlcvwn5a7E66zGT6++WmKZExe0JGtXgp1VTRx fyyS3A7EomKN0qKHOPJRVrq4iYcyaqh1a+3Onvz/TsN0OE27yHiez9USlHaEoS17H/jm VMOWyoDO8ow5lXzaepyJScURZM2bjij3VArWNwmCiDsAlXa0V0yNXflM+hfmrq6moL3i Bzvw== 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=B3TFjsXXXE9au5FpD/hkUOSPBbq2glKAX+GBJw/ts5Y=; b=yYXZfnvBSd3U2GRrrlKmL0nVrilmWQwLiyKvk4z6NcLj3SuUp/kr8sNG7lLEfuxk1k 8bacJaRQpEExQ2JBNOJj/ONV1p7TKGPnLS9JK+m4tuNPR1poGARun4EkL4ByiXVoGeyX xibTByXxp28JlJIk6B0CVhOoW5CxkE03PBG9gqm5Fwf+5vMaLhZ/eGu1j8h7AHeQdGDL 9rJ/wkmq5XI8EYydhQSspWKhlQAJHsTt42tuhd5INRf+7CztxeqHIp6xiVwpKYT0ehEf I63unmQk23PNAtINQHawr9HTyXknoegalMn3ZbUHXLtNi/NI+CWhajKw7LlqRrxgq1Mu AFmw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si2894413ejr.512.2020.04.21.20.01.51; Tue, 21 Apr 2020 20:02:14 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726467AbgDVC6C (ORCPT + 99 others); Tue, 21 Apr 2020 22:58:02 -0400 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:9502 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726407AbgDVC53 (ORCPT ); Tue, 21 Apr 2020 22:57:29 -0400 Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-01.qualcomm.com with ESMTP; 21 Apr 2020 19:57:27 -0700 Received: from gurus-linux.qualcomm.com ([10.46.162.81]) by ironmsg01-sd.qualcomm.com with ESMTP; 21 Apr 2020 19:57:26 -0700 Received: by gurus-linux.qualcomm.com (Postfix, from userid 383780) id 984B84B8D; Tue, 21 Apr 2020 19:57:26 -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 , David Collins , linux-kernel@vger.kernel.org, Guru Das Srinagesh , 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 Subject: [PATCH v13 01/11] drm/i915: Use 64-bit division macro Date: Tue, 21 Apr 2020 19:57:13 -0700 Message-Id: <4a3acf8673c08308848fb7ae73d992b6feb758d3.1587523702.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. To: 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 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 276f438..81547a0 100644 --- a/drivers/gpu/drm/i915/display/intel_panel.c +++ b/drivers/gpu/drm/i915/display/intel_panel.c @@ -1920,7 +1920,7 @@ static int pwm_setup_backlight(struct intel_connector *connector, return retval; } - level = DIV_ROUND_UP(pwm_get_duty_cycle(panel->backlight.pwm) * 100, + level = DIV_ROUND_UP_ULL(pwm_get_duty_cycle(panel->backlight.pwm) * 100, CRC_PMIC_PWM_PERIOD_NS); panel->backlight.level = intel_panel_compute_brightness(connector, level); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project