2014-07-15, 09:30
(2014-07-15, 09:14)althekiller Wrote: I think you haven't read that AMLUtils.ccp carefully at all. Look at the implementation of aml_get_cputype(). It is naive. There's no detection for m8, yet. Checking for !=8 will get you nowhere since that function will never return 8. It should return -1 since m8 is "unsupported", so the patch should be just fine. It's essentially, "Don't touch unsupported AML SOCs."
EDIT: I authored the patch.
Really?
int aml_get_cputype()
{
static int aml_cputype = -1;
if (aml_cputype == -1)
{
std:tring cpu_hardware = g_cpuInfo.getCPUHardware();
// default to AMLogic M1
aml_cputype = 1;
if (cpu_hardware.find("MESON-M3") != std:tring::npos)
aml_cputype = 3;
else if (cpu_hardware.find("MESON3") != std:tring::npos)
aml_cputype = 3;
else if (cpu_hardware.find("Meson6") != std:tring::npos)
aml_cputype = 6;
else if (cpu_hardware.find("Meson8") != std:tring::npos)
aml_cputype = 8;
}
return aml_cputype;
}
It can't be -1 because cpu freq and governor were changed successfully.
But I am not sure about what it returns.