Skip to content

Commit

Permalink
viogpu: Cosmetic changes for CtrlQueue functions
Browse files Browse the repository at this point in the history
Based on #943

Signed-off-by: Max Ramanouski <[email protected]>
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
  • Loading branch information
kostyanf14 committed Oct 24, 2024
1 parent bdc44b2 commit e6aba41
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions viogpu/common/viogpu_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ void CtrlQueue::AttachBacking(UINT res_id, PGPU_MEM_ENTRY ents, UINT nents)

PAGED_CODE_SEG_END

void CtrlQueue::UnrefResource(UINT res_id)
void CtrlQueue::DestroyResource(UINT res_id)
{
DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));

Expand All @@ -428,7 +428,7 @@ void CtrlQueue::UnrefResource(UINT res_id)
DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
}

void CtrlQueue::InvalBacking(UINT res_id)
void CtrlQueue::DetachBacking(UINT res_id)
{
DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));

Expand Down
5 changes: 3 additions & 2 deletions viogpu/common/viogpu_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,13 @@ class CtrlQueue : public VioGpuQueue
PGPU_VBUFFER DequeueBuffer(_Out_ UINT* len);

void CreateResource(UINT res_id, UINT format, UINT width, UINT height);
void UnrefResource(UINT id);
void InvalBacking(UINT id);
void DestroyResource(UINT id);
void SetScanout(UINT scan_id, UINT res_id, UINT width, UINT height, UINT x, UINT y);
void ResFlush(UINT res_id, UINT width, UINT height, UINT x, UINT y);
void TransferToHost2D(UINT res_id, ULONG offset, UINT width, UINT height, UINT x, UINT y);
void AttachBacking(UINT res_id, PGPU_MEM_ENTRY ents, UINT nents);
void DetachBacking(UINT id);

BOOLEAN GetDisplayInfo(PGPU_VBUFFER buf, UINT id, PULONG xres, PULONG yres);
BOOLEAN AskDisplayInfo(PGPU_VBUFFER* buf);
BOOLEAN AskEdidInfo(PGPU_VBUFFER* buf, UINT id);
Expand Down
8 changes: 4 additions & 4 deletions viogpu/viogpudo/viogpudo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3168,8 +3168,8 @@ void VioGpuAdapter::DestroyFrameBufferObj(BOOLEAN bReset)
if (m_pFrameBuf != NULL)
{
resid = (UINT)m_pFrameBuf->GetId();
m_CtrlQueue.InvalBacking(resid);
m_CtrlQueue.UnrefResource(resid);
m_CtrlQueue.DetachBacking(resid);
m_CtrlQueue.DestroyResource(resid);
if (bReset == TRUE) {
m_CtrlQueue.SetScanout(0, 0, 0, 0, 0, 0);
}
Expand Down Expand Up @@ -3498,8 +3498,8 @@ void VioGpuAdapter::DestroyCursor()
if (m_pCursorBuf != NULL)
{
UINT id = (UINT)m_pCursorBuf->GetId();
m_CtrlQueue.InvalBacking(id);
m_CtrlQueue.UnrefResource(id);
m_CtrlQueue.DetachBacking(id);
m_CtrlQueue.DestroyResource(id);
delete m_pCursorBuf;
m_pCursorBuf = NULL;
m_Idr.PutId(id);
Expand Down

0 comments on commit e6aba41

Please sign in to comment.