mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
fix: BMG returns non-zero maxClockRate in zeDeviceGetMemoryProperties
Implemented getDeviceMemoryMaxClkRate() override for BMG Linux to query actual memory clock rate from DRM driver instead of returning 0. Updated unit test to dynamically verify maxClockRate matches ProductHelper return value instead of expecting hardcoded 0. Related-To: NEO-16805 Signed-off-by: Jack Myers <jack.myers@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6acdd40126
commit
175c8a821f
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
#include "shared/source/os_interface/product_helper_hw.h"
|
||||
#include "shared/source/xe2_hpg_core/hw_cmds_bmg.h"
|
||||
#include "shared/source/xe2_hpg_core/hw_info_bmg.h"
|
||||
@@ -49,5 +50,20 @@ bool ProductHelperHw<gfxProduct>::useSharedSystemUsm() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<gfxProduct>::getDeviceMemoryMaxClkRate(const HardwareInfo &hwInfo, const OSInterface *osIface, uint32_t subDeviceIndex) const {
|
||||
if (osIface == nullptr) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto pDrm = osIface->getDriverModel()->as<Drm>();
|
||||
uint32_t memoryMaxClkRateInMhz = 0;
|
||||
if (pDrm->getDeviceMemoryMaxClockRateInMhz(subDeviceIndex, memoryMaxClkRateInMhz) == false) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return memoryMaxClkRateInMhz;
|
||||
}
|
||||
|
||||
template class ProductHelperHw<gfxProduct>;
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user