From aebbe40e6514c7dc988c97d36869777bc9869a2e Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 27 Aug 2015 16:48:46 -0400
Subject: [PATCH] P4 to Git Change 1185351 by rili@rili_opencl_stg on
2015/08/27 16:33:46
EPR #425788 - Remove uvd/vce related code from GSL&UGL
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudefs.hpp#128 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp#78 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLContext.h#50 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#137 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.h#55 edit
[ROCm/clr commit: 55b7281cc5048691e2b8f70444d09819eaed24cc]
---
.../clr/rocclr/runtime/device/gpu/gpudefs.hpp | 1 -
.../device/gpu/gslbe/src/rt/GSLContext.cpp | 48 +++----------------
.../device/gpu/gslbe/src/rt/GSLContext.h | 1 -
.../device/gpu/gslbe/src/rt/GSLDevice.cpp | 11 -----
.../device/gpu/gslbe/src/rt/GSLDevice.h | 4 --
5 files changed, 7 insertions(+), 58 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp b/projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp
index 306593fde1..b866b7212c 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp
@@ -8,7 +8,6 @@
#include "gsl_types.h"
#include "gsl_config.h"
-#include "gsl_vid_if.h"
#include "gsl_ctx.h"
#include "backend.h"
#include "GSLDevice.h"
diff --git a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp
index 75b7523749..bcbf0c09bd 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp
@@ -62,8 +62,6 @@ CALGSLContext::open(
gslEngineID mainEngineOrdinal = GSL_ENGINEID_INVALID;
gslEngineID sdmaOrdinal = GSL_ENGINEID_INVALID;
- gslEngineID decoderOrdinal = GSL_ENGINEID_INVALID;
- gslEngineID encoderOrdinal = GSL_ENGINEID_INVALID;
for (uint i = 0; i < nEngines; i++)
{
if (engines[i].id >= GSL_ENGINEID_3DCOMPUTE0 &&
@@ -78,30 +76,9 @@ CALGSLContext::open(
sdmaOrdinal = engines[i].id;
m_allowDMA = dev()->canDMA();
}
-
- if (engines[i].id == GSL_ENGINEID_UVD)
- {
- decoderOrdinal = engines[i].id;
- }
-
- if (engines[i].id == GSL_ENGINEID_VCE)
- {
- encoderOrdinal = engines[i].id;
- }
}
- if (decoderOrdinal != GSL_ENGINEID_INVALID)
- {
- m_cs = native->createDecoderContext(decoderOrdinal);
- }
- else if (encoderOrdinal != GSL_ENGINEID_INVALID)
- {
- m_cs = native->createEncoderContext(encoderOrdinal);
- }
- else
- {
- m_cs = native->createComputeContext(mainEngineOrdinal, sdmaOrdinal, false);
- }
+ m_cs = native->createComputeContext(mainEngineOrdinal, sdmaOrdinal, false);
if (m_cs == 0)
{
@@ -139,27 +116,16 @@ CALGSLContext::open(
//
m_rs->setComputeShader(m_cs, true);
- if (decoderOrdinal != GSL_ENGINEID_INVALID)
+ m_eventQueue[MainEngine].open(m_cs, GSL_SYNC_ATI, EQConfig);
+ if (dev()->uavInCB())
{
- m_eventQueue[MainEngine].open(m_cs, GSL_UVD_SYNC_ATI, EQConfig, GSL_ENGINEMASK_ALL_BUT_UVD_VCE | GSL_ENGINE_MASK(GSL_ENGINEID_UVD));
- }
- else if (encoderOrdinal != GSL_ENGINEID_INVALID)
- {
- m_eventQueue[MainEngine].open(m_cs, GSL_VCE_SYNC_ATI, EQConfig, GSL_ENGINEMASK_ALL_BUT_UVD_VCE | GSL_ENGINE_MASK(GSL_ENGINEID_VCE));
+ // Evergreen uses physical mode for DRM engine, so flush 3D pipe wih DRM,
+ // thus GSL can get VA ranges back from KMD asap
+ m_eventQueue[SdmaEngine].open(m_cs, GSL_DRMDMA_SYNC_ATI, EQConfig);
}
else
{
- m_eventQueue[MainEngine].open(m_cs, GSL_SYNC_ATI, EQConfig);
- if (dev()->uavInCB())
- {
- // Evergreen uses physical mode for DRM engine, so flush 3D pipe wih DRM,
- // thus GSL can get VA ranges back from KMD asap
- m_eventQueue[SdmaEngine].open(m_cs, GSL_DRMDMA_SYNC_ATI, EQConfig);
- }
- else
- {
- m_eventQueue[SdmaEngine].open(m_cs, GSL_DRMDMA_SYNC_ATI, EQConfig, GSL_ENGINE_MASK(GSL_ENGINEID_DRMDMA0) | GSL_ENGINE_MASK(GSL_ENGINEID_DRMDMA1));
- }
+ m_eventQueue[SdmaEngine].open(m_cs, GSL_DRMDMA_SYNC_ATI, EQConfig, GSL_ENGINE_MASK(GSL_ENGINEID_DRMDMA0) | GSL_ENGINE_MASK(GSL_ENGINEID_DRMDMA1));
}
m_cs->setGPU((gslGPUMask)dev()->getVPUMask());
diff --git a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.h b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.h
index 5cdc873b25..c2fb25a340 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.h
+++ b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLContext.h
@@ -3,7 +3,6 @@
#include "atitypes.h"
#include "gsl_types.h"
-#include "gsl_vid_if.h"
#include "backend.h"
#include "EventQueue.h"
diff --git a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
index e8dc1da360..8a01c5635a 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
@@ -244,8 +244,6 @@ CALGSLDevice::open(uint32 gpuIndex, bool enableHighPerformanceState, bool report
void
CALGSLDevice::close()
{
- gslVidShutdown();
-
if (m_cs != NULL)
{
m_cs->Flush();
@@ -268,9 +266,6 @@ CALGSLDevice::close()
m_cs->destroySampler(m_textureSampler);
m_cs->destroyQuery(m_mapQuery);
m_cs->destroyQuery(m_mapDMAQuery);
- m_cs->destroyQuery(m_mapUVDQuery);
-
- m_cs->destroyQuery(m_mapVCEQuery);
m_cs->setRenderState(0);
m_cs->destroyRenderState(m_rs);
@@ -594,9 +589,6 @@ CALGSLDevice::PerformFullInitialization_int()
m_mapQuery = m_cs->createQuery(GSL_SYNC_ATI);
m_mapDMAQuery = m_cs->createQuery(GSL_DRMDMA_SYNC_ATI);
- m_mapUVDQuery = m_cs->createQuery(GSL_UVD_SYNC_ATI);
-
- m_mapVCEQuery = m_cs->createQuery(GSL_VCE_SYNC_ATI);
// Allocate 1x1 FART and Vid memory for DMA flush
CALresourceDesc desc;
@@ -626,9 +618,6 @@ void
Wait(gsl::gsCtx* cs, gslQueryTarget target, gslQueryObject object)
{
uint64 param;
- // This should never be called for UVD/VCE Sync queries in case it is
- // Please correctly pass on EngineMask else queries may be messed up
- assert(target != GSL_UVD_SYNC_ATI || target != GSL_VCE_SYNC_ATI);
uint32 mask = (target == GSL_DRMDMA_SYNC_ATI) ? GSL_ENGINE_MASK(GSL_ENGINEID_DRMDMA0) | GSL_ENGINE_MASK(GSL_ENGINEID_DRMDMA1) : GSL_ENGINEMASK_ALL_BUT_UVD_VCE;
diff --git a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.h b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.h
index c989a2416e..5cc9cdcd50 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.h
+++ b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.h
@@ -5,7 +5,6 @@
#include "atitypes.h"
#include "gsl_types.h"
#include "gsl_config.h"
-#include "gsl_vid_if.h"
#include "thread/monitor.hpp"
#ifdef ATI_OS_LINUX
@@ -181,9 +180,6 @@ private:
Hack m_hack;
gslQueryObject m_mapQuery;
gslQueryObject m_mapDMAQuery;
- gslQueryObject m_mapUVDQuery;
-
- gslQueryObject m_mapVCEQuery;
gslStaticRuntimeConfig m_scfg;
gslDynamicRuntimeConfig m_dcfg;