Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/vt/hw/fb/vt_fb.c
Show First 20 Lines • Show All 134 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
struct fb_info *info; | struct fb_info *info; | ||||
info = vd->vd_softc; | info = vd->vd_softc; | ||||
if (info->fb_flags & FB_FLAG_NOMMAP) | if (info->fb_flags & FB_FLAG_NOMMAP) | ||||
return (ENODEV); | return (ENODEV); | ||||
if (offset >= 0 && offset < info->fb_size) { | if (offset < info->fb_size) { | ||||
if (info->fb_pbase == 0) { | if (info->fb_pbase == 0) { | ||||
*paddr = vtophys((uint8_t *)info->fb_vbase + offset); | *paddr = vtophys((uint8_t *)info->fb_vbase + offset); | ||||
} else { | } else { | ||||
*paddr = info->fb_pbase + offset; | *paddr = info->fb_pbase + offset; | ||||
if (info->fb_flags & FB_FLAG_MEMATTR) | if (info->fb_flags & FB_FLAG_MEMATTR) | ||||
*memattr = info->fb_memattr; | *memattr = info->fb_memattr; | ||||
#ifdef VM_MEMATTR_WRITE_COMBINING | #ifdef VM_MEMATTR_WRITE_COMBINING | ||||
else | else | ||||
▲ Show 20 Lines • Show All 383 Lines • Show Last 20 Lines |