mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
panfrost: Add support for 64 bit gpu_id
Update the gallium driver's use of gpu_id to support 64 bit gpu_ids. Reviewed-by: Marc Alcala Prieto <marc.alcalaprieto@arm.com> Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40921>
This commit is contained in:
parent
fd3aafabe9
commit
a23cebcd60
5 changed files with 11 additions and 9 deletions
|
|
@ -19,7 +19,7 @@ DERIVE_HASH_TABLE(pan_blend_shader_key);
|
|||
|
||||
void
|
||||
pan_blend_shader_cache_init(struct pan_blend_shader_cache *cache,
|
||||
unsigned gpu_id, uint32_t gpu_variant,
|
||||
uint64_t gpu_id, uint32_t gpu_variant,
|
||||
struct pan_pool *bin_pool)
|
||||
{
|
||||
cache->gpu_id = gpu_id;
|
||||
|
|
@ -112,7 +112,7 @@ GENX(pan_blend_get_shader_locked)(struct pan_blend_shader_cache *cache,
|
|||
rt_formats[rt] = GENX(pan_blend_shader_fmt)(key.format);
|
||||
NIR_PASS(_, nir, pan_nir_lower_framebuffer, rt_formats,
|
||||
pan_raw_format_mask_midgard(rt_formats), MAX2(key.nr_samples, 1),
|
||||
(cache->gpu_id >> 16) < 0x700);
|
||||
pan_prod_id(cache->gpu_id) < 0x700);
|
||||
#endif
|
||||
|
||||
struct util_dynarray binary;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ struct panfrost_blend_state {
|
|||
};
|
||||
|
||||
struct pan_blend_shader_cache {
|
||||
unsigned gpu_id;
|
||||
uint64_t gpu_id;
|
||||
uint32_t gpu_variant;
|
||||
struct pan_pool *bin_pool;
|
||||
struct hash_table *shaders;
|
||||
|
|
@ -58,7 +58,7 @@ struct pan_blend_shader {
|
|||
uint64_t panfrost_get_blend(struct panfrost_batch *batch, unsigned rt);
|
||||
|
||||
void pan_blend_shader_cache_init(struct pan_blend_shader_cache *cache,
|
||||
unsigned gpu_id, uint32_t gpu_variant,
|
||||
uint64_t gpu_id, uint32_t gpu_variant,
|
||||
struct pan_pool *bin_pool);
|
||||
|
||||
void pan_blend_shader_cache_cleanup(struct pan_blend_shader_cache *cache);
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ panfrost_device_fd(const struct panfrost_device *dev)
|
|||
return dev->kmod.dev->fd;
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
static inline uint64_t
|
||||
panfrost_device_gpu_id(const struct panfrost_device *dev)
|
||||
{
|
||||
return dev->kmod.dev->props.gpu_id;
|
||||
|
|
|
|||
|
|
@ -1255,7 +1255,9 @@ pan_preload_emit_pre_frame_dcd(struct pan_fb_preload_cache *cache,
|
|||
* The PAN_ARCH check is redundant but allows the compiler to optimize
|
||||
* when PAN_ARCH < 7.
|
||||
*/
|
||||
if (PAN_ARCH >= 7 && (cache->gpu_id >> 16) >= 0x7200)
|
||||
unsigned arch_major = PAN_ARCH_MAJOR(cache->gpu_id);
|
||||
unsigned arch_minor = PAN_ARCH_MINOR(cache->gpu_id);
|
||||
if (PAN_ARCH >= 7 && (arch_major == 7 && arch_minor >= 2))
|
||||
fb->bifrost.pre_post.modes[dcd_idx] =
|
||||
MALI_PRE_POST_FRAME_SHADER_MODE_EARLY_ZS_ALWAYS;
|
||||
else
|
||||
|
|
@ -1397,7 +1399,7 @@ pan_preload_prefill_preload_shader_cache(struct pan_fb_preload_cache *cache)
|
|||
|
||||
void
|
||||
GENX(pan_fb_preload_cache_init)(
|
||||
struct pan_fb_preload_cache *cache, unsigned gpu_id, uint32_t gpu_variant,
|
||||
struct pan_fb_preload_cache *cache, uint64_t gpu_id, uint32_t gpu_variant,
|
||||
struct pan_blend_shader_cache *blend_shader_cache, struct pan_pool *bin_pool,
|
||||
struct pan_pool *desc_pool)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ struct pan_jc;
|
|||
struct pan_pool;
|
||||
|
||||
struct pan_fb_preload_cache {
|
||||
unsigned gpu_id;
|
||||
uint64_t gpu_id;
|
||||
uint32_t gpu_variant;
|
||||
struct {
|
||||
struct pan_pool *pool;
|
||||
|
|
@ -34,7 +34,7 @@ struct pan_fb_preload_cache {
|
|||
|
||||
#ifdef PAN_ARCH
|
||||
void GENX(pan_fb_preload_cache_init)(
|
||||
struct pan_fb_preload_cache *cache, unsigned gpu_id, uint32_t gpu_variant,
|
||||
struct pan_fb_preload_cache *cache, uint64_t gpu_id, uint32_t gpu_variant,
|
||||
struct pan_blend_shader_cache *blend_shader_cache, struct pan_pool *bin_pool,
|
||||
struct pan_pool *desc_pool);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue