From feaa0f093e0b06bb1ffd9285ab09d09b6758736f Mon Sep 17 00:00:00 2001 From: Zhang Yubing Date: Fri, 3 Mar 2023 18:09:57 +0800 Subject: [PATCH] drm/rockchip: dw-dp: fix alignment fault when memory copy the dst is device memory, when accessing dst, it need alignment, use memcpy_toio instead of memcpy. Signed-off-by: Zhang Yubing Change-Id: Ie761ac1660ef841b44bc835671b7f9bd6a0f66e4 --- drivers/gpu/drm/rockchip/dw-dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/dw-dp.c b/drivers/gpu/drm/rockchip/dw-dp.c index 53728f445cf1..a26b6492a4b5 100644 --- a/drivers/gpu/drm/rockchip/dw-dp.c +++ b/drivers/gpu/drm/rockchip/dw-dp.c @@ -511,7 +511,7 @@ static int dw_dp_hdcp_init_keys(struct dw_dp *dp) if (!base) return -ENOMEM; - memcpy(base, hdcp_vendor_data, size); + memcpy_toio(base, hdcp_vendor_data, size); res = sip_hdcp_config(HDCP_FUNC_KEY_LOAD, dp->id ? DP_TX1 : DP_TX0, 0); if (IS_SIP_ERROR(res.a0)) {