| .. | .. |
|---|
| 316 | 316 | |
|---|
| 317 | 317 | return ret; |
|---|
| 318 | 318 | } |
|---|
| 319 | + |
|---|
| 320 | +int rockchip_drm_direct_show_buf_begin_cpu_access(struct rockchip_drm_direct_show_buffer *buffer) |
|---|
| 321 | +{ |
|---|
| 322 | + struct drm_gem_object *obj = &buffer->rk_gem_obj->base; |
|---|
| 323 | + |
|---|
| 324 | + return rockchip_gem_prime_begin_cpu_access(obj, DMA_FROM_DEVICE); |
|---|
| 325 | +} |
|---|
| 326 | + |
|---|
| 327 | +int rockchip_drm_direct_show_buf_end_cpu_access(struct rockchip_drm_direct_show_buffer *buffer) |
|---|
| 328 | +{ |
|---|
| 329 | + struct drm_gem_object *obj = &buffer->rk_gem_obj->base; |
|---|
| 330 | + |
|---|
| 331 | + return rockchip_gem_prime_end_cpu_access(obj, DMA_TO_DEVICE); |
|---|
| 332 | +} |
|---|
| 333 | + |
|---|