You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'drm-for-2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-for-2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (207 commits) drm/radeon/kms/pm/r600: select the mid clock mode for single head low profile drm/radeon: fix power supply kconfig interaction. drm/radeon/kms: record object that have been list reserved drm/radeon: AGP memory is only I/O if the aperture can be mapped by the CPU. drm/radeon/kms: don't default display priority to high on rs4xx drm/edid: fix typo in 1600x1200@75 mode drm/nouveau: fix i2c-related init table handlers drm/nouveau: support init table i2c device identifier 0x81 drm/nouveau: ensure we've parsed i2c table entry for INIT_*I2C* handlers drm/nouveau: display error message for any failed init table opcode drm/nouveau: fix init table handlers to return proper error codes drm/nv50: support fractional feedback divider on newer chips drm/nv50: fix monitor detection on certain chipsets drm/nv50: store full dcb i2c entry from vbios drm/nv50: fix suspend/resume with DP outputs drm/nv50: output calculated crtc pll when debugging on drm/nouveau: dump pll limits entries when debugging is on drm/nouveau: bios parser fixes for eDP boards drm/nouveau: fix a nouveau_bo dereference after it's been destroyed drm/nv40: remove some completed ctxprog TODOs ...
This commit is contained in:
@@ -14,7 +14,7 @@ DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \
|
|||||||
genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
|
genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
|
||||||
mac80211.xml debugobjects.xml sh.xml regulator.xml \
|
mac80211.xml debugobjects.xml sh.xml regulator.xml \
|
||||||
alsa-driver-api.xml writing-an-alsa-driver.xml \
|
alsa-driver-api.xml writing-an-alsa-driver.xml \
|
||||||
tracepoint.xml media.xml
|
tracepoint.xml media.xml drm.xml
|
||||||
|
|
||||||
###
|
###
|
||||||
# The build process is as follows (targets):
|
# The build process is as follows (targets):
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -145,9 +145,11 @@ int set_memory_np(unsigned long addr, int numpages);
|
|||||||
int set_memory_4k(unsigned long addr, int numpages);
|
int set_memory_4k(unsigned long addr, int numpages);
|
||||||
|
|
||||||
int set_memory_array_uc(unsigned long *addr, int addrinarray);
|
int set_memory_array_uc(unsigned long *addr, int addrinarray);
|
||||||
|
int set_memory_array_wc(unsigned long *addr, int addrinarray);
|
||||||
int set_memory_array_wb(unsigned long *addr, int addrinarray);
|
int set_memory_array_wb(unsigned long *addr, int addrinarray);
|
||||||
|
|
||||||
int set_pages_array_uc(struct page **pages, int addrinarray);
|
int set_pages_array_uc(struct page **pages, int addrinarray);
|
||||||
|
int set_pages_array_wc(struct page **pages, int addrinarray);
|
||||||
int set_pages_array_wb(struct page **pages, int addrinarray);
|
int set_pages_array_wb(struct page **pages, int addrinarray);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
+45
-8
@@ -997,7 +997,8 @@ out_err:
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(set_memory_uc);
|
EXPORT_SYMBOL(set_memory_uc);
|
||||||
|
|
||||||
int set_memory_array_uc(unsigned long *addr, int addrinarray)
|
int _set_memory_array(unsigned long *addr, int addrinarray,
|
||||||
|
unsigned long new_type)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
int ret;
|
int ret;
|
||||||
@@ -1007,13 +1008,19 @@ int set_memory_array_uc(unsigned long *addr, int addrinarray)
|
|||||||
*/
|
*/
|
||||||
for (i = 0; i < addrinarray; i++) {
|
for (i = 0; i < addrinarray; i++) {
|
||||||
ret = reserve_memtype(__pa(addr[i]), __pa(addr[i]) + PAGE_SIZE,
|
ret = reserve_memtype(__pa(addr[i]), __pa(addr[i]) + PAGE_SIZE,
|
||||||
_PAGE_CACHE_UC_MINUS, NULL);
|
new_type, NULL);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = change_page_attr_set(addr, addrinarray,
|
ret = change_page_attr_set(addr, addrinarray,
|
||||||
__pgprot(_PAGE_CACHE_UC_MINUS), 1);
|
__pgprot(_PAGE_CACHE_UC_MINUS), 1);
|
||||||
|
|
||||||
|
if (!ret && new_type == _PAGE_CACHE_WC)
|
||||||
|
ret = change_page_attr_set_clr(addr, addrinarray,
|
||||||
|
__pgprot(_PAGE_CACHE_WC),
|
||||||
|
__pgprot(_PAGE_CACHE_MASK),
|
||||||
|
0, CPA_ARRAY, NULL);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
|
|
||||||
@@ -1025,8 +1032,19 @@ out_free:
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int set_memory_array_uc(unsigned long *addr, int addrinarray)
|
||||||
|
{
|
||||||
|
return _set_memory_array(addr, addrinarray, _PAGE_CACHE_UC_MINUS);
|
||||||
|
}
|
||||||
EXPORT_SYMBOL(set_memory_array_uc);
|
EXPORT_SYMBOL(set_memory_array_uc);
|
||||||
|
|
||||||
|
int set_memory_array_wc(unsigned long *addr, int addrinarray)
|
||||||
|
{
|
||||||
|
return _set_memory_array(addr, addrinarray, _PAGE_CACHE_WC);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(set_memory_array_wc);
|
||||||
|
|
||||||
int _set_memory_wc(unsigned long addr, int numpages)
|
int _set_memory_wc(unsigned long addr, int numpages)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@@ -1153,26 +1171,34 @@ int set_pages_uc(struct page *page, int numpages)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(set_pages_uc);
|
EXPORT_SYMBOL(set_pages_uc);
|
||||||
|
|
||||||
int set_pages_array_uc(struct page **pages, int addrinarray)
|
static int _set_pages_array(struct page **pages, int addrinarray,
|
||||||
|
unsigned long new_type)
|
||||||
{
|
{
|
||||||
unsigned long start;
|
unsigned long start;
|
||||||
unsigned long end;
|
unsigned long end;
|
||||||
int i;
|
int i;
|
||||||
int free_idx;
|
int free_idx;
|
||||||
|
int ret;
|
||||||
|
|
||||||
for (i = 0; i < addrinarray; i++) {
|
for (i = 0; i < addrinarray; i++) {
|
||||||
if (PageHighMem(pages[i]))
|
if (PageHighMem(pages[i]))
|
||||||
continue;
|
continue;
|
||||||
start = page_to_pfn(pages[i]) << PAGE_SHIFT;
|
start = page_to_pfn(pages[i]) << PAGE_SHIFT;
|
||||||
end = start + PAGE_SIZE;
|
end = start + PAGE_SIZE;
|
||||||
if (reserve_memtype(start, end, _PAGE_CACHE_UC_MINUS, NULL))
|
if (reserve_memtype(start, end, new_type, NULL))
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cpa_set_pages_array(pages, addrinarray,
|
ret = cpa_set_pages_array(pages, addrinarray,
|
||||||
__pgprot(_PAGE_CACHE_UC_MINUS)) == 0) {
|
__pgprot(_PAGE_CACHE_UC_MINUS));
|
||||||
return 0; /* Success */
|
if (!ret && new_type == _PAGE_CACHE_WC)
|
||||||
}
|
ret = change_page_attr_set_clr(NULL, addrinarray,
|
||||||
|
__pgprot(_PAGE_CACHE_WC),
|
||||||
|
__pgprot(_PAGE_CACHE_MASK),
|
||||||
|
0, CPA_PAGES_ARRAY, pages);
|
||||||
|
if (ret)
|
||||||
|
goto err_out;
|
||||||
|
return 0; /* Success */
|
||||||
err_out:
|
err_out:
|
||||||
free_idx = i;
|
free_idx = i;
|
||||||
for (i = 0; i < free_idx; i++) {
|
for (i = 0; i < free_idx; i++) {
|
||||||
@@ -1184,8 +1210,19 @@ err_out:
|
|||||||
}
|
}
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int set_pages_array_uc(struct page **pages, int addrinarray)
|
||||||
|
{
|
||||||
|
return _set_pages_array(pages, addrinarray, _PAGE_CACHE_UC_MINUS);
|
||||||
|
}
|
||||||
EXPORT_SYMBOL(set_pages_array_uc);
|
EXPORT_SYMBOL(set_pages_array_uc);
|
||||||
|
|
||||||
|
int set_pages_array_wc(struct page **pages, int addrinarray)
|
||||||
|
{
|
||||||
|
return _set_pages_array(pages, addrinarray, _PAGE_CACHE_WC);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(set_pages_array_wc);
|
||||||
|
|
||||||
int set_pages_wb(struct page *page, int numpages)
|
int set_pages_wb(struct page *page, int numpages)
|
||||||
{
|
{
|
||||||
unsigned long addr = (unsigned long)page_address(page);
|
unsigned long addr = (unsigned long)page_address(page);
|
||||||
|
|||||||
@@ -178,86 +178,6 @@ struct agp_bridge_data {
|
|||||||
#define PGE_EMPTY(b, p) (!(p) || (p) == (unsigned long) (b)->scratch_page)
|
#define PGE_EMPTY(b, p) (!(p) || (p) == (unsigned long) (b)->scratch_page)
|
||||||
|
|
||||||
|
|
||||||
/* Intel registers */
|
|
||||||
#define INTEL_APSIZE 0xb4
|
|
||||||
#define INTEL_ATTBASE 0xb8
|
|
||||||
#define INTEL_AGPCTRL 0xb0
|
|
||||||
#define INTEL_NBXCFG 0x50
|
|
||||||
#define INTEL_ERRSTS 0x91
|
|
||||||
|
|
||||||
/* Intel i830 registers */
|
|
||||||
#define I830_GMCH_CTRL 0x52
|
|
||||||
#define I830_GMCH_ENABLED 0x4
|
|
||||||
#define I830_GMCH_MEM_MASK 0x1
|
|
||||||
#define I830_GMCH_MEM_64M 0x1
|
|
||||||
#define I830_GMCH_MEM_128M 0
|
|
||||||
#define I830_GMCH_GMS_MASK 0x70
|
|
||||||
#define I830_GMCH_GMS_DISABLED 0x00
|
|
||||||
#define I830_GMCH_GMS_LOCAL 0x10
|
|
||||||
#define I830_GMCH_GMS_STOLEN_512 0x20
|
|
||||||
#define I830_GMCH_GMS_STOLEN_1024 0x30
|
|
||||||
#define I830_GMCH_GMS_STOLEN_8192 0x40
|
|
||||||
#define I830_RDRAM_CHANNEL_TYPE 0x03010
|
|
||||||
#define I830_RDRAM_ND(x) (((x) & 0x20) >> 5)
|
|
||||||
#define I830_RDRAM_DDT(x) (((x) & 0x18) >> 3)
|
|
||||||
|
|
||||||
/* This one is for I830MP w. an external graphic card */
|
|
||||||
#define INTEL_I830_ERRSTS 0x92
|
|
||||||
|
|
||||||
/* Intel 855GM/852GM registers */
|
|
||||||
#define I855_GMCH_GMS_MASK 0xF0
|
|
||||||
#define I855_GMCH_GMS_STOLEN_0M 0x0
|
|
||||||
#define I855_GMCH_GMS_STOLEN_1M (0x1 << 4)
|
|
||||||
#define I855_GMCH_GMS_STOLEN_4M (0x2 << 4)
|
|
||||||
#define I855_GMCH_GMS_STOLEN_8M (0x3 << 4)
|
|
||||||
#define I855_GMCH_GMS_STOLEN_16M (0x4 << 4)
|
|
||||||
#define I855_GMCH_GMS_STOLEN_32M (0x5 << 4)
|
|
||||||
#define I85X_CAPID 0x44
|
|
||||||
#define I85X_VARIANT_MASK 0x7
|
|
||||||
#define I85X_VARIANT_SHIFT 5
|
|
||||||
#define I855_GME 0x0
|
|
||||||
#define I855_GM 0x4
|
|
||||||
#define I852_GME 0x2
|
|
||||||
#define I852_GM 0x5
|
|
||||||
|
|
||||||
/* Intel i845 registers */
|
|
||||||
#define INTEL_I845_AGPM 0x51
|
|
||||||
#define INTEL_I845_ERRSTS 0xc8
|
|
||||||
|
|
||||||
/* Intel i860 registers */
|
|
||||||
#define INTEL_I860_MCHCFG 0x50
|
|
||||||
#define INTEL_I860_ERRSTS 0xc8
|
|
||||||
|
|
||||||
/* Intel i810 registers */
|
|
||||||
#define I810_GMADDR 0x10
|
|
||||||
#define I810_MMADDR 0x14
|
|
||||||
#define I810_PTE_BASE 0x10000
|
|
||||||
#define I810_PTE_MAIN_UNCACHED 0x00000000
|
|
||||||
#define I810_PTE_LOCAL 0x00000002
|
|
||||||
#define I810_PTE_VALID 0x00000001
|
|
||||||
#define I830_PTE_SYSTEM_CACHED 0x00000006
|
|
||||||
#define I810_SMRAM_MISCC 0x70
|
|
||||||
#define I810_GFX_MEM_WIN_SIZE 0x00010000
|
|
||||||
#define I810_GFX_MEM_WIN_32M 0x00010000
|
|
||||||
#define I810_GMS 0x000000c0
|
|
||||||
#define I810_GMS_DISABLE 0x00000000
|
|
||||||
#define I810_PGETBL_CTL 0x2020
|
|
||||||
#define I810_PGETBL_ENABLED 0x00000001
|
|
||||||
#define I965_PGETBL_SIZE_MASK 0x0000000e
|
|
||||||
#define I965_PGETBL_SIZE_512KB (0 << 1)
|
|
||||||
#define I965_PGETBL_SIZE_256KB (1 << 1)
|
|
||||||
#define I965_PGETBL_SIZE_128KB (2 << 1)
|
|
||||||
#define I965_PGETBL_SIZE_1MB (3 << 1)
|
|
||||||
#define I965_PGETBL_SIZE_2MB (4 << 1)
|
|
||||||
#define I965_PGETBL_SIZE_1_5MB (5 << 1)
|
|
||||||
#define G33_PGETBL_SIZE_MASK (3 << 8)
|
|
||||||
#define G33_PGETBL_SIZE_1M (1 << 8)
|
|
||||||
#define G33_PGETBL_SIZE_2M (2 << 8)
|
|
||||||
|
|
||||||
#define I810_DRAM_CTL 0x3000
|
|
||||||
#define I810_DRAM_ROW_0 0x00000001
|
|
||||||
#define I810_DRAM_ROW_0_SDRAM 0x00000001
|
|
||||||
|
|
||||||
struct agp_device_ids {
|
struct agp_device_ids {
|
||||||
unsigned short device_id; /* first, to make table easier to read */
|
unsigned short device_id; /* first, to make table easier to read */
|
||||||
enum chipset_type chipset;
|
enum chipset_type chipset;
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ static const struct agp_bridge_driver ali_generic_bridge = {
|
|||||||
.aperture_sizes = ali_generic_sizes,
|
.aperture_sizes = ali_generic_sizes,
|
||||||
.size_type = U32_APER_SIZE,
|
.size_type = U32_APER_SIZE,
|
||||||
.num_aperture_sizes = 7,
|
.num_aperture_sizes = 7,
|
||||||
|
.needs_scratch_page = true,
|
||||||
.configure = ali_configure,
|
.configure = ali_configure,
|
||||||
.fetch_size = ali_fetch_size,
|
.fetch_size = ali_fetch_size,
|
||||||
.cleanup = ali_cleanup,
|
.cleanup = ali_cleanup,
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ static int amd_create_gatt_table(struct agp_bridge_data *bridge)
|
|||||||
{
|
{
|
||||||
struct aper_size_info_lvl2 *value;
|
struct aper_size_info_lvl2 *value;
|
||||||
struct amd_page_map page_dir;
|
struct amd_page_map page_dir;
|
||||||
|
unsigned long __iomem *cur_gatt;
|
||||||
unsigned long addr;
|
unsigned long addr;
|
||||||
int retval;
|
int retval;
|
||||||
u32 temp;
|
u32 temp;
|
||||||
@@ -178,6 +179,13 @@ static int amd_create_gatt_table(struct agp_bridge_data *bridge)
|
|||||||
readl(page_dir.remapped+GET_PAGE_DIR_OFF(addr)); /* PCI Posting. */
|
readl(page_dir.remapped+GET_PAGE_DIR_OFF(addr)); /* PCI Posting. */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < value->num_entries; i++) {
|
||||||
|
addr = (i * PAGE_SIZE) + agp_bridge->gart_bus_addr;
|
||||||
|
cur_gatt = GET_GATT(addr);
|
||||||
|
writel(agp_bridge->scratch_page, cur_gatt+GET_GATT_OFF(addr));
|
||||||
|
readl(cur_gatt+GET_GATT_OFF(addr)); /* PCI Posting. */
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -375,6 +383,7 @@ static const struct agp_bridge_driver amd_irongate_driver = {
|
|||||||
.aperture_sizes = amd_irongate_sizes,
|
.aperture_sizes = amd_irongate_sizes,
|
||||||
.size_type = LVL2_APER_SIZE,
|
.size_type = LVL2_APER_SIZE,
|
||||||
.num_aperture_sizes = 7,
|
.num_aperture_sizes = 7,
|
||||||
|
.needs_scratch_page = true,
|
||||||
.configure = amd_irongate_configure,
|
.configure = amd_irongate_configure,
|
||||||
.fetch_size = amd_irongate_fetch_size,
|
.fetch_size = amd_irongate_fetch_size,
|
||||||
.cleanup = amd_irongate_cleanup,
|
.cleanup = amd_irongate_cleanup,
|
||||||
|
|||||||
@@ -210,6 +210,7 @@ static const struct agp_bridge_driver amd_8151_driver = {
|
|||||||
.aperture_sizes = amd_8151_sizes,
|
.aperture_sizes = amd_8151_sizes,
|
||||||
.size_type = U32_APER_SIZE,
|
.size_type = U32_APER_SIZE,
|
||||||
.num_aperture_sizes = 7,
|
.num_aperture_sizes = 7,
|
||||||
|
.needs_scratch_page = true,
|
||||||
.configure = amd_8151_configure,
|
.configure = amd_8151_configure,
|
||||||
.fetch_size = amd64_fetch_size,
|
.fetch_size = amd64_fetch_size,
|
||||||
.cleanup = amd64_cleanup,
|
.cleanup = amd64_cleanup,
|
||||||
@@ -499,6 +500,10 @@ static int __devinit agp_amd64_probe(struct pci_dev *pdev,
|
|||||||
u8 cap_ptr;
|
u8 cap_ptr;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
/* The Highlander principle */
|
||||||
|
if (agp_bridges_found)
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP);
|
cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP);
|
||||||
if (!cap_ptr)
|
if (!cap_ptr)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
@@ -562,6 +567,8 @@ static void __devexit agp_amd64_remove(struct pci_dev *pdev)
|
|||||||
amd64_aperture_sizes[bridge->aperture_size_idx].size);
|
amd64_aperture_sizes[bridge->aperture_size_idx].size);
|
||||||
agp_remove_bridge(bridge);
|
agp_remove_bridge(bridge);
|
||||||
agp_put_bridge(bridge);
|
agp_put_bridge(bridge);
|
||||||
|
|
||||||
|
agp_bridges_found--;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
@@ -709,6 +716,11 @@ static struct pci_device_id agp_amd64_pci_table[] = {
|
|||||||
|
|
||||||
MODULE_DEVICE_TABLE(pci, agp_amd64_pci_table);
|
MODULE_DEVICE_TABLE(pci, agp_amd64_pci_table);
|
||||||
|
|
||||||
|
static DEFINE_PCI_DEVICE_TABLE(agp_amd64_pci_promisc_table) = {
|
||||||
|
{ PCI_DEVICE_CLASS(0, 0) },
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
|
||||||
static struct pci_driver agp_amd64_pci_driver = {
|
static struct pci_driver agp_amd64_pci_driver = {
|
||||||
.name = "agpgart-amd64",
|
.name = "agpgart-amd64",
|
||||||
.id_table = agp_amd64_pci_table,
|
.id_table = agp_amd64_pci_table,
|
||||||
@@ -734,7 +746,6 @@ int __init agp_amd64_init(void)
|
|||||||
return err;
|
return err;
|
||||||
|
|
||||||
if (agp_bridges_found == 0) {
|
if (agp_bridges_found == 0) {
|
||||||
struct pci_dev *dev;
|
|
||||||
if (!agp_try_unsupported && !agp_try_unsupported_boot) {
|
if (!agp_try_unsupported && !agp_try_unsupported_boot) {
|
||||||
printk(KERN_INFO PFX "No supported AGP bridge found.\n");
|
printk(KERN_INFO PFX "No supported AGP bridge found.\n");
|
||||||
#ifdef MODULE
|
#ifdef MODULE
|
||||||
@@ -750,17 +761,10 @@ int __init agp_amd64_init(void)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
/* Look for any AGP bridge */
|
/* Look for any AGP bridge */
|
||||||
dev = NULL;
|
agp_amd64_pci_driver.id_table = agp_amd64_pci_promisc_table;
|
||||||
err = -ENODEV;
|
err = driver_attach(&agp_amd64_pci_driver.driver);
|
||||||
for_each_pci_dev(dev) {
|
if (err == 0 && agp_bridges_found == 0)
|
||||||
if (!pci_find_capability(dev, PCI_CAP_ID_AGP))
|
err = -ENODEV;
|
||||||
continue;
|
|
||||||
/* Only one bridge supported right now */
|
|
||||||
if (agp_amd64_probe(dev, NULL) == 0) {
|
|
||||||
err = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -341,6 +341,7 @@ static int ati_create_gatt_table(struct agp_bridge_data *bridge)
|
|||||||
{
|
{
|
||||||
struct aper_size_info_lvl2 *value;
|
struct aper_size_info_lvl2 *value;
|
||||||
struct ati_page_map page_dir;
|
struct ati_page_map page_dir;
|
||||||
|
unsigned long __iomem *cur_gatt;
|
||||||
unsigned long addr;
|
unsigned long addr;
|
||||||
int retval;
|
int retval;
|
||||||
u32 temp;
|
u32 temp;
|
||||||
@@ -395,6 +396,12 @@ static int ati_create_gatt_table(struct agp_bridge_data *bridge)
|
|||||||
readl(page_dir.remapped+GET_PAGE_DIR_OFF(addr)); /* PCI Posting. */
|
readl(page_dir.remapped+GET_PAGE_DIR_OFF(addr)); /* PCI Posting. */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < value->num_entries; i++) {
|
||||||
|
addr = (i * PAGE_SIZE) + agp_bridge->gart_bus_addr;
|
||||||
|
cur_gatt = GET_GATT(addr);
|
||||||
|
writel(agp_bridge->scratch_page, cur_gatt+GET_GATT_OFF(addr));
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -415,6 +422,7 @@ static const struct agp_bridge_driver ati_generic_bridge = {
|
|||||||
.aperture_sizes = ati_generic_sizes,
|
.aperture_sizes = ati_generic_sizes,
|
||||||
.size_type = LVL2_APER_SIZE,
|
.size_type = LVL2_APER_SIZE,
|
||||||
.num_aperture_sizes = 7,
|
.num_aperture_sizes = 7,
|
||||||
|
.needs_scratch_page = true,
|
||||||
.configure = ati_configure,
|
.configure = ati_configure,
|
||||||
.fetch_size = ati_fetch_size,
|
.fetch_size = ati_fetch_size,
|
||||||
.cleanup = ati_cleanup,
|
.cleanup = ati_cleanup,
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
#include <linux/page-flags.h>
|
#include <linux/page-flags.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include "agp.h"
|
#include "agp.h"
|
||||||
|
#include "intel-agp.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The real differences to the generic AGP code is
|
* The real differences to the generic AGP code is
|
||||||
|
|||||||
+111
-1772
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,239 @@
|
|||||||
|
/*
|
||||||
|
* Common Intel AGPGART and GTT definitions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Intel registers */
|
||||||
|
#define INTEL_APSIZE 0xb4
|
||||||
|
#define INTEL_ATTBASE 0xb8
|
||||||
|
#define INTEL_AGPCTRL 0xb0
|
||||||
|
#define INTEL_NBXCFG 0x50
|
||||||
|
#define INTEL_ERRSTS 0x91
|
||||||
|
|
||||||
|
/* Intel i830 registers */
|
||||||
|
#define I830_GMCH_CTRL 0x52
|
||||||
|
#define I830_GMCH_ENABLED 0x4
|
||||||
|
#define I830_GMCH_MEM_MASK 0x1
|
||||||
|
#define I830_GMCH_MEM_64M 0x1
|
||||||
|
#define I830_GMCH_MEM_128M 0
|
||||||
|
#define I830_GMCH_GMS_MASK 0x70
|
||||||
|
#define I830_GMCH_GMS_DISABLED 0x00
|
||||||
|
#define I830_GMCH_GMS_LOCAL 0x10
|
||||||
|
#define I830_GMCH_GMS_STOLEN_512 0x20
|
||||||
|
#define I830_GMCH_GMS_STOLEN_1024 0x30
|
||||||
|
#define I830_GMCH_GMS_STOLEN_8192 0x40
|
||||||
|
#define I830_RDRAM_CHANNEL_TYPE 0x03010
|
||||||
|
#define I830_RDRAM_ND(x) (((x) & 0x20) >> 5)
|
||||||
|
#define I830_RDRAM_DDT(x) (((x) & 0x18) >> 3)
|
||||||
|
|
||||||
|
/* This one is for I830MP w. an external graphic card */
|
||||||
|
#define INTEL_I830_ERRSTS 0x92
|
||||||
|
|
||||||
|
/* Intel 855GM/852GM registers */
|
||||||
|
#define I855_GMCH_GMS_MASK 0xF0
|
||||||
|
#define I855_GMCH_GMS_STOLEN_0M 0x0
|
||||||
|
#define I855_GMCH_GMS_STOLEN_1M (0x1 << 4)
|
||||||
|
#define I855_GMCH_GMS_STOLEN_4M (0x2 << 4)
|
||||||
|
#define I855_GMCH_GMS_STOLEN_8M (0x3 << 4)
|
||||||
|
#define I855_GMCH_GMS_STOLEN_16M (0x4 << 4)
|
||||||
|
#define I855_GMCH_GMS_STOLEN_32M (0x5 << 4)
|
||||||
|
#define I85X_CAPID 0x44
|
||||||
|
#define I85X_VARIANT_MASK 0x7
|
||||||
|
#define I85X_VARIANT_SHIFT 5
|
||||||
|
#define I855_GME 0x0
|
||||||
|
#define I855_GM 0x4
|
||||||
|
#define I852_GME 0x2
|
||||||
|
#define I852_GM 0x5
|
||||||
|
|
||||||
|
/* Intel i845 registers */
|
||||||
|
#define INTEL_I845_AGPM 0x51
|
||||||
|
#define INTEL_I845_ERRSTS 0xc8
|
||||||
|
|
||||||
|
/* Intel i860 registers */
|
||||||
|
#define INTEL_I860_MCHCFG 0x50
|
||||||
|
#define INTEL_I860_ERRSTS 0xc8
|
||||||
|
|
||||||
|
/* Intel i810 registers */
|
||||||
|
#define I810_GMADDR 0x10
|
||||||
|
#define I810_MMADDR 0x14
|
||||||
|
#define I810_PTE_BASE 0x10000
|
||||||
|
#define I810_PTE_MAIN_UNCACHED 0x00000000
|
||||||
|
#define I810_PTE_LOCAL 0x00000002
|
||||||
|
#define I810_PTE_VALID 0x00000001
|
||||||
|
#define I830_PTE_SYSTEM_CACHED 0x00000006
|
||||||
|
#define I810_SMRAM_MISCC 0x70
|
||||||
|
#define I810_GFX_MEM_WIN_SIZE 0x00010000
|
||||||
|
#define I810_GFX_MEM_WIN_32M 0x00010000
|
||||||
|
#define I810_GMS 0x000000c0
|
||||||
|
#define I810_GMS_DISABLE 0x00000000
|
||||||
|
#define I810_PGETBL_CTL 0x2020
|
||||||
|
#define I810_PGETBL_ENABLED 0x00000001
|
||||||
|
#define I965_PGETBL_SIZE_MASK 0x0000000e
|
||||||
|
#define I965_PGETBL_SIZE_512KB (0 << 1)
|
||||||
|
#define I965_PGETBL_SIZE_256KB (1 << 1)
|
||||||
|
#define I965_PGETBL_SIZE_128KB (2 << 1)
|
||||||
|
#define I965_PGETBL_SIZE_1MB (3 << 1)
|
||||||
|
#define I965_PGETBL_SIZE_2MB (4 << 1)
|
||||||
|
#define I965_PGETBL_SIZE_1_5MB (5 << 1)
|
||||||
|
#define G33_PGETBL_SIZE_MASK (3 << 8)
|
||||||
|
#define G33_PGETBL_SIZE_1M (1 << 8)
|
||||||
|
#define G33_PGETBL_SIZE_2M (2 << 8)
|
||||||
|
|
||||||
|
#define I810_DRAM_CTL 0x3000
|
||||||
|
#define I810_DRAM_ROW_0 0x00000001
|
||||||
|
#define I810_DRAM_ROW_0_SDRAM 0x00000001
|
||||||
|
|
||||||
|
/* Intel 815 register */
|
||||||
|
#define INTEL_815_APCONT 0x51
|
||||||
|
#define INTEL_815_ATTBASE_MASK ~0x1FFFFFFF
|
||||||
|
|
||||||
|
/* Intel i820 registers */
|
||||||
|
#define INTEL_I820_RDCR 0x51
|
||||||
|
#define INTEL_I820_ERRSTS 0xc8
|
||||||
|
|
||||||
|
/* Intel i840 registers */
|
||||||
|
#define INTEL_I840_MCHCFG 0x50
|
||||||
|
#define INTEL_I840_ERRSTS 0xc8
|
||||||
|
|
||||||
|
/* Intel i850 registers */
|
||||||
|
#define INTEL_I850_MCHCFG 0x50
|
||||||
|
#define INTEL_I850_ERRSTS 0xc8
|
||||||
|
|
||||||
|
/* intel 915G registers */
|
||||||
|
#define I915_GMADDR 0x18
|
||||||
|
#define I915_MMADDR 0x10
|
||||||
|
#define I915_PTEADDR 0x1C
|
||||||
|
#define I915_GMCH_GMS_STOLEN_48M (0x6 << 4)
|
||||||
|
#define I915_GMCH_GMS_STOLEN_64M (0x7 << 4)
|
||||||
|
#define G33_GMCH_GMS_STOLEN_128M (0x8 << 4)
|
||||||
|
#define G33_GMCH_GMS_STOLEN_256M (0x9 << 4)
|
||||||
|
#define INTEL_GMCH_GMS_STOLEN_96M (0xa << 4)
|
||||||
|
#define INTEL_GMCH_GMS_STOLEN_160M (0xb << 4)
|
||||||
|
#define INTEL_GMCH_GMS_STOLEN_224M (0xc << 4)
|
||||||
|
#define INTEL_GMCH_GMS_STOLEN_352M (0xd << 4)
|
||||||
|
|
||||||
|
#define I915_IFPADDR 0x60
|
||||||
|
|
||||||
|
/* Intel 965G registers */
|
||||||
|
#define I965_MSAC 0x62
|
||||||
|
#define I965_IFPADDR 0x70
|
||||||
|
|
||||||
|
/* Intel 7505 registers */
|
||||||
|
#define INTEL_I7505_APSIZE 0x74
|
||||||
|
#define INTEL_I7505_NCAPID 0x60
|
||||||
|
#define INTEL_I7505_NISTAT 0x6c
|
||||||
|
#define INTEL_I7505_ATTBASE 0x78
|
||||||
|
#define INTEL_I7505_ERRSTS 0x42
|
||||||
|
#define INTEL_I7505_AGPCTRL 0x70
|
||||||
|
#define INTEL_I7505_MCHCFG 0x50
|
||||||
|
|
||||||
|
#define SNB_GMCH_CTRL 0x50
|
||||||
|
#define SNB_GMCH_GMS_STOLEN_MASK 0xF8
|
||||||
|
#define SNB_GMCH_GMS_STOLEN_32M (1 << 3)
|
||||||
|
#define SNB_GMCH_GMS_STOLEN_64M (2 << 3)
|
||||||
|
#define SNB_GMCH_GMS_STOLEN_96M (3 << 3)
|
||||||
|
#define SNB_GMCH_GMS_STOLEN_128M (4 << 3)
|
||||||
|
#define SNB_GMCH_GMS_STOLEN_160M (5 << 3)
|
||||||
|
#define SNB_GMCH_GMS_STOLEN_192M (6 << 3)
|
||||||
|
#define SNB_GMCH_GMS_STOLEN_224M (7 << 3)
|
||||||
|
#define SNB_GMCH_GMS_STOLEN_256M (8 << 3)
|
||||||
|
#define SNB_GMCH_GMS_STOLEN_288M (9 << 3)
|
||||||
|
#define SNB_GMCH_GMS_STOLEN_320M (0xa << 3)
|
||||||
|
#define SNB_GMCH_GMS_STOLEN_352M (0xb << 3)
|
||||||
|
#define SNB_GMCH_GMS_STOLEN_384M (0xc << 3)
|
||||||
|
#define SNB_GMCH_GMS_STOLEN_416M (0xd << 3)
|
||||||
|
#define SNB_GMCH_GMS_STOLEN_448M (0xe << 3)
|
||||||
|
#define SNB_GMCH_GMS_STOLEN_480M (0xf << 3)
|
||||||
|
#define SNB_GMCH_GMS_STOLEN_512M (0x10 << 3)
|
||||||
|
#define SNB_GTT_SIZE_0M (0 << 8)
|
||||||
|
#define SNB_GTT_SIZE_1M (1 << 8)
|
||||||
|
#define SNB_GTT_SIZE_2M (2 << 8)
|
||||||
|
#define SNB_GTT_SIZE_MASK (3 << 8)
|
||||||
|
|
||||||
|
/* pci devices ids */
|
||||||
|
#define PCI_DEVICE_ID_INTEL_E7221_HB 0x2588
|
||||||
|
#define PCI_DEVICE_ID_INTEL_E7221_IG 0x258a
|
||||||
|
#define PCI_DEVICE_ID_INTEL_82946GZ_HB 0x2970
|
||||||
|
#define PCI_DEVICE_ID_INTEL_82946GZ_IG 0x2972
|
||||||
|
#define PCI_DEVICE_ID_INTEL_82G35_HB 0x2980
|
||||||
|
#define PCI_DEVICE_ID_INTEL_82G35_IG 0x2982
|
||||||
|
#define PCI_DEVICE_ID_INTEL_82965Q_HB 0x2990
|
||||||
|
#define PCI_DEVICE_ID_INTEL_82965Q_IG 0x2992
|
||||||
|
#define PCI_DEVICE_ID_INTEL_82965G_HB 0x29A0
|
||||||
|
#define PCI_DEVICE_ID_INTEL_82965G_IG 0x29A2
|
||||||
|
#define PCI_DEVICE_ID_INTEL_82965GM_HB 0x2A00
|
||||||
|
#define PCI_DEVICE_ID_INTEL_82965GM_IG 0x2A02
|
||||||
|
#define PCI_DEVICE_ID_INTEL_82965GME_HB 0x2A10
|
||||||
|
#define PCI_DEVICE_ID_INTEL_82965GME_IG 0x2A12
|
||||||
|
#define PCI_DEVICE_ID_INTEL_82945GME_HB 0x27AC
|
||||||
|
#define PCI_DEVICE_ID_INTEL_82945GME_IG 0x27AE
|
||||||
|
#define PCI_DEVICE_ID_INTEL_PINEVIEW_M_HB 0xA010
|
||||||
|
#define PCI_DEVICE_ID_INTEL_PINEVIEW_M_IG 0xA011
|
||||||
|
#define PCI_DEVICE_ID_INTEL_PINEVIEW_HB 0xA000
|
||||||
|
#define PCI_DEVICE_ID_INTEL_PINEVIEW_IG 0xA001
|
||||||
|
#define PCI_DEVICE_ID_INTEL_G33_HB 0x29C0
|
||||||
|
#define PCI_DEVICE_ID_INTEL_G33_IG 0x29C2
|
||||||
|
#define PCI_DEVICE_ID_INTEL_Q35_HB 0x29B0
|
||||||
|
#define PCI_DEVICE_ID_INTEL_Q35_IG 0x29B2
|
||||||
|
#define PCI_DEVICE_ID_INTEL_Q33_HB 0x29D0
|
||||||
|
#define PCI_DEVICE_ID_INTEL_Q33_IG 0x29D2
|
||||||
|
#define PCI_DEVICE_ID_INTEL_B43_HB 0x2E40
|
||||||
|
#define PCI_DEVICE_ID_INTEL_B43_IG 0x2E42
|
||||||
|
#define PCI_DEVICE_ID_INTEL_GM45_HB 0x2A40
|
||||||
|
#define PCI_DEVICE_ID_INTEL_GM45_IG 0x2A42
|
||||||
|
#define PCI_DEVICE_ID_INTEL_EAGLELAKE_HB 0x2E00
|
||||||
|
#define PCI_DEVICE_ID_INTEL_EAGLELAKE_IG 0x2E02
|
||||||
|
#define PCI_DEVICE_ID_INTEL_Q45_HB 0x2E10
|
||||||
|
#define PCI_DEVICE_ID_INTEL_Q45_IG 0x2E12
|
||||||
|
#define PCI_DEVICE_ID_INTEL_G45_HB 0x2E20
|
||||||
|
#define PCI_DEVICE_ID_INTEL_G45_IG 0x2E22
|
||||||
|
#define PCI_DEVICE_ID_INTEL_G41_HB 0x2E30
|
||||||
|
#define PCI_DEVICE_ID_INTEL_G41_IG 0x2E32
|
||||||
|
#define PCI_DEVICE_ID_INTEL_IRONLAKE_D_HB 0x0040
|
||||||
|
#define PCI_DEVICE_ID_INTEL_IRONLAKE_D_IG 0x0042
|
||||||
|
#define PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB 0x0044
|
||||||
|
#define PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB 0x0062
|
||||||
|
#define PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB 0x006a
|
||||||
|
#define PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG 0x0046
|
||||||
|
#define PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB 0x0100
|
||||||
|
#define PCI_DEVICE_ID_INTEL_SANDYBRIDGE_IG 0x0102
|
||||||
|
#define PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB 0x0104
|
||||||
|
#define PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_IG 0x0106
|
||||||
|
|
||||||
|
/* cover 915 and 945 variants */
|
||||||
|
#define IS_I915 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_E7221_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GM_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GME_HB)
|
||||||
|
|
||||||
|
#define IS_I965 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82946GZ_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82G35_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB)
|
||||||
|
|
||||||
|
#define IS_G33 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G33_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q33_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_M_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_HB)
|
||||||
|
|
||||||
|
#define IS_PINEVIEW (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_M_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_HB)
|
||||||
|
|
||||||
|
#define IS_SNB (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB)
|
||||||
|
|
||||||
|
#define IS_G4X (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_EAGLELAKE_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q45_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G45_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_GM45_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G41_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_B43_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_D_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB || \
|
||||||
|
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB || \
|
||||||
|
IS_SNB)
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -310,6 +310,7 @@ static const struct agp_bridge_driver nvidia_driver = {
|
|||||||
.aperture_sizes = nvidia_generic_sizes,
|
.aperture_sizes = nvidia_generic_sizes,
|
||||||
.size_type = U8_APER_SIZE,
|
.size_type = U8_APER_SIZE,
|
||||||
.num_aperture_sizes = 5,
|
.num_aperture_sizes = 5,
|
||||||
|
.needs_scratch_page = true,
|
||||||
.configure = nvidia_configure,
|
.configure = nvidia_configure,
|
||||||
.fetch_size = nvidia_fetch_size,
|
.fetch_size = nvidia_fetch_size,
|
||||||
.cleanup = nvidia_cleanup,
|
.cleanup = nvidia_cleanup,
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ static struct agp_bridge_driver sis_driver = {
|
|||||||
.aperture_sizes = sis_generic_sizes,
|
.aperture_sizes = sis_generic_sizes,
|
||||||
.size_type = U8_APER_SIZE,
|
.size_type = U8_APER_SIZE,
|
||||||
.num_aperture_sizes = 7,
|
.num_aperture_sizes = 7,
|
||||||
|
.needs_scratch_page = true,
|
||||||
.configure = sis_configure,
|
.configure = sis_configure,
|
||||||
.fetch_size = sis_fetch_size,
|
.fetch_size = sis_fetch_size,
|
||||||
.cleanup = sis_cleanup,
|
.cleanup = sis_cleanup,
|
||||||
@@ -415,14 +416,6 @@ static struct pci_device_id agp_sis_pci_table[] = {
|
|||||||
.subvendor = PCI_ANY_ID,
|
.subvendor = PCI_ANY_ID,
|
||||||
.subdevice = PCI_ANY_ID,
|
.subdevice = PCI_ANY_ID,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
.class = (PCI_CLASS_BRIDGE_HOST << 8),
|
|
||||||
.class_mask = ~0,
|
|
||||||
.vendor = PCI_VENDOR_ID_SI,
|
|
||||||
.device = PCI_DEVICE_ID_SI_760,
|
|
||||||
.subvendor = PCI_ANY_ID,
|
|
||||||
.subdevice = PCI_ANY_ID,
|
|
||||||
},
|
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
*/
|
*/
|
||||||
static int uninorth_rev;
|
static int uninorth_rev;
|
||||||
static int is_u3;
|
static int is_u3;
|
||||||
|
static u32 scratch_value;
|
||||||
|
|
||||||
#define DEFAULT_APERTURE_SIZE 256
|
#define DEFAULT_APERTURE_SIZE 256
|
||||||
#define DEFAULT_APERTURE_STRING "256"
|
#define DEFAULT_APERTURE_STRING "256"
|
||||||
@@ -172,7 +173,7 @@ static int uninorth_insert_memory(struct agp_memory *mem, off_t pg_start, int ty
|
|||||||
|
|
||||||
gp = (u32 *) &agp_bridge->gatt_table[pg_start];
|
gp = (u32 *) &agp_bridge->gatt_table[pg_start];
|
||||||
for (i = 0; i < mem->page_count; ++i) {
|
for (i = 0; i < mem->page_count; ++i) {
|
||||||
if (gp[i]) {
|
if (gp[i] != scratch_value) {
|
||||||
dev_info(&agp_bridge->dev->dev,
|
dev_info(&agp_bridge->dev->dev,
|
||||||
"uninorth_insert_memory: entry 0x%x occupied (%x)\n",
|
"uninorth_insert_memory: entry 0x%x occupied (%x)\n",
|
||||||
i, gp[i]);
|
i, gp[i]);
|
||||||
@@ -214,8 +215,9 @@ int uninorth_remove_memory(struct agp_memory *mem, off_t pg_start, int type)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
gp = (u32 *) &agp_bridge->gatt_table[pg_start];
|
gp = (u32 *) &agp_bridge->gatt_table[pg_start];
|
||||||
for (i = 0; i < mem->page_count; ++i)
|
for (i = 0; i < mem->page_count; ++i) {
|
||||||
gp[i] = 0;
|
gp[i] = scratch_value;
|
||||||
|
}
|
||||||
mb();
|
mb();
|
||||||
uninorth_tlbflush(mem);
|
uninorth_tlbflush(mem);
|
||||||
|
|
||||||
@@ -421,8 +423,13 @@ static int uninorth_create_gatt_table(struct agp_bridge_data *bridge)
|
|||||||
|
|
||||||
bridge->gatt_bus_addr = virt_to_phys(table);
|
bridge->gatt_bus_addr = virt_to_phys(table);
|
||||||
|
|
||||||
|
if (is_u3)
|
||||||
|
scratch_value = (page_to_phys(agp_bridge->scratch_page_page) >> PAGE_SHIFT) | 0x80000000UL;
|
||||||
|
else
|
||||||
|
scratch_value = cpu_to_le32((page_to_phys(agp_bridge->scratch_page_page) & 0xFFFFF000UL) |
|
||||||
|
0x1UL);
|
||||||
for (i = 0; i < num_entries; i++)
|
for (i = 0; i < num_entries; i++)
|
||||||
bridge->gatt_table[i] = 0;
|
bridge->gatt_table[i] = scratch_value;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -519,6 +526,7 @@ const struct agp_bridge_driver uninorth_agp_driver = {
|
|||||||
.agp_destroy_pages = agp_generic_destroy_pages,
|
.agp_destroy_pages = agp_generic_destroy_pages,
|
||||||
.agp_type_to_mask_type = agp_generic_type_to_mask_type,
|
.agp_type_to_mask_type = agp_generic_type_to_mask_type,
|
||||||
.cant_use_aperture = true,
|
.cant_use_aperture = true,
|
||||||
|
.needs_scratch_page = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct agp_bridge_driver u3_agp_driver = {
|
const struct agp_bridge_driver u3_agp_driver = {
|
||||||
|
|||||||
@@ -175,6 +175,7 @@ static const struct agp_bridge_driver via_agp3_driver = {
|
|||||||
.aperture_sizes = agp3_generic_sizes,
|
.aperture_sizes = agp3_generic_sizes,
|
||||||
.size_type = U8_APER_SIZE,
|
.size_type = U8_APER_SIZE,
|
||||||
.num_aperture_sizes = 10,
|
.num_aperture_sizes = 10,
|
||||||
|
.needs_scratch_page = true,
|
||||||
.configure = via_configure_agp3,
|
.configure = via_configure_agp3,
|
||||||
.fetch_size = via_fetch_size_agp3,
|
.fetch_size = via_fetch_size_agp3,
|
||||||
.cleanup = via_cleanup_agp3,
|
.cleanup = via_cleanup_agp3,
|
||||||
@@ -201,6 +202,7 @@ static const struct agp_bridge_driver via_driver = {
|
|||||||
.aperture_sizes = via_generic_sizes,
|
.aperture_sizes = via_generic_sizes,
|
||||||
.size_type = U8_APER_SIZE,
|
.size_type = U8_APER_SIZE,
|
||||||
.num_aperture_sizes = 9,
|
.num_aperture_sizes = 9,
|
||||||
|
.needs_scratch_page = true,
|
||||||
.configure = via_configure,
|
.configure = via_configure,
|
||||||
.fetch_size = via_fetch_size,
|
.fetch_size = via_fetch_size,
|
||||||
.cleanup = via_cleanup,
|
.cleanup = via_cleanup,
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ menuconfig DRM
|
|||||||
depends on (AGP || AGP=n) && PCI && !EMULATED_CMPXCHG && MMU
|
depends on (AGP || AGP=n) && PCI && !EMULATED_CMPXCHG && MMU
|
||||||
select I2C
|
select I2C
|
||||||
select I2C_ALGOBIT
|
select I2C_ALGOBIT
|
||||||
|
select SLOW_WORK
|
||||||
help
|
help
|
||||||
Kernel-level support for the Direct Rendering Infrastructure (DRI)
|
Kernel-level support for the Direct Rendering Infrastructure (DRI)
|
||||||
introduced in XFree86 4.0. If you say Y here, you need to select
|
introduced in XFree86 4.0. If you say Y here, you need to select
|
||||||
@@ -59,6 +60,7 @@ config DRM_RADEON
|
|||||||
select FW_LOADER
|
select FW_LOADER
|
||||||
select DRM_KMS_HELPER
|
select DRM_KMS_HELPER
|
||||||
select DRM_TTM
|
select DRM_TTM
|
||||||
|
select POWER_SUPPLY
|
||||||
help
|
help
|
||||||
Choose this option if you have an ATI Radeon graphics card. There
|
Choose this option if you have an ATI Radeon graphics card. There
|
||||||
are both PCI and AGP versions. You don't need to choose this to
|
are both PCI and AGP versions. You don't need to choose this to
|
||||||
|
|||||||
@@ -79,10 +79,9 @@ static int drm_add_magic(struct drm_master *master, struct drm_file *priv,
|
|||||||
struct drm_device *dev = master->minor->dev;
|
struct drm_device *dev = master->minor->dev;
|
||||||
DRM_DEBUG("%d\n", magic);
|
DRM_DEBUG("%d\n", magic);
|
||||||
|
|
||||||
entry = kmalloc(sizeof(*entry), GFP_KERNEL);
|
entry = kzalloc(sizeof(*entry), GFP_KERNEL);
|
||||||
if (!entry)
|
if (!entry)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
memset(entry, 0, sizeof(*entry));
|
|
||||||
entry->priv = priv;
|
entry->priv = priv;
|
||||||
entry->hash_item.key = (unsigned long)magic;
|
entry->hash_item.key = (unsigned long)magic;
|
||||||
mutex_lock(&dev->struct_mutex);
|
mutex_lock(&dev->struct_mutex);
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include "drm.h"
|
#include "drm.h"
|
||||||
#include "drmP.h"
|
#include "drmP.h"
|
||||||
#include "drm_crtc.h"
|
#include "drm_crtc.h"
|
||||||
|
#include "drm_edid.h"
|
||||||
|
|
||||||
struct drm_prop_enum_list {
|
struct drm_prop_enum_list {
|
||||||
int type;
|
int type;
|
||||||
@@ -494,7 +495,6 @@ void drm_connector_cleanup(struct drm_connector *connector)
|
|||||||
list_for_each_entry_safe(mode, t, &connector->user_modes, head)
|
list_for_each_entry_safe(mode, t, &connector->user_modes, head)
|
||||||
drm_mode_remove(connector, mode);
|
drm_mode_remove(connector, mode);
|
||||||
|
|
||||||
kfree(connector->fb_helper_private);
|
|
||||||
mutex_lock(&dev->mode_config.mutex);
|
mutex_lock(&dev->mode_config.mutex);
|
||||||
drm_mode_object_put(dev, &connector->base);
|
drm_mode_object_put(dev, &connector->base);
|
||||||
list_del(&connector->head);
|
list_del(&connector->head);
|
||||||
@@ -858,7 +858,6 @@ void drm_mode_config_init(struct drm_device *dev)
|
|||||||
mutex_init(&dev->mode_config.mutex);
|
mutex_init(&dev->mode_config.mutex);
|
||||||
mutex_init(&dev->mode_config.idr_mutex);
|
mutex_init(&dev->mode_config.idr_mutex);
|
||||||
INIT_LIST_HEAD(&dev->mode_config.fb_list);
|
INIT_LIST_HEAD(&dev->mode_config.fb_list);
|
||||||
INIT_LIST_HEAD(&dev->mode_config.fb_kernel_list);
|
|
||||||
INIT_LIST_HEAD(&dev->mode_config.crtc_list);
|
INIT_LIST_HEAD(&dev->mode_config.crtc_list);
|
||||||
INIT_LIST_HEAD(&dev->mode_config.connector_list);
|
INIT_LIST_HEAD(&dev->mode_config.connector_list);
|
||||||
INIT_LIST_HEAD(&dev->mode_config.encoder_list);
|
INIT_LIST_HEAD(&dev->mode_config.encoder_list);
|
||||||
@@ -2350,7 +2349,7 @@ int drm_mode_connector_update_edid_property(struct drm_connector *connector,
|
|||||||
struct edid *edid)
|
struct edid *edid)
|
||||||
{
|
{
|
||||||
struct drm_device *dev = connector->dev;
|
struct drm_device *dev = connector->dev;
|
||||||
int ret = 0;
|
int ret = 0, size;
|
||||||
|
|
||||||
if (connector->edid_blob_ptr)
|
if (connector->edid_blob_ptr)
|
||||||
drm_property_destroy_blob(dev, connector->edid_blob_ptr);
|
drm_property_destroy_blob(dev, connector->edid_blob_ptr);
|
||||||
@@ -2362,7 +2361,9 @@ int drm_mode_connector_update_edid_property(struct drm_connector *connector,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
connector->edid_blob_ptr = drm_property_create_blob(connector->dev, 128, edid);
|
size = EDID_LENGTH * (1 + edid->extensions);
|
||||||
|
connector->edid_blob_ptr = drm_property_create_blob(connector->dev,
|
||||||
|
size, edid);
|
||||||
|
|
||||||
ret = drm_connector_property_set_value(connector,
|
ret = drm_connector_property_set_value(connector,
|
||||||
dev->mode_config.edid_property,
|
dev->mode_config.edid_property,
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user