mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
drm/rockchip: vop2: Fix compile error on arm32 platform
ld.lld: error: undefined symbol: __udivdi3 >>> referenced by rockchip_drm_vop2.c >>> drivers/gpu/drm/rockchip/rockchip_drm_vop2.o:(vop2_plane_atomic_check) in archive vmlinux.a >>> did you mean: __udivsi3 >>> defined in: vmlinux.a(arch/arm/lib/lib1funcs.o) arm-none-linux-gnueabihf-ld: drivers/gpu/drm/rockchip/rockchip_drm_vop2.o: in function `vop2_calc_dsc_clk': rockchip_drm_vop2.c:(.text+0x239c): undefined reference to `__aeabi_uldivmod' Signed-off-by: Sandy Huang <hjc@rock-chips.com> Change-Id: Iac0b61444cd4d33c62bd8994d0ce7ca1bab7bfa4
This commit is contained in:
@@ -5775,10 +5775,12 @@ static int vop2_plane_atomic_check(struct drm_plane *plane, struct drm_atomic_st
|
||||
int hsub = fb->format->hsub;
|
||||
int vsub = fb->format->vsub;
|
||||
|
||||
if (fb->format->char_per_block[0] == 0)
|
||||
if (fb->format->char_per_block[0] == 0) {
|
||||
offset = ALIGN_DOWN(src->x1 >> 16, tile_size) * fb->format->cpp[1] / hsub * tile_size;
|
||||
else
|
||||
offset = drm_format_info_min_pitch(fb->format, 1, ALIGN_DOWN(src->x1 >> 16, tile_size)) * tile_size / hsub;
|
||||
} else {
|
||||
offset = drm_format_info_min_pitch(fb->format, 1, ALIGN_DOWN(src->x1 >> 16, tile_size)) * tile_size;
|
||||
offset /= hsub;
|
||||
}
|
||||
|
||||
if (vpstate->tiled_en)
|
||||
offset /= vsub;
|
||||
@@ -8604,7 +8606,8 @@ static int vop2_calc_dsc_clk(struct drm_crtc *crtc)
|
||||
* so when txp_clk is equal to v_pixclk, we set dsc_cds = crtc_clock / 4,
|
||||
* otherwise dsc_cds = crtc_clock / 8;
|
||||
*/
|
||||
vcstate->dsc_cds_clk_rate = v_pixclk / (vcstate->dsc_txp_clk_rate == v_pixclk ? 4 : 8);
|
||||
vcstate->dsc_cds_clk_rate = v_pixclk;
|
||||
do_div(vcstate->dsc_cds_clk_rate, (vcstate->dsc_txp_clk_rate == v_pixclk ? 4 : 8));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user