mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-07 21:27:04 +08:00
Sysman: Fix few memory leaks
Invoking FwDeviceInit from several modules without closing igsc device result in memory leak. Add support to invoke FwDeviceInit only during creation of fw util interface. Related-To: LOCI-3204 Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ec619f4259
commit
de06d91db8
@@ -32,14 +32,6 @@ ze_result_t WddmFirmwareImp::osFirmwareFlash(void *pImage, uint32_t size) {
|
||||
return pFwInterface->flashFirmware(osFwType, pImage, size);
|
||||
}
|
||||
|
||||
bool WddmFirmwareImp::isFirmwareSupported(void) {
|
||||
if (pFwInterface != nullptr) {
|
||||
isFWInitialized = ((ZE_RESULT_SUCCESS == pFwInterface->fwDeviceInit()) ? true : false);
|
||||
return this->isFWInitialized;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
WddmFirmwareImp::WddmFirmwareImp(OsSysman *pOsSysman, const std::string &fwType) : osFwType(fwType) {
|
||||
WddmSysmanImp *pWddmSysmanImp = static_cast<WddmSysmanImp *>(pOsSysman);
|
||||
pFwInterface = pWddmSysmanImp->getFwUtilInterface();
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace L0 {
|
||||
class FirmwareUtil;
|
||||
class WddmFirmwareImp : public OsFirmware {
|
||||
public:
|
||||
bool isFirmwareSupported(void) override;
|
||||
void osGetFwProperties(zes_firmware_properties_t *pProperties) override;
|
||||
ze_result_t osFirmwareFlash(void *pImage, uint32_t size) override;
|
||||
ze_result_t getFirmwareVersion(std::string fwType, zes_firmware_properties_t *pProperties);
|
||||
@@ -24,7 +23,6 @@ class WddmFirmwareImp : public OsFirmware {
|
||||
|
||||
protected:
|
||||
FirmwareUtil *pFwInterface = nullptr;
|
||||
bool isFWInitialized = false;
|
||||
std::string osFwType;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user