aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/ttm (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
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 <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-06vmwgfx: Fix confusion caused by using "fence" in various placesThomas Hellstrom9-112/+110
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 <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-06vmwgfx: Add functionality to get 3D capsThomas Hellstrom4-0/+80
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 <thellstrom@vmware.com> Reviewed-by: Jakob Bornecranz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-06vmwgfx: Remove the possibility to map the fifo from user-spaceThomas Hellstrom5-59/+5
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 <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-06vmwgfx: Remove the update layout IOCTL.Thomas Hellstrom4-57/+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 <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-06vmwgfx: Remove the fifo debug ioctlThomas Hellstrom5-83/+2
It was only used for bringup debugging, and probably doesn't work anymore. Remove it. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
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 <thellstrom@vmware.com> Reviewed-by: Jakob Bornecantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-01vmwgfx: Update register definitions for HWV8 and print out new capabilitiesThomas Hellstrom2-1/+99
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
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 <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
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 <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
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 <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-01vmwgfx: Print error diagnostics if depth doesn't match the host expectationMichel Dänzer4-17/+23
Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-01vmwgfx: Fix 'bbp' typoMichel Dänzer3-7/+7
Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-01vmwgfx: Don't write to read-only registersMichel Dänzer2-19/+0
Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-01vmwgfx: Add support for depth 8Michel Dänzer2-0/+14
Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-01vmwgfx: Let SVGA_REG_NUM_DISPLAYS determine output connectivityThomas Hellstrom1-3/+10
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-31drm/radeon/kms: add a new gem_wait ioctl with read/write flagsMarek Olšák7-7/+55
The new DRM_RADEON_GEM_WAIT ioctl combines GEM_WAIT_IDLE and GEM_BUSY (there is a NO_WAIT flag to get the latter) with USAGE_READ and USAGE_WRITE flags to take advantage of the new ttm_bo_wait changes. Also bump the DRM version. Signed-off-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-31drm/ttm: add a way to bo_wait for either the last read or last writeMarek Olšák11-39/+139
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 <maraeo@gmail.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-30drm/i915: use common functions for mmap offset creationRob Clark1-83/+2
Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-30drm/gem: add functions for mmap offset creationRob Clark2-0/+91
Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-30drm/radeon/kms: add s/r quirk for Compaq Presario V5245EUAlex Deucher1-0/+8
Fixes resume on Compaq Presario V5245EU. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=41642 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-30drm/radeon/kms: evergreen & ni reset SPI block on CP resumeJerome Glisse2-0/+2
For some reason SPI block is in broken state after module unloading. This lead to broken rendering after reloading module. Fix this by reseting SPI block in CP resume function Signed-off-by: Jerome Glisse <jglisse@redhat.com Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-29drm: Fix the number of connector and encoder to cleanup functionsJoonyoung Shim1-0/+2
It is left out the code to decrease the number of connector and encoder to the cleanup functions. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-28Linux 3.1-rc4Linus Torvalds1-1/+1
2011-08-27ARM: mach-shmobile: sh7372 LCDC1 suspend fix V2 (incremental)Magnus Damm1-1/+1
This patch updates the recently submitted "Associate the HDMI clock together with LCDC1 on sh7372" to V2 with the following change: - Use lcdc1_device on AP4EVB to build properly. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-08-26All Arch: remove linkage for sys_nfsservctl system callNeilBrown33-44/+27
The nfsservctl system call is now gone, so we should remove all linkage for it. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-26sfi: table irq 0xFF means 'no interrupt'Kirill A. Shutemov1-1/+3
According to the SFI specification irq number 0xFF means device has no interrupt or interrupt attached via GPIO. Currently, we don't handle this special case and set irq field in *_board_info structs to 255. It leads to confusion in some drivers. Accelerometer driver tries to register interrupt 255, fails and prints "Cannot get IRQ" to dmesg. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-25arch/powerpc/sysdev/fsl_rio.c: correct IECSR register clear valueLiu Gang-B341821-2/+3
This bug causes the IECSR register clear failure. In this case, the RETE (retry error threshold exceeded) interrupt will be generated and cannot be cleared. So the related ISR may be called persistently. The RETE bit in IECSR is cleared by writing a 1 to it. Signed-off-by: Liu Gang <Gang.Liu@freescale.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-25drivers/rtc/rtc-s3c.c: allow multiple open / allow no-ioctl-open'ed rtc to have irq.MyungJoo Ham1-42/+25
The previous rtc-s3c had two issues related with its IRQ. 1. Users cannot open rtc multiple times because an open operation calls request_irq on the same IRQ. (e.g., two user processes wants to open and read RTC time from rtc-s3c at the same time) 2. If alarm is set and no one has the rtc opened with filesystem (either the alarm is set by kernel/boot-loader or user set an alarm and closed rtc dev file), the pending bit is not cleared and no further interrupt is invoked. When the alarm is used by the system itself such as a resume from suspend-to-RAM or other Low-power modes/idle, this is a critical issue. This patch mitigates these issues by calling request_irq at probe and free_irq at remove. Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Changhwan Youn <chaos.youn@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-25drivers/rtc/rtc-s3c.c: correct debug messagesMyungJoo Ham1-6/+6
RTC-S3C used to print out debug messages incorrectly. This patch corrects incorrect outputs. (undecoded bcd numbers, incorrectly decoded register values) This patch affects the pr-debug messages only. Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Changhwan Youn <chaos.youn@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-25drivers/leds/leds-bd2802.c: bd2802_unregister_led_classdev() should unregister all registered ledsAxel Lin1-0/+5
bd2802_unregister_led_classdev() should unregister all registered instances of led_classdev class that had registered by bd2802_register_led_classdev(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Kim Kyuwon <q1.kim@samsung.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>