mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 06:44:31 +00:00
Convert one more d_mmap_t consumer I missed in my previous commit.
This commit is contained in:
parent
ae64a900aa
commit
b9deb009c2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=111481
|
@ -1353,12 +1353,14 @@ gdc_blank_display(video_adapter_t *adp, int mode)
|
||||||
* Mmap frame buffer.
|
* Mmap frame buffer.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
gdc_mmap_buf(video_adapter_t *adp, vm_offset_t offset, int prot)
|
gdc_mmap_buf(video_adapter_t *adp, vm_offset_t offset, vm_offset_t *paddr,
|
||||||
|
int prot)
|
||||||
{
|
{
|
||||||
/* FIXME: is this correct? XXX */
|
/* FIXME: is this correct? XXX */
|
||||||
if (offset > VIDEO_BUF_SIZE - PAGE_SIZE)
|
if (offset > VIDEO_BUF_SIZE - PAGE_SIZE)
|
||||||
return -1;
|
return -1;
|
||||||
return i386_btop(adp->va_info.vi_window + offset);
|
*paddr = adp->va_info.vi_window + offset;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
@ -1353,12 +1353,14 @@ gdc_blank_display(video_adapter_t *adp, int mode)
|
||||||
* Mmap frame buffer.
|
* Mmap frame buffer.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
gdc_mmap_buf(video_adapter_t *adp, vm_offset_t offset, int prot)
|
gdc_mmap_buf(video_adapter_t *adp, vm_offset_t offset, vm_offset_t *paddr,
|
||||||
|
int prot)
|
||||||
{
|
{
|
||||||
/* FIXME: is this correct? XXX */
|
/* FIXME: is this correct? XXX */
|
||||||
if (offset > VIDEO_BUF_SIZE - PAGE_SIZE)
|
if (offset > VIDEO_BUF_SIZE - PAGE_SIZE)
|
||||||
return -1;
|
return -1;
|
||||||
return i386_btop(adp->va_info.vi_window + offset);
|
*paddr = adp->va_info.vi_window + offset;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Reference in a new issue