Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Media Common][VP] fix compressed surface width not align with 32 and seg fault #1699

Closed
wants to merge 1 commit into from

Conversation

Dylan-debug
Copy link
Contributor

fix compressed surface width not align with 32 and seg fault caused by wrong plane number passed to gmm

Signed-off-by: caij [email protected]

@Dylan-debug Dylan-debug force-pushed the 32alignissue branch 2 times, most recently from 1181d06 to bacfc22 Compare July 21, 2023 02:43
@Dylan-debug Dylan-debug force-pushed the 32alignissue branch 2 times, most recently from 47e05bc to 599340a Compare July 28, 2023 02:59
@@ -5192,7 +5192,7 @@ VAStatus SwizzleSurface(PDDI_MEDIA_CONTEXT mediaCtx, PGMM_RESOURCE_INFO pGmmResI

memset(&gmmResCopyBlt, 0x0, sizeof(GMM_RES_COPY_BLT));
uiPicHeight = pGmmResInfo->GetBaseHeight();
uiSize = pGmmResInfo->GetSizeSurface();
uiSize = pGmmResInfo->GetSizeMainSurface();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's "main" , compare with aux plan of compressed surface ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MainSize is not include auxplan. We need pass the right size correspondent right Plane number.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does pGmmResInfo->CpuBlt support MMC?
if not, only support non-compressed surface
GetSizeSurface should be same as GetSizeMainSurface?

@@ -663,7 +663,37 @@ MOS_STATUS MediaVeboxDecompState::GetResourceInfo(PMOS_SURFACE surface)
&resDetails));

surface->Format = resDetails.Format;
#ifdef LINUX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@XinfengZhang Can we add such macro?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, we can. We can add such macro in mos layer. you can find such macro on this cpp file.

@Dylan-debug Dylan-debug changed the title fix compressed surface width not align with 32 and seg fault [Media Common][VP] fix compressed surface width not align with 32 and seg fault Jul 31, 2023
@Dylan-debug Dylan-debug force-pushed the 32alignissue branch 2 times, most recently from 293f324 to c887e36 Compare August 3, 2023 06:04
@Sherry-Lin
Copy link
Contributor

@Dylan-debug could you rebase the patch for merging?

@Dylan-debug Dylan-debug closed this Sep 4, 2023
@Dylan-debug
Copy link
Contributor Author

merged in 5621e3f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants