Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/fb/fbd.c
Show First 20 Lines • Show All 170 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
struct fb_info *info; | struct fb_info *info; | ||||
info = dev->si_drv1; | info = dev->si_drv1; | ||||
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; | ||||
return (0); | return (0); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 185 Lines • Show Last 20 Lines |