Skip to content

Commit

Permalink
[VP] Add LNL upstream support for cm kernel
Browse files Browse the repository at this point in the history
* [Media Common] [VP] Add LNL upstream support for cm kernel

Add LNL upstream support for cm kernel
  • Loading branch information
Effieyu0 authored and intel-mediadev committed Jul 17, 2024
1 parent a5de398 commit 7a27da9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions media_softlet/agnostic/common/vp/cm_fc_ld/PatchInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ enum {
PP_TGL = 13, ///< TigerLake LP
PP_DG2 = 14,
PP_PVC = 15,
PP_ELF = 16,
};

/// Patch info header.
Expand Down Expand Up @@ -92,6 +93,7 @@ struct PInfoHdr {
case PP_TGL:
case PP_DG2:
case PP_PVC:
case PP_ELF:
return true;
default: break;
}
Expand Down
21 changes: 21 additions & 0 deletions media_softlet/agnostic/common/vp/cm_fc_ld/PatchInfoLinker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ unsigned PatchInfoLinker::writeNOP(unsigned N) {
case cm::patch::PP_TGL:
case cm::patch::PP_DG2:
case cm::patch::PP_PVC:
case cm::patch::PP_ELF:
regular_nop = 0x00000060U;
compact_nop = 0x20000060U;
break;
Expand Down Expand Up @@ -383,6 +384,26 @@ unsigned PatchInfoLinker::writeEOT() {
snd1 = 0x0000000030207f0cULL;
}
break;
case cm::patch::PP_ELF:
{
if (hasR127Token)
{
r127_sync0 = 0x0001000000008001ULL;
r127_sync1 = 0x0000000000000000ULL;
r127_1_sync0 = 0x000100000000A001ULL;
r127_1_sync1 = 0x0000000000000000ULL;
uint8_t* sync0Ptr = (uint8_t*)&r127_sync0;
sync0Ptr[1] |= (uint8_t)r127Token;
sync0Ptr = (uint8_t*)&r127_1_sync0;
sync0Ptr[1] |= (uint8_t)r127Token;
}

mov0 = 0x7f050aa0800c0961ULL;
mov1 = 0x0000000000100004ULL;
snd0 = 0x00000004800c0931ULL;
snd1 = 0x0000000030207f0cULL;
}
break;
default:
mov0 = 0x2fe0020c00600001ULL;
mov1 = 0x00000000008d0000ULL;
Expand Down

0 comments on commit 7a27da9

Please sign in to comment.