aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-07-20drm/i915/context: Add missing IVB context sizesBen Widawsky1-1/+5
There were some fields missed. Daniel pointed this out in review, and I know I fixed it, but something happened somehow and some time. Signed-off-by: Ben Widawsky <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2012-07-20drm/i915/context/: s/CTX/CXTBen Widawsky2-11/+11
*sigh* the docs had it spelled wrong, corrected it, and then proceeded to re-do the original error. The original code preserved this history, and this patch attempts to keep in sync with the current docs. Signed-off-by: Ben Widawsky <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2012-07-20Merge tag 'v3.5-rc7' into drm-nextDave Airlie583-3062/+4871
Merge Linus tree into drm to fixup conflicts in radeon code for further testing before upstream merge. Signed-off-by: Dave Airlie <[email protected]> Conflicts: drivers/gpu/drm/i915/i915_dma.c drivers/gpu/drm/i915/intel_display.c drivers/gpu/drm/radeon/radeon_gart.c
2012-07-19drm/sis: fixup sis_mm ioctl structsDaniel Vetter2-7/+7
Userspace uses long in quite a few places more than the kernel. Which gives me neat proof that I'm the only guy on this side of the galaxy who ever tried to run glxgears on a 64bit machine with sis graphics on linux. Note that the longs in drm_sis_mem_t aren't aligned properly, so this won't even work with 32bit userspace on 64bit kernel as-is. Hence the patch can't break that, either. Nope, I'm not nuts enough to write the 32bit ioctl compat layer for this and test it with some wine app. Even though hunting the ebay dungeons for a sis card actually supported by the mesa drivers casts some doubts on this ... Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm: kill i915/i830 ids from drm_pciids.hDaniel Vetter1-42/+0
Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm: unconditionally clean up dma buffers of closing clientsDaniel Vetter1-3/+3
With the last patch to ditch DMA_QUEUE support, we should be able to call the dma cleanup uncoditionally, even when the master has disappeared. Do so because it just makes more sense. Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm: kill dma queue supportDaniel Vetter9-80/+4
Absolutely unused. All the values are only ever initialized and then used at most in some debug printout functions. Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm: ditch strange DRIVER_DMA_QUEUE only error bail-outDaniel Vetter1-4/+0
Only one driver (i810) even sets that flag. Now the actual locking code uncoditionally promotes lock->context to an unsigned int. Closer inspection of the userspace reveals that the drm lock context is defined as an unsigned int (at least on linux). I suspect we just have a strange case of signedness confusion going on. Tested on my i815, doesn't seem to break anything. Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm: kill reclaim_buffers callbackDaniel Vetter9-13/+2
All leftover users either haven't set DRIVER_HAVE_DMA, in which case this will never be called, or use the drm_core implementation. Call that directly in the only callsite. Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm/savage: clean up reclaim_buffersDaniel Vetter2-3/+8
The reclaim_buffers function of the savage driver actually wants to run with the hw_lock held - at least there are printks in the call-chain to that effect. But the drm core only calls reclaim_buffers as used by savage _after_ forcefully dropping the hwlock (in case it's still hold by the closing fd). So do the same idlelock dance as for the other dma drivers and hope that papers over any issues. v2: Don't let the idlelock linger around. Signed-off-by: Daniel Vetter <[email protected]> Tested-by: Tormod Volden <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm: kill reclaim_buffers_lockedDaniel Vetter3-48/+1
i810 was the last user of this code, with that gone, kill it. Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19Revert "Revert "drm/i810: cleanup reclaim_buffers""Daniel Vetter3-11/+13
This reverts commit 6e877b576ddf7cde5db2e9a6dcb56fef0ea77e64, reinstating the original commit: commit 87499ffdcb1c70f66988cd8febc4ead0ba2f9118 Author: Daniel Vetter <[email protected]> Date: Tue Oct 25 23:51:24 2011 +0200 drm/i810: cleanup reclaim_buffers My dear old i815 always hits the deadlocked on reclaim_buffers warning. Switch over to the idlelock duct-tape on hope that works better. I've fired up my i815 and now closing glxgears doesn't take 5 seconds anymore. \o/ The original problem with that was that I've moved it ahead in the series so that it could be included despite some patches not being ready quite yet. The little problem is that this patch required some of the previous rework to work correctly. Now that everything is in the right order again, this actually works on my i810 and does speed up closing gl apps as the original commit claimed. Without hanging the machine, as the revert says. Signed-Off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm: kill reclaim_buffers_idlelocked functionsDaniel Vetter2-10/+0
The only two users are now folded into the drivers preclose functions, so this is unused. Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm/sis: clean up reclaim_buffersDaniel Vetter2-4/+12
Like for via. v2: Actually drop the idlelock again if taken. v3: Fixup. v4: Fixup the "has master" vs. "is master" confusion the refactor introduced. v5: Drop the idlelock in the early return path. Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm/via: clean up reclaim_buffersDaniel Vetter2-5/+12
A few things - kill reclaim_buffers, it's never ever called because via does not set DRIVER_HAVE_DMA - inline the idlelock dance into the buffer reclaim logic and make it a simple preclose cleanup function - directly call the the dma_quiescent function and kill the needless if check. v2: Actually drop the idlelock when we take it. Reported by James Simmons. v3: Rebased onto latest drm-next. v4: Fixup the refactor. v5: More fixup the refactor - I've accidentally changed the check for any master to checking whether the closing fd is the master. v6: Don't forget to drop the idlelock in the early return path, too. Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm/udl: port over blanking code from udlfb.Dave Airlie1-7/+37
This ports over the dpms code from udlfb, and should mean a better chance of turning on some udl devices. Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm/radeon/kms: auto detect pcie link speed from root portDave Airlie4-3/+35
This check the root ports supported link speeds and enables GEN2 mode if the 5.0 GT link speed is available. The first 3.0 cards are SI so they will probably need more investigation. Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm/pci: add support for getting the supported link bw.Dave Airlie2-0/+54
This should work for PCIE3.0 as well. Signed-off-by: Dave Airlie <[email protected]>
2012-07-19pci_regs: define LNKSTA2 pcie cap + bits.Dave Airlie1-0/+5
We need these for detecting the max link speed for drm drivers. Acked-by: Bjorn Helgaas <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm/radeon: improve GPU lockup debugging info on r6xx/r7xx/r8xx/r9xxJerome Glisse6-0/+59
Print various CP register that have valuable informations regarding GPU lockup. Signed-off-by: Jerome Glisse <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm/mgag200: fix null pointer dereferenceDevendra Naga1-0/+3
we are referencing the pointer after doing alloc_apertures, as alloc_apertures kzallocs, the kzalloc may fail and we get a NULL. so we need to check for NULL before we dereference this pointer Signed-off-by: Devendra Naga <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm/radeon: Try harder to avoid HW cursor ending on a multiple of 128 columns.Michel Dänzer1-1/+7
This could previously fail if either of the enabled displays was using a horizontal resolution that is a multiple of 128, and only the leftmost column of the cursor was (supposed to be) visible at the right edge of that display. The solution is to move the cursor one pixel to the left in that case. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33183 Cc: [email protected] Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm: Make the .mode_fixup() operations mode argument a const pointerLaurent Pinchart55-72/+78
The passed mode must not be modified by the operation, make it const. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm: remove the list_head from drm_mode_setDaniel Vetter1-2/+0
It's unused. At it confused me quite a bit until I've discovered that. Cc: [email protected] Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm/fb helper: don't call drm_crtc_helper_set_configDaniel Vetter1-1/+1
Go through the interface vtable instead, because not everyone might be using the crtc helper code. Cc: [email protected] Signed-Off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19drm/fb-helper: delay hotplug handling when partially boundDaniel Vetter1-4/+4
Ok, this requires quite a dance to actually hit: 1) We plug in a 2nd screen, enable it in both X and (by vt-switching) in the fbcon. 2) We disable that screen again in with xrandr. 3) We vt-switch again, so that fbcon displays on the 2nd screen, but X on the first screen. This obviously needs a driver that doesn't switch off unused functions when regaining the VT. 3) When X controls the vt, we unplug that screen. Now drm_fb_helper_hotplug_event we noticed that that some crtcs are bound, but because we still have the fbcon on the 2nd screeen we also have bound set. Which means the fbcon wrongly assumes it's in control of everything an happily disables the output on the 2nd screen, but enables its fb on the first screen. Work around this issue by counting how many crtcs are bound and how many are bound to fbcon and assuming that when fbcon isn't bound to all of them, it better not touch the output configuration. Conceptually this is the same as only restoring the fbcon output configuration on the driver's ->lastclose, when we're sure that no one else is using kms. So this should be consistent with existing kms drivers. Chris has created a separate patch for the intel ddx, but I think we should fix this issue here regardless - the fbcon messing with the output config while it's not fully in control simply isn't a too polite behaviour. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50772 Tested-by: Maxim A. Nikulin <[email protected]> Signed-Off-by: Daniel Vetter <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-19Merge branch 'next' of git://people.freedesktop.org/~deathsimple/linux into ↵Dave Airlie17-138/+1814
drm-next This contains all the radeon documentation rebased on top of the ib fixes. * 'next' of git://people.freedesktop.org/~deathsimple/linux: drm/radeon: fix SS setup for DCPLL drm/radeon: fix up pll selection on DCE5/6 drm/radeon: start to document evergreen.c drm/radeon: start to document the functions r100.c drm/radeon: document VM functions in radeon_gart.c (v3) drm/radeon: document non-VM functions in radeon_gart.c (v2) drm/radeon: document radeon_ring.c (v4) drm/radeon: document radeon_fence.c (v2) drm/radeon: document radeon_asic.c drm/radeon: document radeon_irq_kms.c drm/radeon: document radeon_kms.c drm/radeon: document radeon_device.c (v2) drm/radeon: add rptr save support for r1xx-r5xx drm/radeon: update rptr saving logic for memory buffers drm/radeon: remove radeon_ring_index() drm/radeon: update ib_execute for SI (v2) drm/radeon: fix const IB handling v2 drm/radeon: let sa manager block for fences to wait for v2 drm/radeon: return an error if there is nothing to wait for
2012-07-18drm/radeon: fix SS setup for DCPLLAlex Deucher1-12/+4
Need to actually set the SS parameters rather than just 0. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-07-18drm/radeon: fix up pll selection on DCE5/6Alex Deucher1-1/+5
Selecting ATOM_PPLL_INVALID should be equivalent as the DCPLL or PPLL0 are already programmed for the DISPCLK, but the preferred method is to always specify the PLL selected. SetPixelClock will check the parameters and skip the programming if the PLL is already set up. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-07-18drm/radeon: start to document evergreen.cAlex Deucher1-0/+120
Still a lot to do. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-07-18drm/radeon: start to document the functions r100.cAlex Deucher1-3/+124
Still a lot more to do. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-07-18drm/radeon: document VM functions in radeon_gart.c (v3)Alex Deucher1-0/+142
Document the VM functions in radeon_gart.c v2: adjust per Christian's suggestions v3: adjust to Christians's latest changes Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-07-18drm/radeon: document non-VM functions in radeon_gart.c (v2)Alex Deucher1-3/+122
Document the non-VM functions in radeon_gart.c v2: adjust per Christian's suggestions Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-07-18drm/radeon: document radeon_ring.c (v4)Alex Deucher1-3/+205
Adds documentation to most of the functions in radeon_ring.c v2: adjust per Christian's suggestions v3: adjust per Christian's latest patches v4: adjust per my latest changes Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-07-18drm/radeon: document radeon_fence.c (v2)Alex Deucher1-2/+240
Adds documentation to most of the functions in radeon_fence.c v2: address Christian's comments: - split common concept description into it's own comment - fix description of intr parameter - Improve description of -EDEADLK error Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-07-18drm/radeon: document radeon_asic.cAlex Deucher1-0/+46
Adds documentation to most of the functions in radeon_asic.c Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-07-18drm/radeon: document radeon_irq_kms.cAlex Deucher1-0/+150
Adds documentation to most of the functions in radeon_irq_kms.c Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-07-18drm/radeon: document radeon_kms.cAlex Deucher1-0/+126
Adds documentation to most of the functions in radeon_kms.c Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-07-18drm/radeon: document radeon_device.c (v2)Alex Deucher1-3/+310
Adds documentation to most of the functions in radeon_device.c v2: split out general descriptions as per Christian's comments. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-07-18drm/radeon: add rptr save support for r1xx-r5xxAlex Deucher1-0/+15
Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-07-18drm/radeon: update rptr saving logic for memory buffersAlex Deucher5-9/+67
Add support for using memory buffers rather than scratch registers. Some rings may not be able to write to scratch registers. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-07-18drm/radeon: remove radeon_ring_index()Alex Deucher5-45/+27
Just store the index in the ring structure. Idea taken from one of Jerome's wip rptr patches. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-07-18drm/radeon: update ib_execute for SI (v2)Alex Deucher2-21/+29
When submitting a CONST_IB, emit a SWITCH_BUFFER packet before the CONST_IB. This isn't strictly necessary (the driver will work fine without it), but is good practice and allows for more flexible DE/CE sychronization options in the future. Current userspace drivers do not take advantage of the CE yet. v2: - clean up code flow a bit - no need to flush caches for CONST IB Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-07-18drm/radeon: fix const IB handling v2Christian König5-17/+25
Const IBs are executed on the CE not the CP, so we can't fence them in the normal way. So submit them directly before the IB instead, just as the documentation says. v2: keep the extra documentation Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2012-07-18drm/radeon: let sa manager block for fences to wait for v2Christian König2-23/+61
Otherwise we can encounter out of memory situations under extreme load. v2: add documentation for the new function Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2012-07-18drm/radeon: return an error if there is nothing to wait forChristian König1-1/+1
Otherwise the sa managers out of memory handling doesn't work. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2012-07-18drm: Disallow DRM_IOCTL_MODESET_CTL for KMS driversLaurent Pinchart1-1/+4
DRM_IOCTL_MODESET_CTL must only be used for UMS drivers. Make it a no-op for KMS drivers. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-07-17Merge branch 'next' of git://people.freedesktop.org/~deathsimple/linux into ↵Dave Airlie23-460/+505
drm-next This merges Christian work that has been hanging around on the list.
2012-07-17drm/radeon: implement ring saving on reset v4Christian König3-8/+126
Try to save whatever is on the rings when we encounter an lockup. v2: Fix spelling error. Free saved ring data if reset fails. Add documentation for the new functions. v3: Some more spelling fixes v4: It doesn't make sense to save anything if all fences are signaled Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2012-07-17drm/radeon: record what is next valid wptr for each ring v4Christian König7-8/+68
Before emitting any indirect buffer, emit the offset of the next valid ring content if any. This allow code that want to resume ring to resume ring right after ib that caused GPU lockup. v2: use scratch registers instead of storing it into memory v3: skip over the surface sync for ni and si as well v4: use SET_CONFIG_REG instead of PACKET0 Signed-off-by: Jerome Glisse <[email protected]> Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>