Skip to content

Commit

Permalink
[CP] Add error message report in mos
Browse files Browse the repository at this point in the history
Add error message report in mos when get tiling from kernel failed or skipped.
  • Loading branch information
lixin5x authored and intel-mediadev committed Sep 20, 2023
1 parent 0a9bd3d commit 5d6b960
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions media_softlet/linux/common/os/i915/mos_bufmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1575,11 +1575,17 @@ mos_bufmgr_bo_gem_create_from_name(struct mos_bufmgr *bufmgr,
DRM_IOCTL_I915_GEM_GET_TILING,
&get_tiling);
if (ret != 0) {
MOS_DBG("create_from_name: failed to get tiling: %s\n", strerror(errno));
mos_gem_bo_unreference(&bo_gem->bo);
pthread_mutex_unlock(&bufmgr_gem->lock);
return nullptr;
}
}
else
{
MOS_DBG("create_from_name: driver ignored to get tiling from kernel\n");
}

bo_gem->tiling_mode = get_tiling.tiling_mode;
bo_gem->swizzle_mode = get_tiling.swizzle_mode;
/* XXX stride is unknown */
Expand Down Expand Up @@ -3552,6 +3558,11 @@ mos_gem_bo_create_from_prime(struct mos_bufmgr *bufmgr, int prime_fd, int size)
return nullptr;
}
}
else
{
MOS_DBG("create_from_prime: driver ignored to get tiling from kernel\n");
}

bo_gem->tiling_mode = get_tiling.tiling_mode;
bo_gem->swizzle_mode = get_tiling.swizzle_mode;
/* XXX stride is unknown */
Expand Down
11 changes: 11 additions & 0 deletions media_softlet/linux/common/os/i915_production/mos_bufmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1557,11 +1557,17 @@ mos_bufmgr_bo_gem_create_from_name(struct mos_bufmgr *bufmgr,
DRM_IOCTL_I915_GEM_GET_TILING,
&get_tiling);
if (ret != 0) {
MOS_DBG("create_from_name: failed to get tiling: %s\n", strerror(errno));
mos_gem_bo_unreference(&bo_gem->bo);
pthread_mutex_unlock(&bufmgr_gem->lock);
return nullptr;
}
}
else
{
MOS_DBG("create_from_name: driver ignored to get tiling from kernel\n");
}

bo_gem->tiling_mode = get_tiling.tiling_mode;
bo_gem->swizzle_mode = get_tiling.swizzle_mode;
/* XXX stride is unknown */
Expand Down Expand Up @@ -3556,6 +3562,11 @@ mos_gem_bo_create_from_prime(struct mos_bufmgr *bufmgr, int prime_fd, int size)
return nullptr;
}
}
else
{
MOS_DBG("create_from_prime: driver ignored to get tiling from kernel\n");
}

bo_gem->tiling_mode = get_tiling.tiling_mode;
bo_gem->swizzle_mode = get_tiling.swizzle_mode;
/* XXX stride is unknown */
Expand Down

0 comments on commit 5d6b960

Please sign in to comment.