Skip to content

Commit

Permalink
drm/dc8200: implement fbdev
Browse files Browse the repository at this point in the history
Reference: Icenowy/linux@57cb1ebbf9

Signed-off-by: MichaIng <[email protected]>
  • Loading branch information
MichaIng committed Apr 18, 2024
1 parent 36c61c2 commit 4a02f78
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/verisilicon/vs_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ static int vs_drm_bind(struct device *dev)
if (ret)
goto err_helper;

drm_fbdev_generic_setup(drm_dev, 32);

return 0;

err_helper:
Expand Down
7 changes: 7 additions & 0 deletions drivers/gpu/drm/verisilicon/vs_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,13 @@ struct sg_table *vs_gem_prime_get_sg_table(struct drm_gem_object *obj)

int vs_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map)
{
struct vs_gem_object *vs_obj = to_vs_gem_object(obj);

void * vaddr = vs_obj->dma_attrs & DMA_ATTR_NO_KERNEL_MAPPING ?
page_address(vs_obj->cookie) : vs_obj->cookie;

dma_buf_map_set_vaddr(map, vaddr);

return 0;
}

Expand Down

0 comments on commit 4a02f78

Please sign in to comment.