Skip to content

Commit

Permalink
drm/rockchip: gem: put object unlock for get phys ioctl
Browse files Browse the repository at this point in the history
fix warning as following
[   24.485312] ------------[ cut here ]------------
[   24.485348] WARNING: CPU: 0 PID: 468 at drivers/gpu/drm/drm_gem.c:1009 drm_gem_object_put_locked+0x30/0x50
[   24.485355] Modules linked in:
[   24.485367] CPU: 0 PID: 468 Comm: rk_mpi_mmz_test Not tainted 5.10.66 torvalds#40
[   24.485372] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[   24.485380] pstate: 40400009 (nZcv daif +PAN -UAO -TCO BTYPE=--)
[   24.485388] pc : drm_gem_object_put_locked+0x30/0x50
[   24.485395] lr : drm_gem_object_put_locked+0x28/0x50
[   24.485400] sp : ffffffc0151abc10
[   24.485405] pmr_save: 000000e0
[   24.485410] x29: ffffffc0151abc10 x28: 0000000000000008
[   24.485419] x27: 0000000000000008 x26: 0000007fc80811b8
[   24.485428] x25: 00000000c0086444 x24: ffffffc0151abd28
[   24.485437] x23: ffffffc01064dab0 x22: ffffff8005bf0400
[   24.485446] x21: 0000000000000031 x20: 0000000000000000
[   24.485455] x19: ffffff8005bf0000 x18: 0000000000000000
[   24.485464] x17: 0000000000000000 x16: 0000000000000000
[   24.485472] x15: 0000000000000000 x14: 0000000000000000
[   24.485481] x13: 0000000000000000 x12: 0000000000000000
[   24.485489] x11: 0000000000000000 x10: ffffff8005bf0458
[   24.485498] x9 : 0000000000000000 x8 : ffffff8005bf0438
[   24.485507] x7 : 0000000000000000 x6 : 0000000000000000
[   24.485515] x5 : ffffffc011a0a808 x4 : 0000000000000000
[   24.485523] x3 : 0000000000000004 x2 : ffffff800b57a000
[   24.485532] x1 : fffffffeffe00000 x0 : 0000000000000000
[   24.485541] Call trace:
[   24.485549]  drm_gem_object_put_locked+0x30/0x50
[   24.485556]  rockchip_gem_get_phys_ioctl+0x70/0xac
[   24.485563]  drm_ioctl_kernel+0x94/0x100
[   24.485569]  drm_ioctl+0x30c/0x34c
[   24.485577]  vfs_ioctl+0x58/0x68
[   24.485583]  __arm64_sys_ioctl+0x68/0x98
[   24.485591]  el0_svc_common.constprop.5+0x138/0x1ec
[   24.485597]  do_el0_svc+0x80/0x9c
[   24.485605]  el0_svc+0x1c/0x28
[   24.485611]  el0_sync_handler+0x64/0x12c
[   24.485618]  el0_sync+0x158/0x180

Fixes: a430ff9 ("drm/rockchip: gem: Add GEM create ioctl support")
Signed-off-by: Jianqun Xu <[email protected]>
Change-Id: I39be4c5dd952c49d86f51b5abce790090d80294f
  • Loading branch information
jayxurockchip authored and nyanmisaka committed Nov 27, 2023
1 parent ff65f88 commit e0162dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/rockchip/rockchip_drm_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,8 @@ int rockchip_gem_get_phys_ioctl(struct drm_device *dev, void *data,
args->phy_addr = page_to_phys(rk_obj->pages[0]);

out:
drm_gem_object_put_locked(obj);
drm_gem_object_put(obj);

return ret;
}

Expand Down

0 comments on commit e0162dc

Please sign in to comment.