Contributors: 3
| Author |
Tokens |
Token Proportion |
Commits |
Commit Proportion |
| Alexandre Courbot |
189 |
90.87% |
3 |
60.00% |
| Danilo Krummrich |
13 |
6.25% |
1 |
20.00% |
| John Hubbard |
6 |
2.88% |
1 |
20.00% |
| Total |
208 |
|
5 |
|
// SPDX-License-Identifier: GPL-2.0
use kernel::{
io::Io,
prelude::*, //
};
use crate::{
driver::Bar0,
fb::hal::FbHal,
regs, //
};
fn vidmem_size_ga102(bar: &Bar0) -> u64 {
bar.read(regs::NV_USABLE_FB_SIZE_IN_MB).usable_fb_size()
}
struct Ga102;
impl FbHal for Ga102 {
fn read_sysmem_flush_page(&self, bar: &Bar0) -> u64 {
super::ga100::read_sysmem_flush_page_ga100(bar)
}
fn write_sysmem_flush_page(&self, bar: &Bar0, addr: u64) -> Result {
super::ga100::write_sysmem_flush_page_ga100(bar, addr);
Ok(())
}
fn supports_display(&self, bar: &Bar0) -> bool {
super::ga100::display_enabled_ga100(bar)
}
fn vidmem_size(&self, bar: &Bar0) -> u64 {
vidmem_size_ga102(bar)
}
}
const GA102: Ga102 = Ga102;
pub(super) const GA102_HAL: &dyn FbHal = &GA102;