Skip to content

Commit

Permalink
iris/kmsro: use ro device to allocate scanout for render
Browse files Browse the repository at this point in the history
Signed-off-by: Chew, Tong Liang <[email protected]>
Signed-off-by: Mazlan, Hazwan Arif <[email protected]>

Tracked-On: OAM-127438
Signed-off-by: Weifeng Liu <[email protected]>
(cherry picked from commit 89218cd)
Signed-off-by: Lina Sun <[email protected]>
  • Loading branch information
tchew6 authored and lsun30 committed Dec 6, 2024
1 parent 78fc9a7 commit 3646886
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/gallium/drivers/iris/iris_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,11 +1176,14 @@ iris_resource_create_for_image(struct pipe_screen *pscreen,
{
struct iris_screen *screen = (struct iris_screen *)pscreen;
const struct intel_device_info *devinfo = screen->devinfo;
struct pipe_resource *pres;

if (screen->ro &&
(templ->bind & (PIPE_BIND_DISPLAY_TARGET |
PIPE_BIND_SCANOUT | PIPE_BIND_SHARED))) {
return iris_resource_create_renderonly(pscreen, templ);
pres = iris_resource_create_renderonly(pscreen, templ);
if (pres)
return pres;
}

struct iris_resource *res = iris_alloc_resource(pscreen, templ);
Expand Down Expand Up @@ -1954,8 +1957,7 @@ iris_resource_get_handle(struct pipe_screen *pscreen,
case WINSYS_HANDLE_TYPE_KMS: {
iris_gem_set_tiling(bo, &res->surf);

if (screen->ro) {
assert(res->scanout);
if (screen->ro && res->scanout) {
return renderonly_get_handle(res->scanout, whandle);
}
/* Because we share the same drm file across multiple iris_screen, when
Expand Down

0 comments on commit 3646886

Please sign in to comment.