summaryrefslogtreecommitdiff
path: root/include/drm
AgeCommit message (Collapse)Author
2010-04-20Merge branch 'drm-ttm-unmappable' into drm-core-nextDave Airlie
* drm-ttm-unmappable: drm/radeon/kms: enable use of unmappable VRAM V2 drm/ttm: remove io_ field from TTM V6 drm/vmwgfx: add support for new TTM fault callback V5 drm/nouveau/kms: add support for new TTM fault callback V5 drm/radeon/kms: add support for new fault callback V7 drm/ttm: ttm_fault callback to allow driver to handle bo placement V6 drm/ttm: split no_wait argument in 2 GPU or reserve wait Conflicts: drivers/gpu/drm/nouveau/nouveau_bo.c
2010-04-20drm/ttm: remove io_ field from TTM V6Jerome Glisse
All TTM driver have been converted to new io_mem_reserve/free interface which allow driver to choose and return proper io base, offset to core TTM for ioremapping if necessary. This patch remove what is now deadcode. V2 adapt to match with change in first patch of the patchset V3 update after io_mem_reserve/io_mem_free callback balancing V4 adjust to minor cleanup V5 remove the needs ioremap flag V6 keep the ioremapping facility in TTM [airlied- squashed driver removals in here also] Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-20drm/ttm: ttm_fault callback to allow driver to handle bo placement V6Jerome Glisse
On fault the driver is given the opportunity to perform any operation it sees fit in order to place the buffer into a CPU visible area of memory. This patch doesn't break TTM users, nouveau, vmwgfx and radeon should keep working properly. Future patch will take advantage of this infrastructure and remove the old path from TTM once driver are converted. V2 return VM_FAULT_NOPAGE if callback return -EBUSY or -ERESTARTSYS V3 balance io_mem_reserve and io_mem_free call, fault_reserve_notify is responsible to perform any necessary task for mapping to succeed V4 minor cleanup, atomic_t -> bool as member is protected by reserve mecanism from concurent access V5 the callback is now responsible for iomapping the bo and providing a virtual address this simplify TTM and will allow to get rid of TTM_MEMTYPE_FLAG_NEEDS_IOREMAP V6 use the bus addr data to decide to ioremap or this isn't needed but we don't necesarily need to ioremap in the callback but still allow driver to use static mapping Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-20drm: free core gem object from driver callbacksDaniel Vetter
When drivers embed the core gem object into their own structures, they'll have to do this. Temporarily this results in an ugly kfree(gem_obj); in every gem driver. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-20drm: extract drm_gem_object_initDaniel Vetter
This function can be used by drivers who allocate the drm gem object on their own. No functional change in here, just preparation. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-20Merge branch 'drm-fbdev-cleanup' into drm-core-nextDave Airlie
* drm-fbdev-cleanup: drm/fb: remove drm_fb_helper_setcolreg drm/kms/fb: use slow work mechanism for normal hotplug also. drm/kms/fb: add polling support for when nothing is connected. drm/kms/fb: provide a 1024x768 fbcon if no outputs found. drm/kms/fb: separate fbdev connector list from core drm connectors drm/kms/fb: move to using fb helper crtc grouping instead of core crtc list drm/fb: fix fbdev object model + cleanup properly. Conflicts: drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/nouveau/nouveau_drv.h
2010-04-20Merge branch 'drm-edid-fixes' into drm-core-nextDave Airlie
* drm-edid-fixes: drm/edid: When checking duplicate standard modes, walked the probed list drm/edid: Fix sync polarity for secondary GTF curve drm/modes: Fix interlaced mode names drm/edid: Add secondary GTF curve support drm/edid: Strengthen the algorithm for standard mode codes drm/edid: Fix the HDTV hack. drm/edid: Extend range-based mode addition for EDID 1.4 drm/edid: Add test for monitor reduced blanking support. drm/edid: Fix preferred mode parse for EDID 1.4 drm/edid: Remove some silly comments drm/edid: Remove arbitrary EDID extension limit drm/edid: Add modes for Established Timings III section drm/edid: Reshuffle mode list construction to closer match the spec drm/edid: Remove a redundant check drm/edid: Remove some misleading comments drm/edid: Fix secondary block fetch.
2010-04-20Merge branch 'drm-ttm-pool' into drm-core-nextDave Airlie
* drm-ttm-pool: drm/ttm: using kmalloc/kfree requires including slab.h drm/ttm: include linux/seq_file.h for seq_printf drm/ttm: Add sysfs interface to control pool allocator. drm/ttm: Use set_pages_array_wc instead of set_memory_wc. arch/x86: Add array variants for setting memory to wc caching. drm/nouveau: Add ttm page pool debugfs file. drm/radeon/kms: Add ttm page pool debugfs file. drm/ttm: Add debugfs output entry to pool allocator. drm/ttm: add pool wc/uc page allocator V3
2010-04-19Merge branch 'drm-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/radeon/kms: add FireMV 2400 PCI ID. drm/radeon/kms: allow R500 regs VAP_ALT_NUM_VERTICES and VAP_INDEX_OFFSET drivers/gpu/radeon: Add MSPOS regs to safe list. drm/radeon/kms: disable the tv encoder when tv/cv is not in use drm/radeon/kms: adjust pll settings for tv drm/radeon/kms: fix tv dac conflict resolver drm/radeon/kms/evergreen: don't enable hdmi audio stuff drm/radeon/kms/atom: fix dual-link DVI on DCE3.2/4.0 drm/radeon/kms: fix rs600 tlb flush drm/radeon/kms: print GPU family and device id when loading drm/radeon/kms: fix calculation of mipmapped 3D texture sizes drm/radeon/kms: only change mode when coherent value changes. drm/radeon/kms: more atom parser fixes (v2)
2010-04-19drm/radeon/kms: add FireMV 2400 PCI ID.Dave Airlie
This is an M24/X600 chip. From RH# 581927 cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-08drm/ttm: split no_wait argument in 2 GPU or reserve waitJerome Glisse
There is case where we want to be able to wait only for the GPU while not waiting for other buffer to be unreserved. This patch split the no_wait argument all the way down in the whole ttm path so that upper level can decide on what to wait on or not. [airlied: squashed these 4 for bisectability reasons.] drm/radeon/kms: update to TTM no_wait splitted argument drm/nouveau: update to TTM no_wait splitted argument drm/vmwgfx: update to TTM no_wait splitted argument [vmwgfx patch: Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>] Signed-off-by: Jerome Glisse <jglisse@redhat.com> Acked-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-07drm/kms/fb: use slow work mechanism for normal hotplug also.Dave Airlie
a) slow work is always used now for any fbcon hotplug, as its not a fast task and is more suited to being ran under slow work. b) attempt to not do any fbdev changes when X is running as we'll just mess it up. This hooks set_par to hopefully do the changes once X hands control to fbdev. This also adds the nouveau/intel hotplug support. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-07drm/kms/fb: add polling support for when nothing is connected.Dave Airlie
When we are running in a headless environment we have no idea what output the user might plug in later, we only have hotplug detect from the digital outputs. So if we detect no connected outputs at initialisation, start a slow work operation to poll every 5 seconds for an output. this is only hooked up for radeon so far, on hw where we have full hotplug detection there is no need for this. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-07drm/kms/fb: separate fbdev connector list from core drm connectorsDave Airlie
This breaks the connection between the core drm connector list and the fbdev connector usage, and allows them to become disjoint in the future. It also removes the untype void* that was in the connector struct to support this. All connectors are added to the fbdev now but this could be changed in the future. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-07drm/kms/fb: move to using fb helper crtc grouping instead of core crtc listDave Airlie
This move to using the list of crtcs in the fb helper and cleans up the whole picking code, now we store the crtc/connectors we want directly into the modeset and we use the modeset directly to set the mode. Fixes from James Simmons and Ben Skeggs. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-07drm/fb: fix fbdev object model + cleanup properly.Dave Airlie
The fbdev layer in the kms code should act like a consumer of the kms services and avoid having relying on information being store in the kms core structures in order for it to work. This patch a) removes the info pointer/psuedo palette from the core drm_framebuffer structure and moves it to the fbdev helper layer, it also removes the core drm keeping a list of kernel kms fbdevs. b) migrated all the fb helper functions out of the crtc helper file into the fb helper file. c) pushed the fb probing/hotplug control into the driver d) makes the surface sizes into a structure for ease of passing This changes the intel/radeon/nouveau drivers to use the new helper. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-06drm/ttm: Add sysfs interface to control pool allocator.Pauli Nieminen
Sysfs interface allows user to configure pool allocator functionality and change limits for the size of pool. Signed-off-by: Pauli Nieminen <suokkos@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-06drm/ttm: Add debugfs output entry to pool allocator.Pauli Nieminen
ttm_page_alloc_debugfs can be registered to output the state of pools. Debugfs file will output number of pages freed from the pool, number of pages in pool now and the lowes number of pages in pool since previous shrink. Signed-off-by: Pauli Nieminen <suokkos@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-06drm/ttm: add pool wc/uc page allocator V3Pauli Nieminen
On AGP system we might allocate/free routinely uncached or wc memory, changing page from cached (wb) to uc or wc is very expensive and involves a lot of flushing. To improve performance this allocator use a pool of uc,wc pages. Pools are protected with spinlocks to allow multiple threads to allocate pages simultanously. Expensive operations are done outside of spinlock to maximize concurrency. Pools are linked lists of pages that were recently freed. mm shrink callback allows kernel to claim back pages when they are required for something else. Fixes: * set_pages_array_wb handles highmem pages so we don't have to remove them from pool. * Add count parameter to ttm_put_pages to avoid looping in free code. * Change looping from _safe to normal in pool fill error path. * Initialize sum variable and make the loop prettier in get_num_unused_pages. * Moved pages_freed reseting inside the loop in ttm_page_pool_free. * Add warning comment about spinlock context in ttm_page_pool_free. Based on Jerome Glisse's and Dave Airlie's pool allocator. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Pauli Nieminen <suokkos@gmail.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-06drm/edid: Add secondary GTF curve supportAdam Jackson
Before CVT-R, some monitors would advertise support for an alternative GTF formula with lower blanking intervals. Correctly identify such monitors, and use the alternative formula when generating modes for them. Note that we only do this for "standard" timing descriptors (tuples of hsize in characters / aspect ratio / vertical refresh). Range-based mode lists still only refer to the primary GTF curve. It would be possible to do better for the latter case, but monitors are required to support the primary curve over the entire advertised range, so all it would win you is a lower pixel clock and therefore possibly better image quality on analog links. Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-06drm/edid: Remove arbitrary EDID extension limitAdam Jackson
Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-06drm/edid: Fix secondary block fetch.Adam Jackson
This makes fetching the second EDID block on HDMI monitors actually work. DDC can't transfer more than 128 bytes at a time. Also, rearrange the code so the pure DDC bits are separate from block parse. Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-05Merge branch 'master' into export-slabhTejun Heo
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo
implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-15Merge branch 'radeon-for-airlied' of ../linux-2.6 into drm-linusDave Airlie
* 'radeon-for-airlied' of ../linux-2.6: drm/radeon/kms: prepare for more reclocking operations drm/radeon/kms: switch to condition waiting for reclocking drm/radeon/r600: add missing license and comments to r600_blit_shaders.c drm/radeon/kms: improve coding style a little drm/radeon/kms: remove dead audio/HDMI code drm/radeon/kms: enable audio engine on DCE32 drm/radeon/kms: add HDMI code for pre-DCE3 R6xx GPUs drm/radeon/kms: clean assigning HDMI blocks to encoders drm/radeon/kms: clean HDMI definitions drm/radeon/kms/rs4xx: make sure crtcs are enabled when setting timing drm/radeon/kms/r1xx: enable hw i2c drm/radeon/kms: fix i2c prescale calc on older radeons drm/radeon/kms: fix for hw i2c drm/radeon/kms: fix pal tv-out support on legacy IGP chips drm/radeon/kms: further spread spectrum fixes drm/radeon/kms: use lcd pll limits when available drm/radeon/kms/atom: spread spectrum fix drm/radeon/kms: catch atombios infinite loop and break out of it drm/radeon: add new RS880 pci id
2010-03-15drm/ttm: use drm calloc large and free largeDave Airlie
Now that the drm core can do this, lets just use it, split the code out so TTM doesn't have to drag all of drmP.h in. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-03-14drm/radeon: add new RS880 pci idAlex Deucher
This should go to 2.6.33 stable as well. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-03-01Merge branch 'drm-radeon-testing' of /ssd/git/drm-radeon-next into ↵Dave Airlie
drm-next-stage * 'drm-radeon-testing' of /ssd/git/drm-radeon-next: drm/radeon: r100/r200 ums: block ability for userspace app to trash 0 page and beyond drm/ttm: fix function prototype to match implementation drm/radeon: use ALIGN instead of open coding it drm/radeon/kms: initialize set_surface_reg reg for rs600 asic
2010-03-01drm/ttm: fix function prototype to match implementationRandy Dunlap
Fix function prototype to match its actual usage and implementation. drivers/gpu/drm/ttm/ttm_bo_util.c:341:10: error: symbol 'ttm_io_prot' redeclared with different type (originally declared at include/drm/ttm/ttm_bo_driver.h:911) - incompatible argument 1 (different signedness) Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: David Airlie <airlied@linux.ie> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-03-01Merge remote branch 'anholt/drm-intel-next' into drm-next-stageDave Airlie
* anholt/drm-intel-next: (103 commits) drm/i915: Use a dmi quirk to skip a broken SDVO TV output. drm/i915: enable/disable LVDS port at DPMS time drm/i915: check for multiple write domains in pin_and_relocate drm/i915: clean-up i915_gem_flush_gpu_write_domain drm/i915: reuse i915_gpu_idle helper drm/i915: ensure lru ordering of fence_list drm/i915: extract fence stealing code drm/i915: fixup active list locking in object_unbind drm/i915: reuse i915_gem_object_put_fence_reg for fence stealing code drm/i915: Add dependency on the intel agp module drm/i915: More s/IS_IRONLAKE/HAS_PCH_SPLIT for Sandybridge. drm/i915: Correct the Sandybridge chipset info structs. drm/i915: Disable the hangcheck reset on Sandybridge until we add support. drm/i915: Add a new mobile Sandybridge PCI ID. agp/intel: Add a new Sandybridge HB/IG PCI ID combo. drm/i915, agp/intel: Fix stolen memory size on Sandybridge drm/i915: Correct locking in the modesetting failure path, fixing a BUG_ON. drm/i915: Disable the surface tile swizzling on Sandybridge. agp/intel: Use a non-reserved value for the cache field of the PTEs. drm/i915: Fix sandybridge status page setup. ...
2010-03-01Merge remote branch 'nouveau/for-airlied' into drm-next-stageDave Airlie
* nouveau/for-airlied: (25 commits) drm/nouveau: use ALIGN instead of open coding it drm/nouveau: report unknown connector state if lid closed drm/nouveau: support version 0x20 displayport tables drm/nouveau: Fix noaccel/nofbaccel option descriptions. drm/nv50: Implement ctxprog/state generation. drm/nouveau: use dcb connector types throughout the driver drm/nv50: enable hpd on any connector we know the gpio line for drm/nouveau: use dcb connector table for creating drm connectors drm/nouveau: construct a connector table for cards that lack a real one drm/nouveau: check for known dcb connector types drm/nouveau: parse dcb gpio/connector tables after encoders drm/nouveau: reorganise bios header, add dcb connector type enums drm/nouveau: merge nvbios and nouveau_bios_info drm/nouveau: merge parsed_dcb and bios_parsed_dcb into dcb_table drm/nouveau: rename parsed_dcb_gpio to dcb_gpio_table drm/nouveau: allow retrieval of vbios image from debugfs drm/nouveau: fix missing spin_unlock in failure path drm/nouveau: fix i2ctable bounds checking drm/nouveau: fix nouveau_i2c_find bounds checking drm/nouveau: fix pramdac_table range checking ... Conflicts: drivers/gpu/drm/nouveau/nouveau_gem.c
2010-02-26drm/i915: Add initial bits for VGA modesetting bringup on Sandybridge.Eric Anholt
Signed-off-by: Eric Anholt <eric@anholt.net>
2010-02-26Merge remote branch 'korg/drm-radeon-testing' into drm-next-stageDave Airlie
* korg/drm-radeon-testing: (62 commits) drm/radeon/kms: update new pll algo drm/radeon/kms: add support for square microtiles on r3xx-r5xx drm/radeon/kms: force pinning buffer into visible VRAM drm/radeon/kms/evergreen: fix typo in cursor code drm/radeon/kms: implement reading active PCIE lanes on R600+ drm/radeon/kms: for downclocking non-mobility check PERFORMANCE state drm/radeon/kms: simplify storing current and requested PM mode drm/radeon: fixes for r6xx/r7xx gfx init drm/radeon/rv740: fix backend setup drm/radeon/kms: fix R3XX/R4XX memory controller initialization [rfc] drm/radeon/kms: pm debugging check for vbl. drm/radeon: Fix memory allocation failures in the preKMS command stream checking. drm: Add generic multipart buffer. drm/radeon/kms: simplify memory controller setup V2 drm/radeon: Add asic hook for dma copy to r200 cards. drm/radeon/kms: Create asic structure for r300 pcie cards. drm/radeon/kms: remove unused r600_gart_clear_page drm/radeon/kms: remove HDP flushes from fence emit (v2) drm/radeon/kms: add LVDS pll quirk for Dell Studio 15 drm/radeon/kms: simplify picking power state ... Conflicts: drivers/gpu/drm/radeon/atom.c drivers/gpu/drm/radeon/atombios.h drivers/gpu/drm/radeon/atombios_dp.c drivers/gpu/drm/radeon/r600.c drivers/gpu/drm/radeon/r600_audio.c drivers/gpu/drm/radeon/r600_cp.c drivers/gpu/drm/radeon/radeon.h drivers/gpu/drm/radeon/radeon_connectors.c drivers/gpu/drm/radeon/radeon_ring.c drivers/gpu/drm/radeon/rv770.c
2010-02-25drm/nouveau: new gem pushbuf interface, bump to 0.0.16Ben Skeggs
This commit breaks the userspace interface, and requires a new libdrm for nouveau to operate again. The multiple GEM_PUSHBUF ioctls that were present in 0.0.15 for compatibility purposes are now gone, and replaced with the new ioctl which allows for multiple push buffers to be submitted (necessary for hw index buffers in the nv50 3d driver) and relocations to be applied on any buffer. A number of other ioctls (CARD_INIT, GEM_PIN, GEM_UNPIN) that were needed for userspace modesetting have also been removed. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-02-25drm/radeon/kms: add support for square microtiles on r3xx-r5xxMarek Olšák
Signed-off-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-22drm: Add generic multipart buffer.Pauli Nieminen
Allocating multiple pages of memory for data that is coming from user space may fail. To fix memory allocation failures the buffer object should be split to multiple independ pages. drm buffer provides generic interface to copy and process large data arrays from user space. Interface includes allocation and free functions to allocate the buffer object and data storage pages. All access operations are performed relative to a internal pointer which is advanced with drm_buffer_advance function. The buffer can be accessed using drm_buffer_pointer_to_XXX functions if it is known that requested object doesn't split over a page boundary. These functions don't do any error checking to maximize performance. If there is large object which could be split there is special drm_buffer_read_object function. drm_buffer_read_object takes a pointer as argument which is used as temporary store for data if it is split over boundary in the buffer. Signed-off-by: Pauli Nieminen <suokkos@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-11drm: introduce drm_gem_object_[handle_]unreference_unlockedLuca Barbieri
This patch introduces the drm_gem_object_unreference_unlocked and drm_gem_object_handle_unreference_unlocked functions that do not require holding struct_mutex. drm_gem_object_unreference_unlocked calls the new ->gem_free_object_unlocked entry point if available, and otherwise just takes struct_mutex and just calls ->gem_free_object Signed-off-by: Luca Barbieri <luca@luca-barbieri.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-11Merge remote branch 'nouveau/for-airlied' of nouveau-2.6Dave Airlie
* 'nouveau/for-airlied' of /home/airlied/kernel/drm-next: nouveau: fix state detection with switchable graphics drm/nouveau: move dereferences after null checks drm/nv50: make the pgraph irq handler loop like the pre-nv50 version drm/nv50: delete ramfc object after disabling fifo, not before drm/nv50: avoid unloading pgraph context when ctxprog is running drm/nv50: align size of buffer object to the right boundaries. drm/nv50: disregard dac outputs in nv50_sor_dpms() drm/nv50: prevent multiple init tables being parsed at the same time drm/nouveau: make dp auxch xfer len check for reads only drm/nv40: make INIT_COMPUTE_MEM a NOP, just like nv50 drm/nouveau: Add proper vgaarb support. drm/nouveau: Fix fbcon on mixed pre-NV50 + NV50 multicard. drivers/gpu/drm/nouveau/nouveau_grctx.c: correct NULL test drm/nouveau: call ttm_bo_wait with the bo lock held to prevent hang drm/nouveau: Fixup semaphores on pre-nv50 cards. drm/nouveau: Add getparam to get available PGRAPH units. drm/nouveau: Add module options to disable acceleration. drm/nouveau: fix non-vram notifier blocks
2010-02-11drm/vmwgfx: Drop scanout flag compat and add execbuf ioctl parameter ↵Jakob Bornecrantz
members. Bumps major. Even if this bumps the version to 1 it does not mean the driver is out of staging. From what we know this is the last backwards incompatible change to the driver. Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-11drm/vmwgfx: Update the user-space interface.Thomas Hellstrom
When time-based throttling is implemented, we need to bump minor. When the old way of detecting scanout is removed, we need to bump major. In the meantime, this change should not break existing user-space. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-09drm/nouveau: Add getparam to get available PGRAPH units.Marcin Kościelnicki
On nv50, this will be needed by applications using CUDA to know how much stack/local memory to allocate. Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-02-08drm/radeon/kms: add initial Evergreen support (Radeon HD 5xxx)Alex Deucher
This adds initial Evergreen KMS support, it doesn't include any acceleration features or interrupt handling yet. Major changes are DCE4 handling for PLLs for the > 2 crtcs. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-08drm/radeon/kms: add support for hardcoded edids in rom (v2)Alex Deucher
Some servers hardcode an edid in rom so that they will work properly with KVMs. This is a port of the relevant code from the ddx. [airlied: reworked to validate edid at boot stage - and remove special quirk, if there is a valid EDID in the BIOS rom we'll just try and use it.] Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-01Merge branch 'drm-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/radeon/kms: Fix oops after radeon_cs_parser_init() failure. drm/radeon/kms: move radeon KMS on/off switch out of staging. drm/radeon/kms: Bailout of blit if error happen & protect with mutex V3 drm/vmwgfx: Don't send bad flags to the host drm/vmwgfx: Request SVGA version 2 and bail if not found drm/vmwgfx: Correctly detect 3D drm/ttm: remove unnecessary save_flags and ttm_flag_masked in ttm_bo_util.c drm/kms: Remove incorrect comment in struct drm_mode_modeinfo drm/ttm: remove padding from ttm_ref_object on 64bit builds drm/radeon/kms: release agp on error. drm/kms/radeon/agp: Move the check of the aper_size after drm_acp_acquire and drm_agp_info drm/kms/radeon/agp: Fix warning, format ‘%d’ expects type ‘int’, but argument 4 has type ‘size_t’ drm/ttm: Avoid conflicting reserve_memtype during ttm_tt_set_page_caching. drm/kms/radeon: pick digitial encoders smarter. (v3) drm/radeon/kms: use active device to pick connector for encoder drm/radeon/kms: fix incorrect logic in DP vs eDP connector checking.
2010-02-01drm/kms: Remove incorrect comment in struct drm_mode_modeinfoMarcin Kościelnicki
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-26Merge branch 'drm-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (95 commits) drm/radeon/kms: preface warning printk with driver name drm/radeon/kms: drop unnecessary printks. drm: fix regression in fb blank handling drm/radeon/kms: make hibernate work on IGPs drm/vmwgfx: Optimize memory footprint for DMA buffers. drm/ttm: Allow system memory as a busy placement. drm/ttm: Fix race condition in ttm_bo_delayed_delete (v3, final) drm/nv50: prevent switching off SOR when in use for DVI-over-DP drm/nv50: fail auxch transaction if reply count not what we expect drm/nouveau: fix failure path if userspace specifies no valid memtypes drm/nouveau: report LVDS as disconnected if lid closed drm/radeon/kms: fix legacy get_engine/memory clock drm/radeon/kms/atom: atom parser fixes drm/radeon/kms: clean up atombios pll code drm/radeon/kms: clean up pll struct drm/radeon/kms/atom: fix crtc lock ordering drm/radeon: r6xx/r7xx possible security issue, system ram access drm/radeon/kms: r600/r700 don't test ib if ib initialization fails drm/radeon/kms: Forbid creation of framebuffer with no valid GEM object drm/radeon/kms: r600 handle irq vector ring overflow ...
2010-01-14drm/ttm: Add a swap_notify callback.Thomas Hellstrom
This is needed for a bugfix in the vmwgfx driver. Drivers may have GPU bindings on buffers that core TTM is not aware of, and TTM may view those buffers as ordinary system memory buffers. Add a notifier to such drivers when TTM is about to move the buffer contents out to swappable memory. The driver must then release any private GPU bindings on those buffers. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-11Merge branch 'drm-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (45 commits) drm/nv04: Fix set_operation software method. drm/nouveau: initialise DMA tracking parameters earlier drm/nouveau: use dma.max rather than pushbuf size for checking GET validity drm/nv04: differentiate between nv04/nv05 drm/nouveau: Fix null deref in nouveau_fence_emit due to deleted fence drm/nv50: prevent a possible ctxprog hang drm/nouveau: have ttm's fault handler called directly drm/nv50: restore correct cache1 get/put address on fifoctx load drm/nouveau: create function for "dealing" with gpu lockup drm/nouveau: remove unused nouveau_channel_idle() function drm/nouveau: fix handling of fbcon colours in 8bpp drm/nv04: Context switching fixes. drm/nouveau: Use the software object for fencing. drm/nouveau: Allocate a per-channel instance of NV_SW. drm/nv50: make the blocksize depend on vram size drm/nouveau: better alignment of bo sizes and use roundup instead of ALIGN drm/nouveau: Don't skip card take down on nv0x. drm/nouveau: Implement nv42-nv43 TV load detection. drm/nouveau: Clean up the nv17-nv4x load detection code a bit. drm/nv50: fix fillrect color ...
2010-01-11Merge remote branch 'korg/drm-radeon-next' into drm-linusDave Airlie
* korg/drm-radeon-next: drm/radeon/kms: add additional safe regs for r4xx/rs6xx and r5xx drm/radeon/kms: Don't try to enable IRQ if we have no handler installed drm: Avoid calling vblank function is vblank wasn't initialized drm/radeon: mkregtable.c: close a file before exit drm/radeon/kms: Make sure we release AGP device if we acquired it drm/radeon/kms: Schedule host path read cache flush through the ring V2 drm/radeon/kms: Workaround RV410/R420 CP errata (V3) drm/radeon/kms: detect sideport memory on IGP chips drm/radeon: fix a couple of array index errors drm/radeon/kms: add support for eDP (embedded DisplayPort) drm: Add eDP connector type drm/radeon/kms: pull in the latest upstream ObjectID.h changes drm/radeon/kms: whitespace changes to ObjectID.h drm/radeon/kms: fix typo in atom connector type handling
2010-01-08Merge remote branch 'korg/drm-radeon-testing' into drm-testingDave Airlie