search for: gem_to_bochs_bo

Displaying 14 results from an estimated 14 matches for "gem_to_bochs_bo".

2018 Dec 19
0
[PATCH 11/14] drm/bochs: add basic prime support
...3 +387,66 @@ int bochs_dumb_mmap_offset(struct drm_file *file, struct drm_device *dev, drm_gem_object_put_unlocked(obj); return 0; } + +/* ---------------------------------------------------------------------- */ + +int bochs_gem_prime_pin(struct drm_gem_object *obj) +{ + struct bochs_bo *bo = gem_to_bochs_bo(obj); + + return bochs_bo_pin(bo, TTM_PL_FLAG_VRAM); +} + +void bochs_gem_prime_unpin(struct drm_gem_object *obj) +{ + struct bochs_bo *bo = gem_to_bochs_bo(obj); + + bochs_bo_unpin(bo); +} + +struct sg_table *bochs_gem_prime_get_sg_table(struct drm_gem_object *obj) +{ + WARN_ONCE(1, "not impl...
2018 Sep 05
0
[PATCH] bochs: convert to drm_fb_helper_fbdev_setup/teardown
...> @@ -13,9 +14,7 @@ static int bochsfb_mmap(struct fb_info *info, > struct vm_area_struct *vma) > { > struct drm_fb_helper *fb_helper = info->par; > - struct bochs_device *bochs = > - container_of(fb_helper, struct bochs_device, fb.helper); > - struct bochs_bo *bo = gem_to_bochs_bo(bochs->fb.gfb.obj); > + struct bochs_bo *bo = gem_to_bochs_bo(fb_helper->fb->obj[0]); > > return ttm_fbdev_mmap(vma, &bo->bo); > } > @@ -101,19 +100,20 @@ static int bochsfb_create(struct drm_fb_helper *helper, > > /* init fb device */ > info = drm...
2018 Dec 19
0
[PATCH 05/14] drm/bochs: atomic: switch planes to atomic, wire up helpers.
...t bochs_formats[] = { DRM_FORMAT_BGRX8888, }; +static void bochs_plane_atomic_update(struct drm_plane *plane, + struct drm_plane_state *old_state) +{ + struct bochs_device *bochs = plane->dev->dev_private; + struct bochs_bo *bo; + + if (!plane->state->fb) + return; + bo = gem_to_bochs_bo(plane->state->fb->obj[0]); + bochs_hw_setbase(bochs, + plane->state->crtc_x, + plane->state->crtc_y, + bo->bo.offset); + bochs_hw_setformat(bochs, plane->state->fb->format); +} + +static int bochs_plane_prepare_fb(struct drm_plane *plane, + struct drm_pl...
2018 Dec 19
0
[PATCH 09/14] drm/bochs: remove old bochs_crtc_* functions
...- return; - } -} - -static int bochs_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, - struct drm_framebuffer *old_fb) -{ - struct bochs_device *bochs = - container_of(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 -EIN...
2019 Feb 04
1
[PATCH] drm/bochs: fix bochs_gem_prime_mmap
...(-) diff --git a/drivers/gpu/drm/bochs/bochs_mm.c b/drivers/gpu/drm/bochs/bochs_mm.c index 641a33f134..49463348a0 100644 --- a/drivers/gpu/drm/bochs/bochs_mm.c +++ b/drivers/gpu/drm/bochs/bochs_mm.c @@ -442,5 +442,6 @@ int bochs_gem_prime_mmap(struct drm_gem_object *obj, { struct bochs_bo *bo = gem_to_bochs_bo(obj); - return ttm_fbdev_mmap(vma, &bo->bo); + bo->gem.vma_node.vm_node.start = bo->bo.vma_node.vm_node.start; + return drm_gem_prime_mmap(obj, vma); } -- 2.9.3
2018 Dec 19
0
[PATCH 13/14] drm/bochs: drop old fbdev emulation code
...+++ b/drivers/gpu/drm/bochs/bochs_fbdev.c @@ -11,132 +11,6 @@ /* ---------------------------------------------------------------------- */ -static int bochsfb_mmap(struct fb_info *info, - struct vm_area_struct *vma) -{ - struct drm_fb_helper *fb_helper = info->par; - struct bochs_bo *bo = gem_to_bochs_bo(fb_helper->fb->obj[0]); - - return ttm_fbdev_mmap(vma, &bo->bo); -} - -static struct fb_ops bochsfb_ops = { - .owner = THIS_MODULE, - DRM_FB_HELPER_DEFAULT_OPS, - .fb_fillrect = drm_fb_helper_cfb_fillrect, - .fb_copyarea = drm_fb_helper_cfb_copyarea, - .fb_imageblit = drm_fb_helper_cfb...
2019 Apr 10
2
[PATCH] drm/bochs: use simple display pipe
...tate *old_state) +static void bochs_plane_update(struct bochs_device *bochs, + struct drm_plane_state *state) { - struct bochs_device *bochs = plane->dev->dev_private; struct bochs_bo *bo; - if (!plane->state->fb) + if (!state->fb || !bochs->stride) return; - bo = gem_to_bochs_bo(plane->state->fb->obj[0]); + + bo = gem_to_bochs_bo(state->fb->obj[0]); bochs_hw_setbase(bochs, - plane->state->crtc_x, - plane->state->crtc_y, + state->crtc_x, + state->crtc_y, bo->bo.offset); - bochs_hw_setformat(bochs, plane->state->fb...
2018 Dec 19
0
[PATCH 10/14] drm/bochs: drop unused gpu_addr arg from bochs_bo_pin()
...gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index 85dd268fa1..a1a0129f3e 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c @@ -96,7 +96,7 @@ static int bochs_plane_prepare_fb(struct drm_plane *plane, if (!new_state->fb) return 0; bo = gem_to_bochs_bo(new_state->fb->obj[0]); - return bochs_bo_pin(bo, TTM_PL_FLAG_VRAM, NULL); + return bochs_bo_pin(bo, TTM_PL_FLAG_VRAM); } static void bochs_plane_cleanup_fb(struct drm_plane *plane, diff --git a/drivers/gpu/drm/bochs/bochs_mm.c b/drivers/gpu/drm/bochs/bochs_mm.c index 0980411e41..5a0e0928...
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