[MOS] mos class refine
Refine the mos class definition
diff --git a/media_driver/media_driver_next/agnostic/common/os/mos_commandbuffer_next.h b/media_driver/media_driver_next/agnostic/common/os/mos_commandbuffer_next.h
index c65d42d..d3b0095 100644
--- a/media_driver/media_driver_next/agnostic/common/os/mos_commandbuffer_next.h
+++ b/media_driver/media_driver_next/agnostic/common/os/mos_commandbuffer_next.h
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2019, Intel Corporation
+* Copyright (c) 2019-2021, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -88,10 +88,7 @@
//! \return MOS_STATUS
//! MOS_STATUS_SUCCESS if success, otherwise fail reason
//!
- virtual void UnBindToGpuContext(bool isNative)
- {
- return ;
- }
+ virtual void UnBindToGpuContext(bool isNative = true) = 0;
//!
//! \brief Resize command buffer
diff --git a/media_driver/media_driver_next/agnostic/common/os/mos_context_next.h b/media_driver/media_driver_next/agnostic/common/os/mos_context_next.h
index bcf8b01..4fa20e0 100644
--- a/media_driver/media_driver_next/agnostic/common/os/mos_context_next.h
+++ b/media_driver/media_driver_next/agnostic/common/os/mos_context_next.h
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2019-2020, Intel Corporation
+* Copyright (c) 2019-2021, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -53,13 +53,6 @@
//!
virtual MOS_STATUS Init(DDI_DEVICE_CONTEXT osDriverContextNext) = 0;
-private:
- //!
- //! \brief Destory the OS ContextNext Object, internal function, called by cleanup
- //!
- virtual void Destroy() = 0;
-
-public:
//!
//! \brief Static entrypoint, get the OS ContextNext Object
//! \return the os specific object for OS contextNext
@@ -197,6 +190,13 @@
//!
bool IsAynchronous() { return m_aynchronousDevice; }
+protected:
+ //!
+ //! \brief Destory the OS ContextNext Object, internal function, called by cleanup
+ //!
+ virtual void Destroy() = 0;
+
+public:
static const uint32_t m_cmdBufAlignment = 16; //!> Cmd buffer alignment
protected:
diff --git a/media_driver/media_driver_next/agnostic/common/os/mos_gpucontext_next.h b/media_driver/media_driver_next/agnostic/common/os/mos_gpucontext_next.h
index 016a3e9..73542dc 100644
--- a/media_driver/media_driver_next/agnostic/common/os/mos_gpucontext_next.h
+++ b/media_driver/media_driver_next/agnostic/common/os/mos_gpucontext_next.h
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2019, Intel Corporation
+* Copyright (c) 2019-2021, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
diff --git a/media_driver/media_driver_next/linux/common/os/mos_commandbuffer_specific_next.cpp b/media_driver/media_driver_next/linux/common/os/mos_commandbuffer_specific_next.cpp
index afaa2fb..4b76540 100644
--- a/media_driver/media_driver_next/linux/common/os/mos_commandbuffer_specific_next.cpp
+++ b/media_driver/media_driver_next/linux/common/os/mos_commandbuffer_specific_next.cpp
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2019, Intel Corporation
+* Copyright (c) 2019-2021, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -142,7 +142,7 @@
mos_bo_wait_rendering(cmdBufBo);
}
-void CommandBufferSpecificNext::UnBindToGpuContext()
+void CommandBufferSpecificNext::UnBindToGpuContext(bool isNative)
{
MOS_OS_FUNCTION_ENTER;
diff --git a/media_driver/media_driver_next/linux/common/os/mos_commandbuffer_specific_next.h b/media_driver/media_driver_next/linux/common/os/mos_commandbuffer_specific_next.h
index 0518679..819811e 100644
--- a/media_driver/media_driver_next/linux/common/os/mos_commandbuffer_specific_next.h
+++ b/media_driver/media_driver_next/linux/common/os/mos_commandbuffer_specific_next.h
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2019, Intel Corporation
+* Copyright (c) 2019-2021, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -55,7 +55,7 @@
MOS_STATUS BindToGpuContext(GpuContextNext *gpuContext);
- void UnBindToGpuContext();
+ virtual void UnBindToGpuContext(bool isNative = true);
MOS_STATUS ReSize(uint32_t newSize);