Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ VAStatus DdiDecode_StatusReport(PDDI_MEDIA_CONTEXT mediaCtx, DecodePipelineAdapt
for (uint32_t i = 0; i < uNumCompletedReport; i++)
{
decode::DecodeStatusReportData tempNewReport;
MOS_ZeroMemory(&tempNewReport, sizeof(CodechalDecodeStatusReport));
MOS_ZeroMemory(&tempNewReport, sizeof(tempNewReport));
MOS_STATUS eStatus = decoder->GetStatusReport(&tempNewReport, 1);
DDI_CHK_CONDITION(MOS_STATUS_SUCCESS != eStatus, "Get status report fail", VA_STATUS_ERROR_OPERATION_FAILED);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ VAStatus DdiDecodeFunctions::StatusReport(
for (uint32_t i = 0; i < uNumCompletedReport; i++)
{
DecodeStatusReportData tempNewReport;
MOS_ZeroMemory(&tempNewReport, sizeof(CodechalDecodeStatusReport));
MOS_ZeroMemory(&tempNewReport, sizeof(tempNewReport));
MOS_STATUS eStatus = decoder->GetStatusReport(&tempNewReport, 1);
DDI_CODEC_CHK_CONDITION(MOS_STATUS_SUCCESS != eStatus, "Get status report fail", VA_STATUS_ERROR_OPERATION_FAILED);

Expand Down
8 changes: 4 additions & 4 deletions media_softlet/linux/common/os/i915/mos_bufmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -3501,11 +3501,11 @@ mos_gem_bo_create_from_prime(struct mos_bufmgr *bufmgr, struct mos_drm_bo_alloc_
* later, we can lseek on the prime fd to get the size. Older
* kernels will just fail, in which case we fall back to the
* provided (estimated or guess size). */
ret = lseek(prime_fd, 0, SEEK_END);
if (ret != -1)
bo_gem->bo.size = ret;
off_t sz =lseek(prime_fd,0,SEEK_END);
if(sz>= 0)
bo_gem->bo.size=(unsigned long)sz;
else
bo_gem->bo.size = size;
bo_gem->bo.size = (unsigned long)size;

bo_gem->bo.handle = handle;
bo_gem->bo.bufmgr = bufmgr;
Expand Down
8 changes: 3 additions & 5 deletions media_softlet/linux/common/os/i915_production/mos_bufmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -3493,19 +3493,17 @@ mos_gem_bo_create_from_prime(struct mos_bufmgr *bufmgr, struct mos_drm_bo_alloc_
* later, we can lseek on the prime fd to get the size. Older
* kernels will just fail, in which case we fall back to the
* provided (estimated or guess size). */
ret = lseek(prime_fd, 0, SEEK_END);
if (ret != -1)
bo_gem->bo.size = ret;
off_t sz=lseek(prime_fd,0, SEEK_END);
if(sz>=0) bo_gem->bo.size=(unsigned long)sz;
else
bo_gem->bo.size = size;
bo_gem->bo.size=(unsigned long)size;

bo_gem->bo.handle = handle;
bo_gem->bo.bufmgr = bufmgr;

bo_gem->gem_handle = handle;

atomic_set(&bo_gem->refcount, 1);

bo_gem->name = alloc_prime->name;
bo_gem->validate_index = -1;
bo_gem->reloc_tree_fences = 0;
Expand Down