ge2d: fixed ge2d_ion_config for axg error issue [1/1]

PD#SH-1

Problem:
run axg ge2d demo failed

Solution:
fixed ge2d_ion_config for axg error

Verify:
verified in A113D board

Change-Id: I48d789a42e7c0aad183fa4b6df1ca32a4ce1ab9b
Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>
This commit is contained in:
pengcheng chen
2018-10-15 14:07:18 +08:00
committed by Jianxin Pan
parent 7bb1e5c754
commit a02649496a

View File

@@ -893,11 +893,25 @@ static int build_ge2d_addr_config_ion(
{
int ret = -1;
int bpp_value = bpp(format);
unsigned long addr_temp = 0;
bpp_value /= 8;
ge2d_log_dbg("build_ge2d_addr_config_ion bpp_value=%d\n",
bpp_value);
if (plane) {
if (plane[0].shared_fd) {
#ifdef CONFIG_AMLOGIC_ION
size_t len = 0;
ret = meson_ion_share_fd_to_phys(ge2d_ion_client,
plane[0].shared_fd, &addr_temp, &len);
if (ret != 0)
return ret;
#else
return ret;
#endif
}
plane[0].addr += addr_temp;
if (plane[0].addr) {
*addr = plane[0].addr;
*stride = plane[0].w * bpp_value;