mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
nouveau: Stash supported sector layout in screen
Older Tegra GPUs use a different sector bit swizzling layout than desktop and Xavier GPUs. Hence their format modifiers must be differentiated from those of other GPUs. As a precursor to supporting more expressive block linear format modifiers, deduce the sector layout used for a given GPU from its chipset and stash the layout in the nouveau screen structure. Signed-off-by: James Jones <jajones@nvidia.com> Tested-by: Karol Herbst <kherbst@redhat.com> Tested-by: Simon Ser <contact@emersion.fr> Reviewed-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3724>
This commit is contained in:
parent
c4cc3d915b
commit
ff534e1b50
2 changed files with 13 additions and 0 deletions
|
|
@ -275,6 +275,18 @@ nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev)
|
|||
} while ((start + screen->svm_cutout_size) < BITFIELD64_MASK(limit_bit));
|
||||
}
|
||||
|
||||
switch (dev->chipset) {
|
||||
case 0x0ea: /* TK1, GK20A */
|
||||
case 0x12b: /* TX1, GM20B */
|
||||
case 0x13b: /* TX2, GP10B */
|
||||
screen->tegra_sector_layout = true;
|
||||
break;
|
||||
default:
|
||||
/* Xavier's GPU and everything else */
|
||||
screen->tegra_sector_layout = false;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set default VRAM domain if not overridden
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ struct nouveau_screen {
|
|||
int64_t cpu_gpu_time_delta;
|
||||
|
||||
bool hint_buf_keep_sysmem_copy;
|
||||
bool tegra_sector_layout;
|
||||
|
||||
unsigned vram_domain;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue