Skip to content

Commit

Permalink
drm: kirin: Enable COMPILE_TEST
Browse files Browse the repository at this point in the history
Use macros for 64-bit operations. This allows compile-testing this
driver on 32-bit arches, so enable it.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
  • Loading branch information
sean-anderson-seco authored and intel-lab-lkp committed Dec 22, 2022
1 parent 941aae3 commit f03f2c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/hisilicon/kirin/Kconfig
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
config DRM_HISI_KIRIN
tristate "DRM Support for Hisilicon Kirin series SoCs Platform"
depends on DRM && OF && ARM64
depends on DRM && OF && (ARM64 || COMPILE_TEST)
select DRM_KMS_HELPER
select DRM_GEM_DMA_HELPER
select DRM_MIPI_DSI
Expand Down
10 changes: 5 additions & 5 deletions drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
Expand Up @@ -157,8 +157,8 @@ static u32 dsi_calc_phy_rate(u32 req_kHz, struct mipi_phy_params *phy)
q_pll = 0x10 >> (7 - phy->hstx_ckg_sel);

temp = f_kHz * (u64)q_pll * (u64)ref_clk_ps;
m_n_int = temp / (u64)1000000000;
m_n = (temp % (u64)1000000000) / (u64)100000000;
m_n_int = div_u64_rem(temp, 1000000000, &m_n);
m_n /= 100000000;

if (m_n_int % 2 == 0) {
if (m_n * 6 >= 50) {
Expand Down Expand Up @@ -229,8 +229,8 @@ static u32 dsi_calc_phy_rate(u32 req_kHz, struct mipi_phy_params *phy)
phy->pll_fbd_div5f = 1;
}

f_kHz = (u64)1000000000 * (u64)m_pll /
((u64)ref_clk_ps * (u64)n_pll * (u64)q_pll);
f_kHz = div64_u64((u64)1000000000 * (u64)m_pll,
(u64)ref_clk_ps * (u64)n_pll * (u64)q_pll);

if (f_kHz >= req_kHz)
break;
Expand Down Expand Up @@ -490,7 +490,7 @@ static void dsi_set_mode_timing(void __iomem *base,
hsa_time = (hsw * lane_byte_clk_kHz) / pixel_clk_kHz;
hbp_time = (hbp * lane_byte_clk_kHz) / pixel_clk_kHz;
tmp = (u64)htot * (u64)lane_byte_clk_kHz;
hline_time = DIV_ROUND_UP(tmp, pixel_clk_kHz);
hline_time = DIV64_U64_ROUND_UP(tmp, pixel_clk_kHz);

/* all specified in byte-lane clocks */
writel(hsa_time, base + VID_HSA_TIME);
Expand Down

0 comments on commit f03f2c2

Please sign in to comment.