search for: bochs_bo_unpin

Displaying 12 results from an estimated 12 matches for "bochs_bo_unpin".

2018 Dec 19
0
[PATCH 11/14] drm/bochs: add basic prime support
...ochs.h b/drivers/gpu/drm/bochs/bochs.h index d0d474e06f..4236d5d811 100644 --- a/drivers/gpu/drm/bochs/bochs.h +++ b/drivers/gpu/drm/bochs/bochs.h @@ -145,6 +145,17 @@ int bochs_dumb_mmap_offset(struct drm_file *file, struct drm_device *dev, int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag); int bochs_bo_unpin(struct bochs_bo *bo); +int bochs_gem_prime_pin(struct drm_gem_object *obj); +void bochs_gem_prime_unpin(struct drm_gem_object *obj); +struct sg_table *bochs_gem_prime_get_sg_table(struct drm_gem_object *obj); +struct drm_gem_object *bochs_gem_prime_import_sg_table( + struct drm_device *dev...
2018 Dec 19
0
[PATCH 09/14] drm/bochs: remove old bochs_crtc_* functions
...f(crtc, struct bochs_device, crtc); - struct bochs_bo *bo; - u64 gpu_addr = 0; - int ret; - - if (old_fb) { - bo = gem_to_bochs_bo(old_fb->obj[0]); - ret = ttm_bo_reserve(&bo->bo, true, false, NULL); - if (ret) { - DRM_ERROR("failed to reserve old_fb bo\n"); - } else { - bochs_bo_unpin(bo); - ttm_bo_unreserve(&bo->bo); - } - } - - if (WARN_ON(crtc->primary->fb == NULL)) - return -EINVAL; - - bo = gem_to_bochs_bo(crtc->primary->fb->obj[0]); - ret = ttm_bo_reserve(&bo->bo, true, false, NULL); - if (ret) - return ret; - - ret = bochs_bo_pin(bo, TTM_...
2018 Dec 19
0
[PATCH 10/14] drm/bochs: drop unused gpu_addr arg from bochs_bo_pin()
...create(struct drm_file *file, struct drm_device *dev, int bochs_dumb_mmap_offset(struct drm_file *file, struct drm_device *dev, uint32_t handle, uint64_t *offset); -int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag, u64 *gpu_addr); +int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag); int bochs_bo_unpin(struct bochs_bo *bo); /* bochs_kms.c */ diff --git a/drivers/gpu/drm/bochs/bochs_fbdev.c b/drivers/gpu/drm/bochs/bochs_fbdev.c index d9f3d42999..92feb817ff 100644 --- a/drivers/gpu/drm/bochs/bochs_fbdev.c +++ b/drivers/gpu/drm/bochs/bochs_fbdev.c @@ -81,7 +81,7 @@ static int bochsfb_create(struc...
2018 Dec 19
0
[PATCH 05/14] drm/bochs: atomic: switch planes to atomic, wire up helpers.
...->fb->obj[0]); + return bochs_bo_pin(bo, TTM_PL_FLAG_VRAM, NULL); +} + +static void bochs_plane_cleanup_fb(struct drm_plane *plane, + struct drm_plane_state *old_state) +{ + struct bochs_bo *bo; + + if (!old_state->fb) + return; + bo = gem_to_bochs_bo(old_state->fb->obj[0]); + bochs_bo_unpin(bo); +} + +static const struct drm_plane_helper_funcs bochs_plane_helper_funcs = { + .atomic_update = bochs_plane_atomic_update, + .prepare_fb = bochs_plane_prepare_fb, + .cleanup_fb = bochs_plane_cleanup_fb, +}; + +static const struct drm_plane_funcs bochs_plane_funcs = { + .update_plane =...
2019 Apr 10
2
[PATCH] drm/bochs: use simple display pipe
...up_fb(struct drm_plane *plane, - struct drm_plane_state *old_state) +static void bochs_pipe_cleanup_fb(struct drm_simple_display_pipe *pipe, + struct drm_plane_state *old_state) { struct bochs_bo *bo; @@ -112,73 +91,13 @@ static void bochs_plane_cleanup_fb(struct drm_plane *plane, bochs_bo_unpin(bo); } -static const struct drm_plane_helper_funcs bochs_plane_helper_funcs = { - .atomic_update = bochs_plane_atomic_update, - .prepare_fb = bochs_plane_prepare_fb, - .cleanup_fb = bochs_plane_cleanup_fb, +static const struct drm_simple_display_pipe_funcs bochs_pipe_funcs = { + .enable = bo...
2018 Sep 05
0
[PATCH] bochs: convert to drm_fb_helper_fbdev_setup/teardown
...t64_t *offset); > > -int bochs_framebuffer_init(struct drm_device *dev, > - struct bochs_framebuffer *gfb, > - const struct drm_mode_fb_cmd2 *mode_cmd, > - struct drm_gem_object *obj); > int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag, u64 *gpu_addr); > int bochs_bo_unpin(struct bochs_bo *bo); > > -extern const struct drm_mode_config_funcs bochs_mode_funcs; > - > /* bochs_kms.c */ > int bochs_kms_init(struct bochs_device *bochs); > void bochs_kms_fini(struct bochs_device *bochs); > @@ -164,3 +149,5 @@ void bochs_kms_fini(struct bochs_device...
2019 Apr 24
21
[PATCH v2 00/17] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same
2019 May 06
25
[PATCH v4 00/19] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same
2019 May 06
25
[PATCH v4 00/19] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same
2019 May 08
22
[PATCH v5 00/20] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same
2019 May 08
22
[PATCH v5 00/20] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same
2019 Apr 29
21
[PATCH v3 00/19] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each other. The implementation is always the same; except for the name of some data structures. As recently discussed, this patch set provides generic memory-management code for simple framebuffers with dedicated video memory. It further converts the respective drivers to the generic code. The shared code is basically the same