aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vmwgfx
AgeCommit message (Collapse)AuthorFilesLines
2011-10-05vmwgfx: Add dmabuf helper functions for pinningJakob Bornecrantz7-107/+379
Signed-off-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-10-05vmwgfx: Refactor common display unit functions to shared fileJakob Bornecrantz3-255/+282
More preparation for Screen Object support. Signed-off-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-10-05vmwgfx: Expand the command checker to cover screen object commandsJakob Bornecrantz1-5/+72
Signed-off-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-10-05vmwgfx: Break out dirty submission codeJakob Bornecrantz1-54/+90
In preperation for screen objects, still leaves the delayed workqueue for surface updates in place. Signed-off-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-10-05vmwgfx: Break out execbuf command processingThomas Hellstrom2-56/+89
This will make it easier to execute commands operating on user-space resources but generated by the kernel. JB: Added tracking if the sw_context was called from the kernel or userspace. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-10-05vmwgfx: Some comments and BUG_ONJakob Bornecrantz1-0/+5
Signed-off-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-10-05vmwgfx: Make sure the reserved area is at the start of vramJakob Bornecrantz1-0/+3
Signed-off-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-10-05vmwgfx: Add comments for buffer pinning codeJakob Bornecrantz1-0/+10
Signed-off-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-10-05vmwgfx: Document vmw_fifo_reserveJakob Bornecrantz1-0/+10
Signed-off-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-10-05vmwgfx: Update register files to latest from vmware-sdkJakob Bornecrantz4-144/+359
Signed-off-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-06vmwgfx: Bump majorThomas Hellstrom2-3/+17
This bumps driver major version as a result of previous incompatible interface changes. In addition, a leftover command definition is removed from the vmwgfx_drm.h header. Also a strict version check is enforced on the exebuf ioctl. This is intended to be the last major bump before exiting staging. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-06vmwgfx: Implement fence objectsThomas Hellstrom9-72/+876
Will be needed for queries and drm event-driven throttling. As a benefit, they help avoid stale user-space fence handles. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-06vmwgfx: Make vmw_wait_seqno a bit more readableThomas Hellstrom3-24/+37
Break out on-demand enabling and disabling of fence irqs to make the function more readable. Also make dev_priv->fence_queue_waiters an int instead of an atomic_t since we only manipulate it with dev_priv->hw_mutex held. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-06vmwgfx: Fix confusion caused by using "fence" in various placesThomas Hellstrom8-109/+107
This is needed before we introduce the fence objects. Otherwise this will be even more confusing. The plan is to use the following: seqno: A 32-bit sequence number that may be passed in the fifo. marker: Objects, carrying a seqno, that track fifo submission time. They are used for fifo lag based throttling. fence objects: Kernel space objects, possibly accessible from user-space and carrying a 32-bit seqno together with signaled status. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-06vmwgfx: Add functionality to get 3D capsThomas Hellstrom3-0/+55
Since we don't allow user-space to map the fifo anymore, add a parameter to get fifo hw version and an ioctl to copy the 3D capabilities. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecranz <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-06vmwgfx: Remove the possibility to map the fifo from user-spaceThomas Hellstrom4-55/+2
This was previously used by user-space to check whether a fence sequence had passed or not. With fence objects that's not needed anymore. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-06vmwgfx: Remove the update layout IOCTL.Thomas Hellstrom3-54/+0
It doesn't seem like its needed. If this turns out to be an incorrect assumption, we can reinstate it. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-06vmwgfx: Remove the fifo debug ioctlThomas Hellstrom4-55/+0
It was only used for bringup debugging, and probably doesn't work anymore. Remove it. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-01vmwgfx: Implement GMR2Thomas Hellstrom1-1/+80
Guest Memory Regions 2 is a way to bind pages to the GPU, but using the FIFO instead of an io-submitted descriptor chain. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecantz <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-01vmwgfx: Update register definitions for HWV8 and print out new capabilitiesThomas Hellstrom2-1/+99
Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: José Fonseca <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-01vmwgfx: Restrict number of GMR pages to device limitThomas Hellstrom3-11/+49
When GMR2 is available, make sure we restrict the number of used GMR pages to the limit indicated by the device. This is done by failing a GMRID allocation if the total number of GMR pages exceeds the limit. As a result TTM will then start evicting buffers in GMR memory on a LRU basis until the allocation succeeds. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-01vmwgfx: Switch to VGA when we drop master and vmwgfx fbdev is not activeThomas Hellstrom3-18/+48
Previously this was not done when any 3D resource was active, since that meant disabling the fifo with all 3D state lost. Now, if there are still 3D resources active, we use the svga hide feature. This fixes X server VT switching with 3D enabled. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-01vmwgfx: Fix potential execbuf deadlocksThomas Hellstrom4-48/+139
Perform all command stream validation in a bounce buffer separate from the fifo. This makes the fifo available to all validation-generated commands, which would otherwise attempt to grab the fifo recursively, causing a deadlock. This is in preparation for GMR2 and swappable surfaces. Also maintain references to all surfaces in the command stream until the command stream has been fired in order to avoid racing with surface destruction taking place after validation but before submission. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-01vmwgfx: Print error diagnostics if depth doesn't match the host expectationMichel Dänzer4-17/+23
Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-01vmwgfx: Fix 'bbp' typoMichel Dänzer3-7/+7
Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-01vmwgfx: Don't write to read-only registersMichel Dänzer2-19/+0
Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-01vmwgfx: Add support for depth 8Michel Dänzer2-0/+14
Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-09-01vmwgfx: Let SVGA_REG_NUM_DISPLAYS determine output connectivityThomas Hellstrom1-3/+10
Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-08-31drm/ttm: add a way to bo_wait for either the last read or last writeMarek Olšák1-0/+1
Sometimes we want to know whether a buffer is busy and wait for it (bo_wait). However, sometimes it would be more useful to be able to query whether a buffer is busy and being either read or written, and wait until it's stopped being either read or written. The point of this is to be able to avoid unnecessary waiting, e.g. if a GPU has written something to a buffer and is now reading that buffer, and a CPU wants to map that buffer for read, it needs to only wait for the last write. If there were no write, there wouldn't be any waiting needed. This, or course, requires user space drivers to send read/write flags with each relocation (like we have read/write domains in radeon, so we can actually use those for something useful now). Now how this patch works: The read/write flags should passed to ttm_validate_buffer. TTM maintains separate sync objects of the last read and write for each buffer, in addition to the sync object of the last use of a buffer. ttm_bo_wait then operates with one the sync objects. Signed-off-by: Marek Olšák <[email protected]> Reviewed-by: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-07-25drivers: use kzalloc/kcalloc instead of 'kmalloc+memset', where possibleRakib Mullick2-7/+4
Signed-off-by: Rakib Mullick <[email protected]> Cc: Jeff Garzik <[email protected]> Cc: David Airlie <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-31Fix common misspellingsLucas De Marchi1-1/+1
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <[email protected]>
2011-02-23Revert "ttm: Include the 'struct dev' when using the DMA API."Dave Airlie1-1/+1
This reverts commit 5a893fc28f0393adb7c885a871b8c59e623fd528. This causes a use after free in the ttm free alloc pages path, when it tries to get the be after the be has been destroyed. Signed-off-by: Dave Airlie <[email protected]>
2011-02-23Merge branch 'stable/ttm.pci-api.v5' of ↵Dave Airlie2-2/+3
git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into drm-next * 'stable/ttm.pci-api.v5' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: ttm: Include the 'struct dev' when using the DMA API. nouveau/ttm/PCIe: Use dma_addr if TTM has set it. radeon/ttm/PCIe: Use dma_addr if TTM has set it. ttm: Expand (*populate) to support an array of DMA addresses. ttm: Utilize the DMA API for pages that have TTM_PAGE_FLAG_DMA32 set. ttm: Introduce a placeholder for DMA (bus) addresses.
2011-02-23drm: Mark constant arrays of drm_display_mode constChris Wilson1-2/+3
... and fixup some methods to accept the constant argument. Now that constant module arrays are loaded into read-only memory, using const appropriately has some benefits beyond warning the programmer about likely mistakes. Signed-off-by: Chris Wilson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-02-22ttm: Include the 'struct dev' when using the DMA API.Konrad Rzeszutek Wilk1-1/+1
This makes the accounting when using 'debug_dma_dump_mappings()' and CONFIG_DMA_API_DEBUG=y be assigned to the correct device instead of 'fallback'. No functional change - just cosmetic. Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
2011-02-07drm: rework PCI/platform driver interface.Dave Airlie1-11/+12
This abstracts the pci/platform interface out a step further, we can go further but this is far enough for now to allow USB to be plugged in. The drivers now just call the init code directly for their device type. Signed-off-by: Dave Airlie <[email protected]>
2011-01-27ttm: Expand (*populate) to support an array of DMA addresses.Konrad Rzeszutek Wilk1-1/+2
We pass in the array of ttm pages to be populated in the GART/MM of the card (or AGP). Patch titled: "ttm: Utilize the DMA API for pages that have TTM_PAGE_FLAG_DMA32 set." uses the DMA API to make those pages have a proper DMA addresses (in the situation where page_to_phys or virt_to_phys do not give use the DMA (bus) address). Since we are using the DMA API on those pages, we should pass in the DMA address to this function so it can save it in its proper fields (later patches use it). [v2: Added reviewed-by tag] Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Tested-by: Ian Campbell <[email protected]>
2011-01-10Merge branch 'drm-core-next' of ↵Linus Torvalds3-6/+1
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (390 commits) drm/radeon/kms: disable underscan by default drm/radeon/kms: only enable hdmi features if the monitor supports audio drm: Restore the old_fb upon modeset failure drm/nouveau: fix hwmon device binding radeon: consolidate asic-specific function decls for pre-r600 vga_switcheroo: comparing too few characters in strncmp() drm/radeon/kms: add NI pci ids drm/radeon/kms: don't enable pcie gen2 on NI yet drm/radeon/kms: add radeon_asic struct for NI asics drm/radeon/kms/ni: load default sclk/mclk/vddc at pm init drm/radeon/kms: add ucode loader for NI drm/radeon/kms: add support for DCE5 display LUTs drm/radeon/kms: add ni_reg.h drm/radeon/kms: add bo blit support for NI drm/radeon/kms: always use writeback/events for fences on NI drm/radeon/kms: adjust default clock/vddc tracking for pm on DCE5 drm/radeon/kms: add backend map workaround for barts drm/radeon/kms: fill gpu init for NI asics drm/radeon/kms: add disabled vbios accessor for NI asics drm/radeon/kms: handle NI thermal controller ...
2010-12-24vmwgfx: don't use flush_scheduled_work()Tejun Heo1-1/+1
flush_scheduled_work() is deprecated and scheduled to be removed. Directly flush info->deferred_work on removal instead. Signed-off-by: Tejun Heo <[email protected]> Cc: Thomas Hellstrom <[email protected]>
2010-12-21drm/fb: Don't expose mmio for fbdev emulation layerJames Simmons1-3/+0
For the fbdev api if the struct fb_var_screeninfo accel_flags field is set to FB_ACCELF_TEXT then userland applications can not mmap the mmio region. Since it is a bad idea for DRM drivers to expose the mmio region via the fbdev layer we always set the accel_flags to prevent this. Please apply. Signed-off-by: James Simmons <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-22drm/ttm/vmwgfx: Have TTM manage the validation sequence.Thomas Hellstrom2-3/+1
Rather than having the driver supply the validation sequence, leave that responsibility to TTM. This saves some confusion and a function argument. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-18drm/vmwgfx: Fix up an error path during bo creationThomas Hellstrom1-6/+8
Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-09drm: vmwgfx: fix information leak to userlandKulikov Vasiliy1-0/+1
Structure drm_vmw_fence_rep is copied to userland with field "pad64" uninitialized. It leads to leaking of contents of kernel stack memory. Signed-off-by: Vasiliy Kulikov <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-09drm/vmwgfx: Fix oops on failing bo pinThomas Hellstrom1-0/+5
When bo pin failed during modesetting, vmwgfx would try to unref a non-existing buffer object. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-11-09drivers/gpu/drm/vmwgfx: Fix k.alloc switched argumentsJoe Perches2-2/+2
Signed-off-by: Joe Perches <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-10-26Merge branch 'drm-core-next' of ↵Linus Torvalds12-212/+567
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (476 commits) vmwgfx: Implement a proper GMR eviction mechanism drm/radeon/kms: fix r6xx/7xx 1D tiling CS checker v2 drm/radeon/kms: properly compute group_size on 6xx/7xx drm/radeon/kms: fix 2D tile height alignment in the r600 CS checker drm/radeon/kms/evergreen: set the clear state to the blit state drm/radeon/kms: don't poll dac load detect. gpu: Add Intel GMA500(Poulsbo) Stub Driver drm/radeon/kms: MC vram map needs to be >= pci aperture size drm/radeon/kms: implement display watermark support for evergreen drm/radeon/kms/evergreen: add some additional safe regs v2 drm/radeon/r600: fix tiling issues in CS checker. drm/i915: Move gpu_write_list to per-ring drm/i915: Invalidate the to-ring, flush the old-ring when updating domains drm/i915/ringbuffer: Write the value passed in to the tail register agp/intel: Restore valid PTE bit for Sandybridge after bdd3072 drm/i915: Fix flushing regression from 9af90d19f drm/i915/sdvo: Remove unused encoding member i915: enable AVI infoframe for intel_hdmi.c [v4] drm/i915: Fix current fb blocking for page flip drm/i915: IS_IRONLAKE is synonymous with gen == 5 ... Fix up conflicts in - drivers/gpu/drm/i915/{i915_gem.c, i915/intel_overlay.c}: due to the new simplified stack-based kmap_atomic() interface - drivers/gpu/drm/vmwgfx/vmwgfx_drv.c: added .llseek entry due to BKL removal cleanups.
2010-10-27vmwgfx: Implement a proper GMR eviction mechanismThomas Hellstrom9-160/+252
Use Ben's new range manager hooks to implement a manager for GMRs that manages ids rather than ranges. This means we can use the standard TTM code for binding, unbinding and eviction. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-10-24Merge branch 'for-next' of ↵Linus Torvalds2-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits) Update broken web addresses in arch directory. Update broken web addresses in the kernel. Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget Revert "Fix typo: configuation => configuration" partially ida: document IDA_BITMAP_LONGS calculation ext2: fix a typo on comment in ext2/inode.c drivers/scsi: Remove unnecessary casts of private_data drivers/s390: Remove unnecessary casts of private_data net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data drivers/infiniband: Remove unnecessary casts of private_data drivers/gpu/drm: Remove unnecessary casts of private_data kernel/pm_qos_params.c: Remove unnecessary casts of private_data fs/ecryptfs: Remove unnecessary casts of private_data fs/seq_file.c: Remove unnecessary casts of private_data arm: uengine.c: remove C99 comments arm: scoop.c: remove C99 comments Fix typo configue => configure in comments Fix typo: configuation => configuration Fix typo interrest[ing|ed] => interest[ing|ed] Fix various typos of valid in comments ... Fix up trivial conflicts in: drivers/char/ipmi/ipmi_si_intf.c drivers/usb/gadget/rndis.c net/irda/irnet/irnet_ppp.c
2010-10-22Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bklLinus Torvalds1-0/+1
* 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl: vfs: make no_llseek the default vfs: don't use BKL in default_llseek llseek: automatically add .llseek fop libfs: use generic_file_llseek for simple_attr mac80211: disallow seeks in minstrel debug code lirc: make chardev nonseekable viotape: use noop_llseek raw: use explicit llseek file operations ibmasmfs: use generic_file_llseek spufs: use llseek in all file operations arm/omap: use generic_file_llseek in iommu_debug lkdtm: use generic_file_llseek in debugfs net/wireless: use generic_file_llseek in debugfs drm: use noop_llseek
2010-10-06Merge remote branch 'nouveau/for-airlied' of ../drm-nouveau-next into ↵Dave Airlie2-2/+5
drm-core-next [airlied - add fix for vmwgfx build] * 'nouveau/for-airlied' of ../drm-nouveau-next: (93 commits) drm/ttm: restructure to allow driver to plug in alternate memory manager drm/ttm: introduce utility function to free an allocated memory node drm/nouveau: fix thinkos in mem timing table recordlen check drm/nouveau: parse voltage from perf 0x40 entires drm/nouveau: don't use the default pll limits in table v2.1 on nv50+ cards drm/nv50: Fix large 3D performance regression caused by the interchannel sync patches. drm/nouveau: Synchronize buffer object moves in hardware. drm/nouveau: Use semaphores to handle inter-channel sync in hardware. drm/nouveau: Provide a means to have arbitrary work run on fence completion. drm/nouveau: Minor refactoring/cleanup of the fence code. drm/nouveau: Add a module option to force card POST. drm/nv50: prevent (IB_PUT == IB_GET) for occurring unless idle drm/nv0x-nv4x: Leave the 0x40 bit untouched when changing CRE_LCD. drm/nv30-nv40: Fix postdivider mask when writing engine/memory PLLs. drm/nouveau: Fix perf table parsing on BMP v5.25. drm/nouveau: fix required mode bandwidth calculation for DP drm/nouveau: fix typo in c2aa91afea5f7e7ae4530fabd37414a79c03328c drm/nva3: split pm backend out from nv50 drm/nouveau: run perflvl and M table scripts on mem clock change drm/nouveau: pass perflvl struct to clock_pre() ...