aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)AuthorFilesLines
2014-08-19drm/radeon: fix active_cu mask on SI and CIK after re-init (v3)Alex Deucher2-0/+2
Need to initialize the mask to 0 on init, otherwise it keeps increasing. bug: https://bugzilla.kernel.org/show_bug.cgi?id=82581 v2: also fix cu count v3: split count fix into separate patch Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Cc: [email protected]
2014-08-19drm/radeon: fix active cu count for SI and CIKAlex Deucher2-10/+6
This fixes the CU count reported to userspace for OpenCL. bug: https://bugzilla.kernel.org/show_bug.cgi?id=82581 Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Cc: [email protected]
2014-08-19drm/radeon: re-enable selective GPUVM flushingAlex Deucher1-3/+1
Now that the PFP and ME synchronization is fixed, we can enable this again reliably. Signed-off-by: Alex Deucher <[email protected]> Tested-by: Michel Dänzer <[email protected]>
2014-08-19drm/radeon: Sync ME and PFP after CP semaphore waits v4Christian König3-0/+36
Fixes lockups due to CP read GPUVM faults when running piglit on Cape Verde. v2 (chk): apply the fix to R600+ as well, on CIK only the GFX CP has a PFP, add more comments to R600 code, enable flushing again v3: (agd5f): only apply to 7xx+. r6xx does not have the packet. v4: (agd5f): split flush change into a separate patch, fix formatting Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Tested-by: Michel Dänzer <[email protected]>
2014-08-19drm/radeon: fix display handling in radeon_gpu_resetAlex Deucher1-0/+16
If the display hw was reset or a hard reset was used, we need to re-init some of the common display hardware as well. Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2014-08-19drm/radeon: fix pm handling in radeon_gpu_resetAlex Deucher1-2/+16
pm_suspend is handled in the radeon_suspend callbacks. pm_resume has special handling depending on whether dpm or legacy pm is enabled. Change radeon_gpu_reset to mirror the behavior in the suspend and resume pathes. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Cc: [email protected]
2014-08-18drm/radeon: Only flush HDP cache for indirect buffers from userspaceMichel Dänzer25-66/+73
It isn't necessary for command streams generated by the kernel (at least not while we aren't storing ring or indirect buffers in VRAM). Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2014-08-18drm/radeon: properly document reloc priority maskChristian König1-1/+2
Instead of hard coding the value properly document that this is an userspace interface. No intended functional change. Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2014-08-18drm/i915: don't try to retrain a DP link on an inactive CRTCImre Deak1-0/+3
Atm we may retrain the DP link even if the CRTC is inactive through HPD work->intel_dp_check_link_status(). This in turn can lock up the PHY (at least on BYT), since the DP port is disabled. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81948 Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Cc: [email protected] (3.16+) Signed-off-by: Jani Nikula <[email protected]>
2014-08-18drm/i915: make sure VDD is turned off during system suspendImre Deak3-0/+34
Atm we may leave eDP VDD enabled during system suspend after the CRTCs are disabled through an HPD->DPCD read event. So disable VDD during suspend at a point when no HPDs can occur. Note that runtime suspend doesn't have the same problem, since there the RPM ref held by VDD provides already the needed serialization. v2: - add note to commit message about the runtime suspend path (Ville) - use edp_panel_vdd_off_sync(), so we can keep the WARN in edp_panel_vdd_off() (Ville) v3: - rebased on -fixes (for_each_intel_encoder()->list_for_each_entry()) (Imre) Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> (v2) Cc: [email protected] (3.16+) [Jani: fix sparse warning reported by Fengguang Wu] Signed-off-by: Jani Nikula <[email protected]>
2014-08-18drm/i915: cancel hotplug and dig_port work during suspend and unloadImre Deak3-2/+18
Make sure these work handlers don't run after we system suspend or unload the driver. Note that we don't cancel the handlers during runtime suspend. That could lead to a lockup, since we take a runtime PM ref from the handlers themselves. Fortunaltely canceling there is not needed since the RPM ref itself provides for the needed serialization. v2: - fix the order of canceling dig_port_work wrt. hotplug_work (Ville) - zero out {long,short}_hpd_port_mask and hpd_event_bits for speed (Ville) Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Cc: [email protected] (3.16+) Signed-off-by: Jani Nikula <[email protected]>
2014-08-18drm/i915: fix HPD IRQ reenable work cancelationImre Deak3-22/+14
Atm, the HPD IRQ reenable timer can get rearmed right after it's canceled. Also to access the HPD IRQ mask registers we need to wake up the HW. Solve both issues by converting the reenable timer to a delayed work and grabbing a runtime PM reference in the work. By this we can also forgo canceling the timer during runtime suspend, since the only important thing there is that the HW is awake when we write the registers and that's ensured by the RPM ref. So do the cancelation only during driver unload time; this is also a requirement for an upcoming patch where we want to cancel all HPD related works only during system suspend and driver unload time, but not during runtime suspend. Note that there is still a race between the HPD IRQ reenable work and drm_irq_uninstall() during driver unload, where the work can reenable the HPD IRQs disabled by drm_irq_uninstall(). This isn't a problem since the HPD IRQs will still be effectively masked by the first level interrupt mask. v2-3: - unchanged v4: - use proper API for changing the expiration time for an already pending delayed work (Jani) Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> (v2) Cc: [email protected] (3.16+) Signed-off-by: Jani Nikula <[email protected]>
2014-08-18drm/i915: take display port power domain in DP HPD handlerImre Deak1-5/+14
Ville noticed that we can call ibx_digital_port_connected() which accesses the HW without holding any power well/runtime pm reference. Fix this by holding a display port power domain reference around the whole hpd_pulse handler. Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Cc: [email protected] (3.16+) Signed-off-by: Jani Nikula <[email protected]>
2014-08-18Merge branch 'drm-fixes-3.17' of git://people.freedesktop.org/~agd5f/linuxDave Airlie10-31/+50
radeon fixes for 3.17, kind of all over the place (dpm, GPUVM, etc.) * 'drm-fixes-3.17' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: Remove duplicate include from Makefile drm/radeon/dpm: select the appropriate vce power state for KV/KB/ML drm/radeon: Add ability to get and change dpm state when radeon PX card is turned off drm/radeon: Add missing lines to ci_set_thermal_temperature_range drm/radeon: Always flush VM again on < CIK drm/radeon: add a check for allocation failure (v2) drm/radeon: use pfp for all vm_flush related updates drm/radeon: add bapm module parameter
2014-08-18drm/i915: Don't try to enable cursor from setplane when crtc is disabledVille Syrjälä1-2/+2
Make sure the cursor gets fully clipped when enabling it on a disabled crtc via setplane. This will prevent the lower level code from attempting to enable the cursor in hardware. Cc: Paulo Zanoni <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Cc: [email protected] Signed-off-by: Jani Nikula <[email protected]>
2014-08-18drm/i915: Skip load detect when intel_crtc->new_enable==trueVille Syrjälä1-4/+8
During suspend we turn off the crtcs, but leave the staged config in place so that we can restore the display(s) to their previous state on resume. During resume when we attempt to apply the force pipe A quirk we use the load detect mechanism. That doesn't check whether there was an already staged configuration for the crtc since that's not even possible during normal runtime load detection. But during resume it is possible, and if we just blindly go and overwrite the staged crtc configuration for the load detection we can no longer restore the display to the correct state. Even worse, we don't even clear all the staged connector->encoder->crtc links so we may end up using a cloned setup for the load detection, and after we're done we just clear the links related to the VGA output leaving the links for the other outputs in place. This will eventually result in calling intel_set_mode() with mode==NULL but with valid connector->encoder->crtc links which will result in dereferencing the NULL mode since the code thinks it will have to a modeset. To avoid these problems don't use any crtc with new_enabled==true for load detection. Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Cc: [email protected] (for 3.16) Signed-off-by: Jani Nikula <[email protected]>
2014-08-18drm/i915: Fix locking for intel_enable_pipe_a()Ville Syrjälä4-21/+17
intel_enable_pipe_a() gets called with all the modeset locks already held (by drm_modeset_lock_all()), so trying to grab the same locks using another drm_modeset_acquire_ctx is going to fail miserably. Move most of the drm_modeset_acquire_ctx handling (init/drop/fini) out from intel_{get,release}_load_detect_pipe() into the callers (intel_{crt,tv}_detect()). Only the actual locking and backoff handling is left in intel_get_load_detect_pipe(). And in intel_enable_pipe_a() we just share the mode_config.acquire_ctx from drm_modeset_lock_all() which is already holding all the relevant locks. It's perfectly legal to lock the same ww_mutex multiple times using the same ww_acquire_ctx. drm_modeset_lock() will convert the returned -EALREADY into 0, so the caller doesn't need to do antyhing special. Fixes a hang on resume on my 830. Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Cc: [email protected] Signed-off-by: Jani Nikula <[email protected]>
2014-08-15Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds14-27/+57
Pull drm fixes (mostly nouveau) from Dave Airlie: "One doc buidling fixes for a file that moved, along with a bunch of nouveau fixes, one a build problem on ARM" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/doc: Refer to proper source file drm/nouveau/platform: fix compilation error drm/nouveau/gk20a: add LTC device drm/nouveau: warn if we fail to re-pin fb on resume drm/nouveau/nvif: fix dac load detect method definition drm/gf100-/gr: fix -ENOSPC detection when allocating zbc table entries drm/nouveau/nvif: return null pointers on failure, in addition to ret != 0 drm/nouveau/ltc: fix tag base address getting truncated if above 4GiB drm/nvc0-/fb/ram: fix use of non-existant ram if partitions aren't uniform drm/nouveau/bar: behave better if ioremap failed drm/nouveau/kms: nouveau_fbcon_accel_fini can be static drm/nouveau: kill unused variable warning if !__OS_HAS_AGP drm/nouveau/nvif: fix a number of notify thinkos
2014-08-15drm/radeon: Remove duplicate include from MakefileAndreas Ruprecht1-1/+1
In the Makefile, radeon_uvd.o is added to radeon-y twice. As it belongs to the UVD block marked with a comment, the other include from the block of includes labelled as "KMS driver" is deleted. Signed-off-by: Andreas Ruprecht <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2014-08-15drm/radeon/dpm: select the appropriate vce power state for KV/KB/MLAlex Deucher1-3/+3
Compare the clock in the limits table to the requested evclk rather than just taking the first value. Improves vce performance in certain cases. Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2014-08-15drm/radeon: Add ability to get and change dpm state when radeon PX card is ↵Pali Rohár1-10/+6
turned off This fixing commit 4f2f203976964e267dc477de6648bdb3acd2b74b bug: https://bugzilla.kernel.org/show_bug.cgi?id=76321 Signed-off-by: Pali Rohár <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2014-08-15drm/radeon: Add missing lines to ci_set_thermal_temperature_rangeOleg Chernovskiy1-0/+3
Properly set the thermal min and max temp on CI. Otherwise, we end up setting the thermal ranges to 0 on resume and end up in the lowest power state. Signed-off-by: Oleg Chernovskiy <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2014-08-15drm/radeon: Always flush VM again on < CIKMichel Dänzer1-1/+3
Not doing this causes piglit hangs[0] on my Cape Verde card. No issues on Bonaire and Kaveri though. [0] Same symptoms as those fixed on CIK by 'drm/radeon: set VM base addr using the PFP v2'. Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2014-08-15drm/radeon: add a check for allocation failure (v2)Dan Carpenter1-0/+4
We can easily return -ENOMEM here if kzalloc() fails. v2: agd5f: drop the vm mutex Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2014-08-15drm/radeon: use pfp for all vm_flush related updatesAlex Deucher2-6/+6
May fix hangs in some cases. Signed-off-by: Alex Deucher <[email protected]>
2014-08-15drm/radeon: add bapm module parameterAlex Deucher4-10/+24
Add a module paramter to enable bapm on APUs. It's disabled by default on certain APUs due to stability issues. This option makes it easier to test and to enable it on systems that are stable. bug: https://bugzilla.kernel.org/show_bug.cgi?id=81021 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2014-08-15Merge branch 'linux-3.17' of ↵Dave Airlie14-27/+57
git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes A couple of thinkos from the -next merge, some random fixes from a coverity scan, fix for (at least) GK106 accidentally using non-existent vram on some board configurations, and better behaviour of the instmem allocations if vmalloc space runs out. * 'linux-3.17' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau/platform: fix compilation error drm/nouveau/gk20a: add LTC device drm/nouveau: warn if we fail to re-pin fb on resume drm/nouveau/nvif: fix dac load detect method definition drm/gf100-/gr: fix -ENOSPC detection when allocating zbc table entries drm/nouveau/nvif: return null pointers on failure, in addition to ret != 0 drm/nouveau/ltc: fix tag base address getting truncated if above 4GiB drm/nvc0-/fb/ram: fix use of non-existant ram if partitions aren't uniform drm/nouveau/bar: behave better if ioremap failed drm/nouveau/kms: nouveau_fbcon_accel_fini can be static drm/nouveau: kill unused variable warning if !__OS_HAS_AGP drm/nouveau/nvif: fix a number of notify thinkos
2014-08-15drm/nouveau/platform: fix compilation errorAlexandre Courbot1-1/+2
nouveau_platform.c was still using the old nouveau_dev() macro, triggering a compilation error. Fix this. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-15drm/nouveau/gk20a: add LTC deviceAlexandre Courbot1-0/+1
LTC device is now required for PGRAPH to work, add it. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-15drm/nouveau: warn if we fail to re-pin fb on resumeBen Skeggs1-1/+3
Spotted by Coverity. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-15drm/nouveau/nvif: fix dac load detect method definitionBen Skeggs1-2/+2
A thinko made me turn this into a u16 when cleaning up. Spotted by coverity. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-15drm/gf100-/gr: fix -ENOSPC detection when allocating zbc table entriesBen Skeggs1-0/+6
Spotted by Coverity. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-15drm/nouveau/nvif: return null pointers on failure, in addition to ret != 0Ben Skeggs2-2/+6
Reported by Coverity. The intention is that the return value is checked, but let's be more paranoid and make it extremely obvious if something forgets to. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-15drm/nouveau/ltc: fix tag base address getting truncated if above 4GiBBen Skeggs1-1/+1
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-15drm/nvc0-/fb/ram: fix use of non-existant ram if partitions aren't uniformBen Skeggs1-2/+2
Likely a large part of the GK106 woes.. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-15drm/nouveau/bar: behave better if ioremap failedBen Skeggs1-3/+11
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-15drm/nouveau/kms: nouveau_fbcon_accel_fini can be staticFengguang Wu1-2/+2
Signed-off-by: Fengguang Wu <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-15drm/nouveau: kill unused variable warning if !__OS_HAS_AGPBen Skeggs1-2/+1
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-15drm/nouveau/nvif: fix a number of notify thinkosBen Skeggs3-11/+20
Note to self: more sleep Signed-off-by: Ben Skeggs <[email protected]>
2014-08-12PCI: Remove DEFINE_PCI_DEVICE_TABLE macro useBenoit Taine7-7/+7
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // <smpl> @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ - DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id i[] = z; // </smpl> [bhelgaas: add semantic patch] Signed-off-by: Benoit Taine <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2014-08-09Merge branch 'linux-3.17' of git://anongit.freedesktop.org/git/nouveau/linux-2.6Linus Torvalds262-5795/+12140
Pull nouveau drm updates from Ben Skeggs: "Apologies for not getting this done in time for Dave's drm-next merge window. As he mentioned, a pre-existing bug reared its head a lot more obviously after this lot of changes. It took quite a bit of time to track it down. In any case, Dave suggested I try my luck by sending directly to you this time. Overview: - more code for Tegra GK20A from NVIDIA - probing, reclockig - better fix for Kepler GPUs that have the graphics engine powered off on startup, method courtesy of info provided by NVIDIA - unhardcoding of a bunch of graphics engine setup on Fermi/Kepler/Maxwell, will hopefully solve some issues people have noticed on higher-end models - support for "Zero Bandwidth Clear" on Fermi/Kepler/Maxwell, needs userspace support in general, but some lucky apps will benefit automagically - reviewed/exposed the full object APIs to userspace (finally), gives it access to perfctrs, ZBC controls, various events. More to come in the future. - various other fixes" Acked-by: Dave Airlie <[email protected]> * 'linux-3.17' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (87 commits) drm/nouveau: expose the full object/event interfaces to userspace drm/nouveau: fix headless mode drm/nouveau: hide sysfs pstate file behind an option again drm/nv50/disp: shhh compiler drm/gf100-/gr: implement the proper SetShaderExceptions method drm/gf100-/gr: remove some broken ltc bashing, for now drm/gf100-/gr: unhardcode attribute cb config drm/gf100-/gr: fetch tpcs-per-ppc info on startup drm/gf100-/gr: unhardcode pagepool config drm/gf100-/gr: unhardcode bundle cb config drm/gf100-/gr: improve initial context patch list helpers drm/gf100-/gr: add support for zero bandwidth clear drm/nouveau/ltc: add zbc drivers drm/nouveau/ltc: s/ltcg/ltc/ + cleanup drm/nouveau: use ram info from nvif_device drm/nouveau/disp: implement nvif event sources for vblank/connector notifiers drm/nouveau/disp: allow user direct access to channel control registers drm/nouveau/disp: audit and version display classes drm/nouveau/disp: audit and version SCANOUTPOS method drm/nv50-/disp: audit and version PIOR_PWR method ...
2014-08-10drm/nouveau: expose the full object/event interfaces to userspaceBen Skeggs8-10/+424
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: fix headless modeBen Skeggs2-2/+3
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: hide sysfs pstate file behind an option againBen Skeggs1-1/+8
No-one has yet had time to move this to debugfs as discussed during the last merge window. Until this happens, hide the option to make it clear it's not going to be here forever. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nv50/disp: shhh compilerBen Skeggs1-4/+4
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/gf100-/gr: implement the proper SetShaderExceptions methodBen Skeggs9-17/+53
We have another version of it implemented in SW, however, that version isn't serialised with normal PGRAPH operation and can possibly clobber the enables for another context. This is the same method that's implemented by the NVIDIA binary driver. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/gf100-/gr: remove some broken ltc bashing, for nowBen Skeggs13-58/+0
... and hope that the defaults are good enough. This was always supposed to be a read/modify/write thing anyway, so we're writing very wrong stuff for some boards already. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/gf100-/gr: unhardcode attribute cb configBen Skeggs13-166/+199
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/gf100-/gr: fetch tpcs-per-ppc info on startupBen Skeggs9-1/+16
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/gf100-/gr: unhardcode pagepool configBen Skeggs13-41/+75
Signed-off-by: Ben Skeggs <[email protected]>