FILE
gb202.c
File preview with syntax highlighting.
linux-6.19.14/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gb202.c
1/* SPDX-License-Identifier: MIT 2 * 3 * Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved. 4 */ 5#include "priv.h" 6 7#include <nvhw/drf.h> 8#include <nvhw/ref/gb10b/dev_fbhub.h> 9 10static void 11gb202_fb_sysmem_flush_page_init(struct nvkm_fb *fb) 12{ 13 struct nvkm_device *device = fb->subdev.device; 14 const u64 addr = fb->sysmem.flush_page_addr; 15 16 // Ensure that the address is within hardware limits 17 WARN_ON(fb->sysmem.flush_page_addr > DMA_BIT_MASK(52)); 18 19 nvkm_wr32(device, NV_PFB_FBHUB0_PCIE_FLUSH_SYSMEM_ADDR_HI, upper_32_bits(addr)); 20 nvkm_wr32(device, NV_PFB_FBHUB0_PCIE_FLUSH_SYSMEM_ADDR_LO, lower_32_bits(addr)); 21} 22 23static const struct nvkm_fb_func 24gb202_fb = { 25 .sysmem.flush_page_init = gb202_fb_sysmem_flush_page_init, 26 .vidmem.size = ga102_fb_vidmem_size, 27}; 28 29int 30gb202_fb_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, struct nvkm_fb **pfb) 31{ 32 return r535_fb_new(&gb202_fb, device, type, inst, pfb); 33}
~/
Read-only file preview.