Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit585c6ed

Browse files
Oleksandr Andrushchenkojgross1
Oleksandr Andrushchenko
authored andcommitted
drm/xen-front: Pass dumb buffer data offset to the backend
While importing a dmabuf it is possible that the data of the bufferis put with offset which is indicated by the SGT offset.Respect the offset value and forward it to the backend.Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>Acked-by: Noralf Trønnes <noralf@tronnes.org>Signed-off-by: Juergen Gross <jgross@suse.com>
1 parent6f92337 commit585c6ed

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

‎drivers/gpu/drm/xen/xen_drm_front.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ int xen_drm_front_mode_set(struct xen_drm_front_drm_pipeline *pipeline,
157157

158158
intxen_drm_front_dbuf_create(structxen_drm_front_info*front_info,
159159
u64dbuf_cookie,u32width,u32height,
160-
u32bpp,u64size,structpage**pages)
160+
u32bpp,u64size,u32offset,
161+
structpage**pages)
161162
{
162163
structxen_drm_front_evtchnl*evtchnl;
163164
structxen_drm_front_dbuf*dbuf;
@@ -194,6 +195,7 @@ int xen_drm_front_dbuf_create(struct xen_drm_front_info *front_info,
194195
req->op.dbuf_create.gref_directory=
195196
xen_front_pgdir_shbuf_get_dir_start(&dbuf->shbuf);
196197
req->op.dbuf_create.buffer_sz=size;
198+
req->op.dbuf_create.data_ofs=offset;
197199
req->op.dbuf_create.dbuf_cookie=dbuf_cookie;
198200
req->op.dbuf_create.width=width;
199201
req->op.dbuf_create.height=height;
@@ -408,7 +410,7 @@ static int xen_drm_drv_dumb_create(struct drm_file *filp,
408410
ret=xen_drm_front_dbuf_create(drm_info->front_info,
409411
xen_drm_front_dbuf_to_cookie(obj),
410412
args->width,args->height,args->bpp,
411-
args->size,
413+
args->size,0,
412414
xen_drm_front_gem_get_pages(obj));
413415
if (ret)
414416
gotofail_backend;

‎drivers/gpu/drm/xen/xen_drm_front.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ int xen_drm_front_mode_set(struct xen_drm_front_drm_pipeline *pipeline,
145145

146146
intxen_drm_front_dbuf_create(structxen_drm_front_info*front_info,
147147
u64dbuf_cookie,u32width,u32height,
148-
u32bpp,u64size,structpage**pages);
148+
u32bpp,u64size,u32offset,structpage**pages);
149149

150150
intxen_drm_front_fb_attach(structxen_drm_front_info*front_info,
151151
u64dbuf_cookie,u64fb_cookie,u32width,

‎drivers/gpu/drm/xen/xen_drm_front_gem.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ xen_drm_front_gem_import_sg_table(struct drm_device *dev,
210210

211211
ret=xen_drm_front_dbuf_create(drm_info->front_info,
212212
xen_drm_front_dbuf_to_cookie(&xen_obj->base),
213-
0,0,0,size,xen_obj->pages);
213+
0,0,0,size,sgt->sgl->offset,
214+
xen_obj->pages);
214215
if (ret<0)
215216
returnERR_PTR(ret);
216217

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp