agp: clean up empty lines in .c and .h files
This commit is contained in:
parent
2ac05cef89
commit
4ce60b6549
@ -93,7 +93,6 @@ agp_find_caps(device_t dev)
|
||||
{
|
||||
int capreg;
|
||||
|
||||
|
||||
if (pci_find_cap(dev, PCIY_AGP, &capreg) != 0)
|
||||
capreg = 0;
|
||||
return (capreg);
|
||||
@ -357,7 +356,7 @@ agp_v3_enable(device_t dev, device_t mdev, u_int32_t mode)
|
||||
fw = (AGP_MODE_GET_FW(tstatus)
|
||||
& AGP_MODE_GET_FW(mstatus)
|
||||
& AGP_MODE_GET_FW(mode));
|
||||
|
||||
|
||||
/* Figure out the max rate */
|
||||
rate = (AGP_MODE_GET_RATE(tstatus)
|
||||
& AGP_MODE_GET_RATE(mstatus)
|
||||
@ -563,7 +562,7 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem,
|
||||
i = 0;
|
||||
goto bad;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Bind the individual pages and flush the chipset's
|
||||
* TLB.
|
||||
@ -638,7 +637,6 @@ agp_generic_unbind_memory(device_t dev, struct agp_memory *mem)
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Unbind the individual pages and flush the chipset's
|
||||
* TLB. Unwire the pages so they can be swapped.
|
||||
|
@ -130,7 +130,7 @@ agp_ali_attach(device_t dev)
|
||||
attbase = pci_read_config(dev, AGP_ALI_ATTBASE, 4);
|
||||
pci_write_config(dev, AGP_ALI_ATTBASE, gatt->ag_physical |
|
||||
(attbase & 0xfff), 4);
|
||||
|
||||
|
||||
/* Enable the TLB. */
|
||||
pci_write_config(dev, AGP_ALI_TLBCTRL, 0x10, 1);
|
||||
|
||||
@ -256,7 +256,6 @@ static device_method_t agp_ali_methods[] = {
|
||||
DEVMETHOD(agp_free_memory, agp_generic_free_memory),
|
||||
DEVMETHOD(agp_bind_memory, agp_generic_bind_memory),
|
||||
DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory),
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -252,7 +252,7 @@ agp_amd_attach(device_t dev)
|
||||
|
||||
/* Install the gatt. */
|
||||
WRITE4(AGP_AMD751_ATTBASE, gatt->ag_pdir);
|
||||
|
||||
|
||||
/* Enable synchronisation between host and agp. */
|
||||
pci_write_config(dev,
|
||||
AGP_AMD751_MODECTRL,
|
||||
@ -281,10 +281,10 @@ agp_amd_detach(device_t dev)
|
||||
/* Disable the TLB.. */
|
||||
WRITE2(AGP_AMD751_STATUS,
|
||||
READ2(AGP_AMD751_STATUS) & ~AGP_AMD751_STATUS_GCE);
|
||||
|
||||
|
||||
/* Disable host-agp sync */
|
||||
pci_write_config(dev, AGP_AMD751_MODECTRL, 0x00, 1);
|
||||
|
||||
|
||||
/* Clear the GATT base */
|
||||
WRITE4(AGP_AMD751_ATTBASE, 0);
|
||||
|
||||
@ -327,7 +327,7 @@ agp_amd_set_aperture(device_t dev, u_int32_t aperture)
|
||||
return EINVAL;
|
||||
|
||||
vas = ffs(aperture / 32*1024*1024) - 1;
|
||||
|
||||
|
||||
/*
|
||||
* While the size register is bits 1-3 of APCTRL, bit 0 must be
|
||||
* set for the size value to be 'valid'
|
||||
@ -395,7 +395,6 @@ static device_method_t agp_amd_methods[] = {
|
||||
DEVMETHOD(agp_free_memory, agp_generic_free_memory),
|
||||
DEVMETHOD(agp_bind_memory, agp_generic_bind_memory),
|
||||
DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory),
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -499,7 +499,6 @@ static device_method_t agp_amd64_methods[] = {
|
||||
DEVMETHOD(agp_free_memory, agp_generic_free_memory),
|
||||
DEVMETHOD(agp_bind_memory, agp_generic_bind_memory),
|
||||
DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory),
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -155,7 +155,7 @@ agp_apple_attach(device_t dev)
|
||||
AGP_SET_APERTURE(dev, sc->aperture);
|
||||
|
||||
/* XXX: U3 scratch page? */
|
||||
|
||||
|
||||
/* Enable the aperture and TLB. */
|
||||
AGP_FLUSH_TLB(dev);
|
||||
|
||||
@ -213,7 +213,7 @@ agp_apple_set_aperture(device_t dev, uint32_t aperture)
|
||||
|
||||
pci_write_config(dev, UNIN_AGP_GART_BASE,
|
||||
(sc->gatt->ag_physical & 0xfffff000) | aperture, 4);
|
||||
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -281,7 +281,6 @@ static device_method_t agp_apple_methods[] = {
|
||||
DEVMETHOD(agp_free_memory, agp_generic_free_memory),
|
||||
DEVMETHOD(agp_bind_memory, agp_generic_bind_memory),
|
||||
DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory),
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -75,7 +75,6 @@ struct agp_ati_softc {
|
||||
vm_offset_t ag_pdir; /* physical address of page dir */
|
||||
};
|
||||
|
||||
|
||||
static const char*
|
||||
agp_ati_match(device_t dev)
|
||||
{
|
||||
@ -167,7 +166,6 @@ agp_ati_alloc_gatt(device_t dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
agp_ati_attach(device_t dev)
|
||||
{
|
||||
@ -369,7 +367,6 @@ static device_method_t agp_ati_methods[] = {
|
||||
DEVMETHOD(agp_free_memory, agp_generic_free_memory),
|
||||
DEVMETHOD(agp_bind_memory, agp_generic_bind_memory),
|
||||
DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory),
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -1216,7 +1216,7 @@ agp_i830_install_gatt_init(struct agp_i810_softc *sc)
|
||||
pgtblctl = bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL);
|
||||
pgtblctl |= 1;
|
||||
bus_write_4(sc->sc_res[0], AGP_I810_PGTBL_CTL, pgtblctl);
|
||||
|
||||
|
||||
sc->gatt->ag_physical = pgtblctl & ~1;
|
||||
}
|
||||
|
||||
@ -1412,7 +1412,7 @@ agp_i810_set_aperture(device_t dev, u_int32_t aperture)
|
||||
miscc |= AGP_I810_MISCC_WINSIZE_32;
|
||||
else
|
||||
miscc |= AGP_I810_MISCC_WINSIZE_64;
|
||||
|
||||
|
||||
pci_write_config(sc->bdev, AGP_I810_MISCC, miscc, 2);
|
||||
return (0);
|
||||
}
|
||||
@ -1915,7 +1915,6 @@ static device_method_t agp_i810_methods[] = {
|
||||
DEVMETHOD(agp_bind_memory, agp_i810_bind_memory),
|
||||
DEVMETHOD(agp_unbind_memory, agp_i810_unbind_memory),
|
||||
DEVMETHOD(agp_chipset_flush, agp_intel_gtt_chipset_flush),
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -312,7 +312,7 @@ agp_intel_resume(device_t dev)
|
||||
{
|
||||
struct agp_intel_softc *sc;
|
||||
sc = device_get_softc(dev);
|
||||
|
||||
|
||||
AGP_SET_APERTURE(dev, sc->current_aperture);
|
||||
agp_intel_commit_gatt(dev);
|
||||
return (bus_generic_resume(dev));
|
||||
@ -422,7 +422,6 @@ static device_method_t agp_intel_methods[] = {
|
||||
DEVMETHOD(agp_free_memory, agp_generic_free_memory),
|
||||
DEVMETHOD(agp_bind_memory, agp_generic_bind_memory),
|
||||
DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory),
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -437,7 +437,6 @@ static device_method_t agp_nvidia_methods[] = {
|
||||
DEVMETHOD(agp_free_memory, agp_generic_free_memory),
|
||||
DEVMETHOD(agp_bind_memory, agp_generic_bind_memory),
|
||||
DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory),
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -155,7 +155,7 @@ agp_sis_attach(device_t dev)
|
||||
|
||||
/* Install the gatt. */
|
||||
pci_write_config(dev, AGP_SIS_ATTBASE, gatt->ag_physical, 4);
|
||||
|
||||
|
||||
/* Enable the aperture. */
|
||||
pci_write_config(dev, AGP_SIS_WINCTRL,
|
||||
pci_read_config(dev, AGP_SIS_WINCTRL, 1) | 3, 1);
|
||||
@ -218,7 +218,7 @@ agp_sis_set_aperture(device_t dev, u_int32_t aperture)
|
||||
return EINVAL;
|
||||
|
||||
gws = ffs(aperture / 4*1024*1024) - 1;
|
||||
|
||||
|
||||
pci_write_config(dev, AGP_SIS_WINCTRL,
|
||||
((pci_read_config(dev, AGP_SIS_WINCTRL, 1) & ~0x70)
|
||||
| gws << 4), 1);
|
||||
@ -276,7 +276,6 @@ static device_method_t agp_sis_methods[] = {
|
||||
DEVMETHOD(agp_free_memory, agp_generic_free_memory),
|
||||
DEVMETHOD(agp_bind_memory, agp_generic_bind_memory),
|
||||
DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory),
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -176,7 +176,7 @@ agp_via_attach(device_t dev)
|
||||
if ((agpsel & (1 << 1)) == 0)
|
||||
sc->regs = via_v3_regs;
|
||||
}
|
||||
|
||||
|
||||
error = agp_generic_attach(dev);
|
||||
if (error)
|
||||
return error;
|
||||
@ -388,7 +388,7 @@ agp_via_flush_tlb(device_t dev)
|
||||
~(1 << 7), 4);
|
||||
pci_write_config(dev, sc->regs[REG_GARTCTRL], gartctrl, 4);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
static device_method_t agp_via_methods[] = {
|
||||
@ -411,7 +411,6 @@ static device_method_t agp_via_methods[] = {
|
||||
DEVMETHOD(agp_free_memory, agp_generic_free_memory),
|
||||
DEVMETHOD(agp_bind_memory, agp_generic_bind_memory),
|
||||
DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory),
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user