Skip to content

Commit

Permalink
Modify for fixing CIV two unlock KW issues on WW_08 2020
Browse files Browse the repository at this point in the history
  • Loading branch information
Kexiaox committed Feb 17, 2020
1 parent ba5db01 commit 54235a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion media_driver/linux/common/ddi/media_libva.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3039,7 +3039,12 @@ VAStatus DdiMedia_MapBufferInternal (

if ((nullptr != buf->pSurface) && (Media_Format_CPU != buf->format))
{
DDI_CHK_RET(DdiMedia_MediaMemoryDecompress(mediaCtx, buf->pSurface),"MMD unsupported!");
VAStatus tmpRet = DdiMedia_MediaMemoryDecompress(mediaCtx, buf->pSurface);
if (tmpRet != VA_STATUS_SUCCESS)
{
DdiMediaUtil_UnLockMutex(&mediaCtx->BufferMutex);
}
DDI_CHK_RET(tmpRet,"MMD unsupported!");
}

*pbuf = DdiMediaUtil_LockBuffer(buf, flag);
Expand Down Expand Up @@ -3804,6 +3809,10 @@ VAStatus DdiMedia_QuerySurfaceError(
//&& surface->curStatusReport.decode.status == CODECHAL_STATUS_SUCCESSFUL) // get the crc value whatever the status is
{
CodechalDecode *decoder = dynamic_cast<CodechalDecode *>(decCtx->pCodecHal);
if (decoder == nullptr)
{
DdiMediaUtil_UnLockMutex(&mediaCtx->SurfaceMutex);
}
DDI_CHK_NULL(decoder, "nullptr codechal decoder", VA_STATUS_ERROR_INVALID_CONTEXT);
if (decoder->GetStandard() != CODECHAL_AVC)
{
Expand Down
2 changes: 1 addition & 1 deletion media_driver/linux/common/ddi/media_libva_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ PDDI_MEDIA_SURFACE DdiMedia_ReplaceSurfaceWithNewFormat(PDDI_MEDIA_SURFACE surfa
surfaceElement->pSurface = dstSurface;

DdiMediaUtil_UnLockMutex(&mediaCtx->SurfaceMutex);

DdiMediaUtil_UnLockMutex(&mediaCtx->SurfaceMutex);
return dstSurface;
}

Expand Down

0 comments on commit 54235a1

Please sign in to comment.