Displaying 20 results from an estimated 25 matches for "qxl_bo_kunmap".
Did you mean:
qxl_bo_kmap
2019 Sep 27
5
[PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...ock(man, false);
- ret = ttm_mem_io_reserve(bo->tbo.bdev, &bo->tbo.mem);
- ttm_mem_io_unlock(man);
+ ret = qxl_ttm_io_mem_reserve(bo->tbo.bdev, &bo->tbo.mem);
return io_mapping_map_atomic_wc(map, bo->tbo.mem.bus.offset + page_offset);
fallback:
@@ -193,17 +190,11 @@ void qxl_bo_kunmap(struct qxl_bo *bo)
void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev,
struct qxl_bo *bo, void *pmap)
{
- struct ttm_mem_type_manager *man = &bo->tbo.bdev->man[bo->tbo.mem.mem_type];
-
if ((bo->tbo.mem.mem_type != TTM_PL_VRAM) &&
(bo->tbo.mem.mem_...
2019 Sep 30
2
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...ev, &bo->tbo.mem);
>> - ttm_mem_io_unlock(man);
>> + ret = qxl_ttm_io_mem_reserve(bo->tbo.bdev, &bo->tbo.mem);
>>
>> return io_mapping_map_atomic_wc(map, bo->tbo.mem.bus.offset + page_offset);
>> fallback:
>> @@ -193,17 +190,11 @@ void qxl_bo_kunmap(struct qxl_bo *bo)
>> void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev,
>> struct qxl_bo *bo, void *pmap)
>> {
>> - struct ttm_mem_type_manager *man =
>> &bo->tbo.bdev->man[bo->tbo.mem.mem_type];
>> -
>> if ((bo->tbo...
2019 Sep 30
2
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...ev, &bo->tbo.mem);
>> - ttm_mem_io_unlock(man);
>> + ret = qxl_ttm_io_mem_reserve(bo->tbo.bdev, &bo->tbo.mem);
>>
>> return io_mapping_map_atomic_wc(map, bo->tbo.mem.bus.offset + page_offset);
>> fallback:
>> @@ -193,17 +190,11 @@ void qxl_bo_kunmap(struct qxl_bo *bo)
>> void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev,
>> struct qxl_bo *bo, void *pmap)
>> {
>> - struct ttm_mem_type_manager *man =
>> &bo->tbo.bdev->man[bo->tbo.mem.mem_type];
>> -
>> if ((bo->tbo...
2019 Sep 30
1
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...;>>> + ret = qxl_ttm_io_mem_reserve(bo->tbo.bdev, &bo->tbo.mem);
>>>>
>>>> return io_mapping_map_atomic_wc(map, bo->tbo.mem.bus.offset +
>>>> page_offset);
>>>> fallback:
>>>> @@ -193,17 +190,11 @@ void qxl_bo_kunmap(struct qxl_bo *bo)
>>>> void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev,
>>>> struct qxl_bo *bo, void *pmap)
>>>> {
>>>> - struct ttm_mem_type_manager *man =
>>>> &bo->tbo.bdev->man[bo->tbo.mem.mem_ty...
2018 Dec 12
0
[PATCH v2 16/18] drm/qxl: implement prime kmap/kunmap
...(&bo->tbo, 0, bo->tbo.num_pages, &bo->kmap);
@@ -139,6 +141,7 @@ int qxl_bo_kmap(struct qxl_bo *bo, void **ptr)
bo->kptr = ttm_kmap_obj_virtual(&bo->kmap, &is_iomem);
if (ptr)
*ptr = bo->kptr;
+ bo->map_count = 1;
return 0;
}
@@ -180,6 +183,9 @@ void qxl_bo_kunmap(struct qxl_bo *bo)
{
if (bo->kptr == NULL)
return;
+ bo->map_count--;
+ if (bo->map_count > 0)
+ return;
bo->kptr = NULL;
ttm_bo_kunmap(&bo->kmap);
}
diff --git a/drivers/gpu/drm/qxl/qxl_prime.c b/drivers/gpu/drm/qxl/qxl_prime.c
index a55dece118..708378844c 100644...
2019 Sep 27
0
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...em_io_reserve(bo->tbo.bdev, &bo->tbo.mem);
> - ttm_mem_io_unlock(man);
> + ret = qxl_ttm_io_mem_reserve(bo->tbo.bdev, &bo->tbo.mem);
>
> return io_mapping_map_atomic_wc(map, bo->tbo.mem.bus.offset + page_offset);
> fallback:
> @@ -193,17 +190,11 @@ void qxl_bo_kunmap(struct qxl_bo *bo)
> void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev,
> struct qxl_bo *bo, void *pmap)
> {
> - struct ttm_mem_type_manager *man =
> &bo->tbo.bdev->man[bo->tbo.mem.mem_type];
> -
> if ((bo->tbo.mem.mem_type != TTM_PL_VRAM) &a...
2019 Sep 30
0
[Spice-devel] [PATCH 1/2] drm/qxl: stop abusing TTM to call driver internal functions
...em_io_unlock(man);
> >> + ret = qxl_ttm_io_mem_reserve(bo->tbo.bdev, &bo->tbo.mem);
> >>
> >> return io_mapping_map_atomic_wc(map, bo->tbo.mem.bus.offset +
> >> page_offset);
> >> fallback:
> >> @@ -193,17 +190,11 @@ void qxl_bo_kunmap(struct qxl_bo *bo)
> >> void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev,
> >> struct qxl_bo *bo, void *pmap)
> >> {
> >> - struct ttm_mem_type_manager *man =
> >> &bo->tbo.bdev->man[bo->tbo.mem.mem_type];
> >>...
2018 Dec 12
0
[PATCH v2 18/18] drm/qxl: remove dead qxl fbdev emulation code
...* NB: this is the only used branch currently. */
- fgcolor = pseudo_palette[fb_image->fg_color];
- bgcolor = pseudo_palette[fb_image->bg_color];
- } else {
- fgcolor = fb_image->fg_color;
- bgcolor = fb_image->bg_color;
- }
- pal->ents[0] = bgcolor;
- pal->ents[1] = fgcolor;
- qxl_bo_kunmap(palette_bo);
- return 0;
-}
-
-void qxl_draw_opaque_fb(const struct qxl_fb_image *qxl_fb_image,
- int stride /* filled in if 0 */)
-{
- struct qxl_device *qdev = qxl_fb_image->qdev;
- struct qxl_drawable *drawable;
- struct qxl_rect rect;
- const struct fb_image *fb_image = &qxl_fb_image-&...
2018 Mar 21
0
[Outreachy kernel] [PATCH] drm/qxl: Replace drm_gem_object_reference/unreference() with _get/put()
...> }
> diff --git a/drivers/gpu/drm/qxl/qxl_fb.c b/drivers/gpu/drm/qxl/qxl_fb.c
> index 23af3e3..3388914 100644
> --- a/drivers/gpu/drm/qxl/qxl_fb.c
> +++ b/drivers/gpu/drm/qxl/qxl_fb.c
> @@ -95,7 +95,7 @@ static void qxlfb_destroy_pinned_object(struct drm_gem_object *gobj)
> qxl_bo_kunmap(qbo);
> qxl_bo_unpin(qbo);
>
> - drm_gem_object_unreference_unlocked(gobj);
> + drm_gem_object_put_unlocked(gobj);
> }
>
> int qxl_get_handle_for_primary_fb(struct qxl_device *qdev,
> @@ -316,11 +316,11 @@ static int qxlfb_create(struct qxl_fbdev *qfbdev,
> qxl...
2018 Nov 28
0
[PATCH 5/6] drm/qxl: cover all crtcs in shadow bo.
...gt;y1;
@@ -342,7 +346,8 @@ void qxl_draw_dirty_fb(struct qxl_device *qdev,
goto out_release_backoff;
ret = qxl_image_init(qdev, release, dimage, surface_base,
- left, top, width, height, depth, stride);
+ left - dumb_shadow_offset,
+ top, width, height, depth, stride);
qxl_bo_kunmap(bo);
if (ret)
goto out_release_backoff;
--
2.9.3
2020 Sep 29
0
[PATCH v3 3/7] drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends
...@ -627,7 +629,7 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane,
cursor->chunk.next_chunk = 0;
cursor->chunk.prev_chunk = 0;
cursor->chunk.data_size = size;
- memcpy(cursor->chunk.data, user_ptr, size);
+ memcpy(cursor->chunk.data, user_map.vaddr, size);
qxl_bo_kunmap(cursor_bo);
qxl_bo_kunmap(user_bo);
@@ -1138,6 +1140,7 @@ int qxl_create_monitors_object(struct qxl_device *qdev)
{
int ret;
struct drm_gem_object *gobj;
+ struct dma_buf_map map;
int monitors_config_size = sizeof(struct qxl_monitors_config) +
qxl_num_crtc * sizeof(struct qxl_head);...
2018 Dec 12
0
[PATCH v2 14/18] drm/qxl: cover all crtcs in shadow bo.
...gt;y1;
@@ -342,7 +346,8 @@ void qxl_draw_dirty_fb(struct qxl_device *qdev,
goto out_release_backoff;
ret = qxl_image_init(qdev, release, dimage, surface_base,
- left, top, width, height, depth, stride);
+ left - dumb_shadow_offset,
+ top, width, height, depth, stride);
qxl_bo_kunmap(bo);
if (ret)
goto out_release_backoff;
--
2.9.3
2020 Sep 29
14
[PATCH v3 0/7] Support GEM object mappings from I/O memory
DRM's fbdev console uses regular load and store operations to update
framebuffer memory. The bochs driver on sparc64 requires the use of
I/O-specific load and store operations. We have a workaround, but need
a long-term solution to the problem.
This patchset changes GEM's vmap/vunmap interfaces to forward pointers
of type struct dma_buf_map and updates the generic fbdev emulation to
use
2020 Sep 29
14
[PATCH v3 0/7] Support GEM object mappings from I/O memory
DRM's fbdev console uses regular load and store operations to update
framebuffer memory. The bochs driver on sparc64 requires the use of
I/O-specific load and store operations. We have a workaround, but need
a long-term solution to the problem.
This patchset changes GEM's vmap/vunmap interfaces to forward pointers
of type struct dma_buf_map and updates the generic fbdev emulation to
use
2020 Oct 15
1
[PATCH v4 06/10] drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends
...c_page(struct qxl_device *qdev,
return rptr;
}
- ret = qxl_bo_kmap(bo, &rptr);
+ ret = qxl_bo_kmap(bo, &bo_map);
if (ret)
return NULL;
+ rptr = bo_map.vaddr; /* TODO: Use mapping abstraction properly */
rptr += page_offset * PAGE_SIZE;
return rptr;
@@ -212,7 +219,7 @@ void qxl_bo_kunmap(struct qxl_bo *bo)
if (bo->map_count > 0)
return;
bo->kptr = NULL;
- ttm_bo_kunmap(&bo->kmap);
+ ttm_bo_vunmap(&bo->tbo, &bo->map);
}
void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev,
diff --git a/drivers/gpu/drm/qxl/qxl_object.h b/drivers/gpu/drm/qxl/...
2020 Oct 15
0
[PATCH v4 06/10] drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends
...> - ret = qxl_bo_kmap(bo, &rptr);
> + ret = qxl_bo_kmap(bo, &bo_map);
> if (ret)
> return NULL;
> + rptr = bo_map.vaddr; /* TODO: Use mapping abstraction properly */
>
> rptr += page_offset * PAGE_SIZE;
> return rptr;
> @@ -212,7 +219,7 @@ void qxl_bo_kunmap(struct qxl_bo *bo)
> if (bo->map_count > 0)
> return;
> bo->kptr = NULL;
> - ttm_bo_kunmap(&bo->kmap);
> + ttm_bo_vunmap(&bo->tbo, &bo->map);
> }
>
> void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev,
> diff --git a/driv...
2020 Nov 03
45
[patch V3 00/37] mm/highmem: Preemptible variant of kmap_atomic & friends
Following up to the discussion in:
https://lore.kernel.org/r/20200914204209.256266093 at linutronix.de
and the second version of this:
https://lore.kernel.org/r/20201029221806.189523375 at linutronix.de
this series provides a preemptible variant of kmap_atomic & related
interfaces.
This is achieved by:
- Removing the RT dependency from migrate_disable/enable()
- Consolidating all
2020 Nov 03
45
[patch V3 00/37] mm/highmem: Preemptible variant of kmap_atomic & friends
Following up to the discussion in:
https://lore.kernel.org/r/20200914204209.256266093 at linutronix.de
and the second version of this:
https://lore.kernel.org/r/20201029221806.189523375 at linutronix.de
this series provides a preemptible variant of kmap_atomic & related
interfaces.
This is achieved by:
- Removing the RT dependency from migrate_disable/enable()
- Consolidating all
2020 Nov 03
45
[patch V3 00/37] mm/highmem: Preemptible variant of kmap_atomic & friends
Following up to the discussion in:
https://lore.kernel.org/r/20200914204209.256266093 at linutronix.de
and the second version of this:
https://lore.kernel.org/r/20201029221806.189523375 at linutronix.de
this series provides a preemptible variant of kmap_atomic & related
interfaces.
This is achieved by:
- Removing the RT dependency from migrate_disable/enable()
- Consolidating all
2020 Oct 28
10
[PATCH v6 00/10] Support GEM object mappings from I/O memory
DRM's fbdev console uses regular load and store operations to update
framebuffer memory. The bochs driver on sparc64 requires the use of
I/O-specific load and store operations. We have a workaround, but need
a long-term solution to the problem.
This patchset changes GEM's vmap/vunmap interfaces to forward pointers
of type struct dma_buf_map and updates the generic fbdev emulation to
use