mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
dri/i9*5: correctly calculate the amount of system memory
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>
(cherry picked from commit fc25956bad)
This commit is contained in:
parent
a02c50ef4e
commit
6a81f2bc9b
2 changed files with 2 additions and 2 deletions
|
|
@ -741,7 +741,7 @@ i915_query_renderer_integer(__DRIscreen *psp, int param, unsigned int *value)
|
|||
* (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;
|
||||
|
|
|
|||
|
|
@ -843,7 +843,7 @@ brw_query_renderer_integer(__DRIscreen *psp, int param, unsigned int *value)
|
|||
* (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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue