The variable name states megabytes, while we calculate the amount in
kilobytes. Correct this by dividing with the correct amount.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* (uint64_t) system_page_size;
const unsigned system_memory_megabytes =
- (unsigned) (system_memory_bytes / 1024);
+ (unsigned) (system_memory_bytes / (1024 * 1024));
value[0] = MIN2(system_memory_megabytes, gpu_mappable_megabytes);
return 0;
* (uint64_t) system_page_size;
const unsigned system_memory_megabytes =
- (unsigned) (system_memory_bytes / 1024);
+ (unsigned) (system_memory_bytes / (1024 * 1024));
value[0] = MIN2(system_memory_megabytes, gpu_mappable_megabytes);
return 0;