mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
intel/l3: Define helper for obtaining the size of an L3 partition in KB.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25493>
This commit is contained in:
parent
19e62e8fba
commit
f36027f389
2 changed files with 17 additions and 1 deletions
|
|
@ -368,10 +368,21 @@ intel_get_l3_config_urb_size(const struct intel_device_info *devinfo,
|
|||
* only 1008KB of this will be used."
|
||||
*/
|
||||
const unsigned max = (devinfo->ver == 9 ? 1008 : ~0);
|
||||
return MIN2(max, cfg->n[INTEL_L3P_URB] * get_l3_way_size(devinfo)) /
|
||||
return MIN2(max, intel_get_l3_partition_size(devinfo, cfg, INTEL_L3P_URB)) /
|
||||
get_urb_size_scale(devinfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the size of the specified L3 partition in KB.
|
||||
*/
|
||||
unsigned
|
||||
intel_get_l3_partition_size(const struct intel_device_info *devinfo,
|
||||
const struct intel_l3_config *cfg,
|
||||
enum intel_l3_partition i)
|
||||
{
|
||||
return cfg->n[i] * get_l3_way_size(devinfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Print out the specified L3 configuration.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -92,6 +92,11 @@ unsigned
|
|||
intel_get_l3_config_urb_size(const struct intel_device_info *devinfo,
|
||||
const struct intel_l3_config *cfg);
|
||||
|
||||
unsigned
|
||||
intel_get_l3_partition_size(const struct intel_device_info *devinfo,
|
||||
const struct intel_l3_config *cfg,
|
||||
enum intel_l3_partition i);
|
||||
|
||||
void intel_dump_l3_config(const struct intel_l3_config *cfg, FILE *fp);
|
||||
|
||||
enum intel_urb_deref_block_size {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue