summaryrefslogtreecommitdiff
path: root/linux-core/Makefile.kernel
AgeCommit message (Expand)Author
2005-07-20Add latest r300 support from r300.sf.net CVS. Patch submitted by volodya,Eric Anholt
2005-06-29add i915_ioc32.cAlan Hourihane
2005-06-29add mga and r128 32/64 bitsDave Airlie
2005-06-28Add compat to MakefileDave Airlie
2005-06-28Given that BenH says using the sysdev approach for DRM is bogus, I'll yankAlan Hourihane
2005-06-19Remove I2C support from radeon driver. Same support is available fromJon Smirl
2005-05-28Re-implement the power management.Alan Hourihane
2005-03-28Via updates:Thomas Hellstrom
2005-01-16remove duplicate drm_sysfs.oDave Airlie
2005-01-01Completeley rewritten Savage DRM which can be considered secure (moduloFelix Kuehling
2004-12-03Added 3D functionality to the via command verifier. Modified the viaThomas Hellstrom
2004-11-05Move ati_pcigart shared routines into drm-core moduleJon Smirl
2004-10-15Move drm_cpu_valid out of drm_init. drm_init is empty now.Jon Smirl
2004-09-30Make the debug memory functions compile for the core model.Jon Smirl
2004-09-27First check in for DRM that splits core from personality modulesJon Smirl
2004-09-24Create new linux-2.6 build. Move all gpl files into the 2.6 build. If youJon Smirl
2004-09-17Add linux sysfs i2c support to radeon driver. This patch adds GPL licensedJon Smirl
2004-08-29Drop GAMMA DRM from a great height ...Dave Airlie
2004-08-24This patch adds three new ioctl's to the VIA Unichrome/Pro DRM driver:Erdi Chen
2004-06-10i915 drm moduleKeith Whitwell
2004-04-12Add mach64 to the trunkDave Airlie
2004-03-31VIA module fixes:Thomas Hellstrom
2004-03-24Exported symbols cause compilation failure of via_mm.c on 2.4 kernels.Thomas Hellstrom
2004-03-23Merged via-1-2-0: Altered Makefiles in drm/linuxThomas Hellstrom
2004-02-22Merged the Savage DRM driver from the savage-2-0-0-branch into the trunk.Felix Kuehling
2003-09-12linux drm fixesAlan Hourihane
2003-08-07build fix for kernels >= 2.6Michel Daenzer
2003-04-17Rework the Linux drm kernel module build to leverage off the standardDavid Dawes
2003-03-25linux merge for drmAlan Hourihane
2003-02-28Update object targetsLeif Delgass
2002-01-27First pass merge of XFree86 4.2.0 import.David Dawes
2001-08-10Commit Keith Owens kernel Makefile changes, merge and commit alpha patchJeff Hartmann
2001-08-07Lots of DRM fixes: added new pieces of template code so the ffb driver canJeff Hartmann
2001-02-15Merge mga-1-0-0-branch into trunk.Gareth Hughes
2001-01-05Merged ati-5-0-0Kevin E Martin
2001-01-04Sync with Linux 2.4.0-prereleaseRik Faith
2000-12-02Merged ati-4-1-1-branch into trunk.Gareth Hughes
2000-09-29Audit calls to schedule() Remove tags from files shared with Linux kernelRik Faith
2000-09-24commit xfree86 4.0.1d-pre updateAlan Hourihane
2000-08-04Sync with Linux 2.4.0-test6-pre2Rik Faith
2000-07-22Fix typoRik Faith
2000-07-22Move to new, denser, easier-to-read Linux kernel Makefile formatRik Faith
2000-07-21Revert some changes and try alternative way to clean up AGP handling.Rik Faith
2000-07-21Revert some changes and try alternative way to clean up AGP handling.Rik Faith
2000-07-21Fixes for building in the kernel treeRik Faith
2000-07-20More fixups for kernel build: EXPORT_SYMTAB warning removalRik Faith
2000-07-20Fixes for building in the kernel treeRik Faith
2000-07-20Fixed for monolithic kernel buildRik Faith
2000-07-19Sync with Linux 2.4.0-test4 kernelRik Faith
2000-07-11Merge XFree86 4.0.1Alan Hourihane
n class="hl opt">(0x0 << 5) | (0x0 << 3): ffb_priv->ffb_type = ffb1_prototype; printk("ffb%d: Detected FFB1 pre-FCS prototype\n", instance); break; case (0x0 << 5) | (0x1 << 3): ffb_priv->ffb_type = ffb1_standard; printk("ffb%d: Detected FFB1\n", instance); break; case (0x0 << 5) | (0x3 << 3): ffb_priv->ffb_type = ffb1_speedsort; printk("ffb%d: Detected FFB1-SpeedSort\n", instance); break; case (0x1 << 5) | (0x0 << 3): ffb_priv->ffb_type = ffb2_prototype; printk("ffb%d: Detected FFB2/vertical pre-FCS prototype\n", instance); break; case (0x1 << 5) | (0x1 << 3): ffb_priv->ffb_type = ffb2_vertical; printk("ffb%d: Detected FFB2/vertical\n", instance); break; case (0x1 << 5) | (0x2 << 3): ffb_priv->ffb_type = ffb2_vertical_plus; printk("ffb%d: Detected FFB2+/vertical\n", instance); break; case (0x2 << 5) | (0x0 << 3): ffb_priv->ffb_type = ffb2_horizontal; printk("ffb%d: Detected FFB2/horizontal\n", instance); break; case (0x2 << 5) | (0x2 << 3): ffb_priv->ffb_type = ffb2_horizontal; printk("ffb%d: Detected FFB2+/horizontal\n", instance); break; default: ffb_priv->ffb_type = ffb2_vertical; printk("ffb%d: Unknown boardID[%08x], assuming FFB2\n", instance, val); break; }; } static void ffb_apply_upa_parent_ranges(int parent, struct linux_prom64_registers *regs) { struct linux_prom64_ranges ranges[PROMREG_MAX]; char name[128]; int len, i; prom_getproperty(parent, "name", name, sizeof(name)); if (strcmp(name, "upa") != 0) return; len = prom_getproperty(parent, "ranges", (void *) ranges, sizeof(ranges)); if (len <= 0) return; len /= sizeof(struct linux_prom64_ranges); for (i = 0; i < len; i++) { struct linux_prom64_ranges *rng = &ranges[i]; u64 phys_addr = regs->phys_addr; if (phys_addr >= rng->ot_child_base && phys_addr < (rng->ot_child_base + rng->or_size)) { regs->phys_addr -= rng->ot_child_base; regs->phys_addr += rng->ot_parent_base; return; } } return; } static int ffb_init_one(drm_device_t *dev, int prom_node, int parent_node, int instance) { struct linux_prom64_registers regs[2*PROMREG_MAX]; ffb_dev_priv_t *ffb_priv = (ffb_dev_priv_t *)dev->dev_private; int i; ffb_priv->prom_node = prom_node; if (prom_getproperty(ffb_priv->prom_node, "reg", (void *)regs, sizeof(regs)) <= 0) { return -EINVAL; } ffb_apply_upa_parent_ranges(parent_node, &regs[0]); ffb_priv->card_phys_base = regs[0].phys_addr; ffb_priv->regs = (ffb_fbcPtr) (regs[0].phys_addr + 0x00600000UL); get_ffb_type(ffb_priv, instance); for (i = 0; i < FFB_MAX_CTXS; i++) ffb_priv->hw_state[i] = NULL; return 0; } static int __init ffb_count_siblings(int root) { int node, child, count = 0; child = prom_getchild(root); for (node = prom_searchsiblings(child, "SUNW,ffb"); node; node = prom_searchsiblings(prom_getsibling(node), "SUNW,ffb")) count++; return count; } static int __init ffb_scan_siblings(int root, int instance) { int node, child; child = prom_getchild(root); for (node = prom_searchsiblings(child, "SUNW,ffb"); node; node = prom_searchsiblings(prom_getsibling(node), "SUNW,ffb")) { ffb_position[instance].node = node; ffb_position[instance].root = root; instance++; } return instance; } static drm_map_t *ffb_find_map(struct file *filp, unsigned long off) { drm_file_t *priv = filp->private_data; drm_device_t *dev; drm_map_list_t *r_list; struct list_head *list; drm_map_t *map; if (!priv || (dev = priv->dev) == NULL) return NULL; list_for_each(list, &dev->maplist->head) { unsigned long uoff; r_list = (drm_map_list_t *)list; map = r_list->map; if (!map) continue; uoff = (map->offset & 0xffffffff); if (uoff == off) return map; } return NULL; } unsigned long ffb_get_unmapped_area(struct file *filp, unsigned long hint, unsigned long len, unsigned long pgoff, unsigned long flags) { drm_map_t *map = ffb_find_map(filp, pgoff << PAGE_SHIFT); unsigned long addr = -ENOMEM; if (!map) return get_unmapped_area(NULL, hint, len, pgoff, flags); if (map->type == _DRM_FRAME_BUFFER || map->type == _DRM_REGISTERS) { #ifdef HAVE_ARCH_FB_UNMAPPED_AREA addr = get_fb_unmapped_area(filp, hint, len, pgoff, flags); #else addr = get_unmapped_area(NULL, hint, len, pgoff, flags); #endif } else if (map->type == _DRM_SHM && SHMLBA > PAGE_SIZE) { unsigned long slack = SHMLBA - PAGE_SIZE; addr = get_unmapped_area(NULL, hint, len + slack, pgoff, flags); if (!(addr & ~PAGE_MASK)) { unsigned long kvirt = (unsigned long) map->handle; if ((kvirt & (SHMLBA - 1)) != (addr & (SHMLBA - 1))) { unsigned long koff, aoff; koff = kvirt & (SHMLBA - 1); aoff = addr & (SHMLBA - 1); if (koff < aoff) koff += SHMLBA; addr += (koff - aoff); } } } else { addr = get_unmapped_area(NULL, hint, len, pgoff, flags); } return addr; } /* This functions must be here since it references drm_numdevs) * which drm_drv.h declares. */ static int ffb_driver_firstopen(drm_device_t *dev) { ffb_dev_priv_t *ffb_priv; drm_device_t *temp_dev; int ret = 0; int i; /* Check for the case where no device was found. */ if (ffb_position == NULL) return -ENODEV; /* Find our instance number by finding our device in dev structure */ for (i = 0; i < drm_numdevs; i++) { temp_dev = &(drm_device[i]); if(temp_dev == dev) break; } if (i == drm_numdevs) return -ENODEV; ffb_priv = kmalloc(sizeof(ffb_dev_priv_t), GFP_KERNEL); if (!ffb_priv) return -ENOMEM; memset(ffb_priv, 0, sizeof(*ffb_priv)); dev->dev_private = ffb_priv; ret = ffb_init_one(dev, ffb_position[i].node, ffb_position[i].root, i); return ret; } #include "drm_pciids.h" static struct pci_device_id pciidlist[] = { ffb_PCI_IDS }; static struct drm_driver ffb_driver = { .release = ffb_driver_reclaim_buffers_locked, .firstopen = ffb_driver_firstopen, .lastclose = ffb_driver_lastclose, .unload = ffb_driver_unload, .kernel_context_switch = ffb_context_switch, .kernel_context_switch_unlock = ffb_driver_kernel_context_switch_unlock, .get_map_ofs = ffb_driver_get_map_ofs, .get_reg_ofs = ffb_driver_get_reg_ofs, .reclaim_buffers = drm_core_reclaim_buffers, fops = { .owner = THIS_MODULE, .open = drm_open, .release = drm_release, .ioctl = drm_ioctl, .mmap = drm_mmap, .fasync = drm_fasync, .poll = drm_poll, .get_unmapped_area = ffb_get_unmapped_area, }, }; static int probe(struct pci_dev *pdev, const struct pci_device_id *ent) { return drm_probe(pdev, ent, &driver); } static struct pci_driver pci_driver = { .name = DRIVER_NAME, .id_table = pciidlist, .probe = probe, .remove = __devexit_p(drm_cleanup_pci), }; static int __init ffb_init(void) { return drm_init(&pci_driver, pciidlist, &driver); } static void __exit ffb_exit(void) { drm_exit(&pci_driver); } module_init(ffb_init); module_exit(ffb_exit)); MODULE_AUTHOR( DRIVER_AUTHOR ); MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_LICENSE("GPL and additional rights");