summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon
Commit message (Collapse)AuthorAgeFilesLines
* drm/fb-helper: don't disable everything in initial_configDaniel Vetter2013-02-141-0/+4
| | | | | | | | | | | | | | This should be done in the drivers for two reasons: - it gets in the way of fastboot efforts - it links the fb helpers with the crtc helpers instead of going through the real interface vfuncs, forcing i915 to fake all the ->disable callbacks used by the crtc helper to avoid ugly Oopsen v2: Resolve conflicts since drivers still call drm_fb_helper_single_add_all_connectors. Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/radeon: use prime helpersAaron Plattner2013-02-083-157/+35Star
| | | | | | | | | | | | | | | Simplify the Radeon prime implementation by using the default behavior provided by drm_gem_prime_import and drm_gem_prime_export. v2: - Rename functions to radeon_gem_prime_get_sg_table and radeon_gem_prime_import_sg_table. - Delete the now-unused vmapping_count variable. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge branch 'drm-next-3.9' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie2013-02-0841-1887/+2185
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-next Alex writes: - CS ioctl cleanup and unification. Unification of a lot of functionality that was duplicated across multiple generates of hardware. - Add support for Oland GPUs - Deprecate UMS support. Mesa and the ddx dropped support for UMS and apparently very few people still use it since the UMS CS ioctl was broken for several kernels and no one reported it. It was fixed in 3.8/stable. - Rework GPU reset. Use the status registers to determine what blocks to reset. This better matches the recommended reset programming model. This also allows us to properly reset blocks besides GFX and DMA. - Switch the VM set page code to use an IB rather than the ring. This fixes overflow issues when doing large page table updates using a small ring like DMA. - Several small cleanups and bug fixes. * 'drm-next-3.9' of git://people.freedesktop.org/~agd5f/linux: (38 commits) drm/radeon/dce6: fix display powergating drm/radeon: add Oland pci ids drm/radeon: radeon-asic updates for Oland drm/radeon: add ucode loading support for Oland drm/radeon: fill in gpu init for Oland drm/radeon: add Oland chip family drm/radeon: switch back to using the DMA ring for VM PT updates drm/radeon: use IBs for VM page table updates v2 drm/radeon: don't reset the MC on IGPs/APUs drm/radeon: use the reset mask to determine if rings are hung drm/radeon: halt engines before disabling MC (si) drm/radeon: halt engines before disabling MC (cayman/TN) drm/radeon: halt engines before disabling MC (evergreen) drm/radeon: halt engines before disabling MC (6xx/7xx) drm/radeon: use status regs to determine what to reset (si) drm/radeon: use status regs to determine what to reset (cayman) drm/radeon: use status regs to determine what to reset (evergreen) drm/radeon: use status regs to determine what to reset (6xx/7xx) drm/radeon: rework GPU reset on cayman/TN drm/radeon: rework GPU reset on cayman/TN ...
| * drm/radeon/dce6: fix display powergatingAlex Deucher2013-02-061-4/+2Star
| | | | | | | | | | | | | | | | | | | | Only enable it when we disable the display rather than at DPMS time since enabling it requires a full modeset to restore the display state. Fixes blank screens in certain cases. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| * drm/radeon: radeon-asic updates for OlandAlex Deucher2013-02-021-1/+5
| | | | | | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add ucode loading support for OlandAlex Deucher2013-02-021-0/+59
| | | | | | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: fill in gpu init for OlandAlex Deucher2013-02-021-1/+19
| | | | | | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add Oland chip familyAlex Deucher2013-02-023-0/+3
| | | | | | | | | | | | Oland is a new asic in the SI family. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: switch back to using the DMA ring for VM PT updatesAlex Deucher2013-02-011-3/+3
| | | | | | | | | | | | | | Now that we have switched to using IBs for page table updates, we can switch back the using the DMA ring. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use IBs for VM page table updates v2Alex Deucher2013-02-017-92/+103
| | | | | | | | | | | | | | | | | | | | | | | | For very large page table updates, we can exceed the size of the ring. To avoid this, use an IB to perform the page table update. v2(ck): cleanup the IB infrastructure and the use it instead of filling the struct ourself. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com>
| * drm/radeon: don't reset the MC on IGPs/APUsAlex Deucher2013-01-313-6/+12
| | | | | | | | | | | | The MC isn't part of the GPU per se. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use the reset mask to determine if rings are hungAlex Deucher2013-01-316-80/+173
| | | | | | | | | | | | | | fetch the reset mask and check if the relevant ring flags are set to determine whether the ring is hung or not. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: halt engines before disabling MC (si)Alex Deucher2013-01-311-5/+7
| | | | | | | | | | | | It's better to halt the engines before we disable the MC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: halt engines before disabling MC (cayman/TN)Alex Deucher2013-01-311-7/+7
| | | | | | | | | | | | It's better to halt the engines before we disable the MC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: halt engines before disabling MC (evergreen)Alex Deucher2013-01-311-5/+7
| | | | | | | | | | | | It's better to halt the engines before we disable the MC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: halt engines before disabling MC (6xx/7xx)Alex Deucher2013-01-311-5/+5
| | | | | | | | | | | | It's better to halt the engines before we disable the MC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use status regs to determine what to reset (si)Alex Deucher2013-01-312-34/+132
| | | | | | | | | | | | | | When we attempt the reset the GPU, look at the status registers to determine what blocks need to be reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use status regs to determine what to reset (cayman)Alex Deucher2013-01-313-32/+136
| | | | | | | | | | | | | | When we attempt the reset the GPU, look at the status registers to determine what blocks need to be reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use status regs to determine what to reset (evergreen)Alex Deucher2013-01-313-32/+145
| | | | | | | | | | | | | | When we attempt the reset the GPU, look at the status registers to determine what blocks need to be reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use status regs to determine what to reset (6xx/7xx)Alex Deucher2013-01-313-32/+136
| | | | | | | | | | | | | | When we attempt the reset the GPU, look at the status registers to determine what blocks need to be reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: rework GPU reset on cayman/TNAlex Deucher2013-01-311-92/+90Star
| | | | | | | | | | | | | | Update the code to better match the recommended programming sequence for soft reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: rework GPU reset on cayman/TNAlex Deucher2013-01-312-108/+92Star
| | | | | | | | | | | | | | Update the code to better match the recommended programming sequence for soft reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: rework GPU reset on evergreenAlex Deucher2013-01-311-76/+85
| | | | | | | | | | | | | | Update the code to better match the recommended programming sequence for soft reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: rework GPU reset on r6xx/r7xxAlex Deucher2013-01-312-122/+129
| | | | | | | | | | | | | | Update the code to better match the recommended programming sequence for soft reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add a bios scratch asic hung helperAlex Deucher2013-01-315-0/+33
| | | | | | | | | | | | | | | | Used by all asic families from r600+. Flag for the vbios and later instances of the driver that the GPU is hung. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add additional reset flagsAlex Deucher2013-01-311-0/+9
| | | | | | | | | | | | This adds further flags for fine grained reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: Deprecate UMS support v2Christian König2013-01-3113-117/+114Star
| | | | | | | | | | | | | | | | | | | | | | | | | | KMS support is out and stable for a couple of years now and the userspace code has deprecated or abandoned the old UMS interface. So make the KMS interface the default and deprecate the UMS interface in the kernel as well. v2: rebased on alex/drm-next-3.9-wip Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * radeon/kms: cleanup async dma packet checkingJerome Glisse2013-01-313-435/+417Star
| | | | | | | | | | | | | | This simplify and cleanup the async dma checking. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: consolidate redundant macros and constantsIlija Hadzic2013-01-3112-104/+35Star
| | | | | | | | | | | | | | | | | | | | After refactoring the _cs logic, we ended up with many macros and constants that #define the same thing. Clean'em up. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use common next_reloc functionIlija Hadzic2013-01-316-295/+98Star
| | | | | | | | | | | | | | | | | | This patch eliminates ASIC-specific ***_cs_packet_next_reloc functions and hooks up the new common function. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: pull out common next_reloc functionIlija Hadzic2013-01-312-0/+57
| | | | | | | | | | | | | | | | | | | | next_reloc function does the same thing in all ASICs with the exception of R600 which has a special case in legacy mode. Pull out the common function in preparation for refactoring. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: rename r100_cs_dump_packet to radeon_cs_dump_packetIlija Hadzic2013-01-316-51/+58
| | | | | | | | | | | | | | | | | | | | This function is not limited to r100, but it can dump a (raw) packet for any ASIC. Rename it accordingly and move its declaration to radeon.h Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add a check to wait_reg_mem commandIlija Hadzic2013-01-312-0/+11
| | | | | | | | | | | | | | | | | | | | WAIT_REG_MEM on register does not allow the use of PFP. Enforce this restriction when checking packets sent from userland. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: refactor vline packet parsing functionIlija Hadzic2013-01-314-117/+70Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | vline packet parsing function for R600 and Evergreen+ are the same, except that they use different registers. Factor out the algorithm into a common function that uses register table passed from ASIC-specific caller. This reduces ASIC-specific function to (trivial) setup of register table and call into the common function. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: factor out cs_next_is_pkt3_nop functionIlija Hadzic2013-01-315-48/+30Star
| | | | | | | | | | | | | | | | | | | | | | Once we factored out radeon_cs_packet_parse function, evergreen_cs_next_is_pkt3_nop and r600_cs_next_is_pkt3_nop functions became identical, so they can be factored out into a common function. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use common cs packet parse functionIlija Hadzic2013-01-315-157/+20Star
| | | | | | | | | | | | | | | | | | | | We now have a common radeon_cs_packet_parse function that is good for all ASICs. Hook it up and eliminate ASIC-specific versions. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: implement common cs packet parse functionIlija Hadzic2013-01-312-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | CS packet parse functions have a lot of in common across all ASICs. Implement a common function and take care of small differences between families inside the function. This patch is a prep for major refactoring and consolidation of CS parsing code. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: fix formattingIlija Hadzic2013-01-311-23/+22Star
| | | | | | | | | | | | | | | | | | Preparatory patch: patches to follow will touch a piece of code that had broken indentication, so fix it before touching it. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: remove unused prototype from radeon_csIlija Hadzic2013-01-311-3/+0Star
| | | | | | | | | | | | Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: remove unecessary assignmentIlija Hadzic2013-01-311-4/+1Star
| | | | | | | | | | | | | | | | | | | | length_dw field was assigned twice. While at it, move user_ptr assignment together with all other assignments to p->chunks[i] structure to make the code more readable. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | Merge branch 'fbcon-locking-fixes' of ↵Dave Airlie2013-02-0818-26/+114
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ssh://people.freedesktop.org/~airlied/linux into drm-next This pulls in most of Linus tree up to -rc6, this fixes the worst lockdep reported issues and re-enables fbcon lockdep. (not the fbcon maintainer) * 'fbcon-locking-fixes' of ssh://people.freedesktop.org/~airlied/linux: (529 commits) Revert "Revert "console: implement lockdep support for console_lock"" fbcon: fix locking harder fb: Yet another band-aid for fixing lockdep mess fb: rework locking to fix lock ordering on takeover
| * | Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds2013-02-048-9/+49
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull radeon fixes from Dave Airlie: "I got these late last week, the main chunks of these fix a rendering regression since 3.7, and the settle ones all fix the issue where we don't wait long enough for the memory controller to settle after turning it off which causes bad memory reads, they all fix real users bugs, and most of them are destined for stable. Can't remember if you had net connection on that island :-)" I don't know if the "two tin-cans and a string" thing here on "that island" can really be considered internet, but I guess I can pull things. Barely. * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/radeon: switch back to the CP ring for VM PT updates drm/radeon: prevent crash in the ring space allocation drm/radeon: Calling object_unrefer() when creating fb failure drm/radeon/r5xx-r7xx: wait for the MC to settle after MC blackout drm/radeon/evergreen+: wait for the MC to settle after MC blackout drm/radeon: protect against div by 0 in backend setup drm/radeon: fix backend map setup on 1 RB sumo boards drm/radeon: add quirk for RV100 board drm/radeon: add WAIT_UNTIL to the non-VM safe regs list for cayman/TN drm/radeon: fix MC blackout on evergreen+
| | * drm/radeon: switch back to the CP ring for VM PT updatesAlex Deucher2013-01-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For large VM page table updates, we can sometimes generate more packets than there is space on the ring. This happens more readily with the DMA ring since it is 64K (vs 1M for the CP). For now, switch back to the CP. For the next kernel, I have a patch to utilize IBs for VM PT updates which alleviates this problem. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=58354 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| | * drm/radeon: prevent crash in the ring space allocationAlex Deucher2013-01-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the requested number of DWs on the ring is larger than the size of the ring itself, return an error. In testing with large VM updates, we've seen crashes when we try and allocate more space on the ring than the total size of the ring without checking. This prevents the crash but for large VM updates or bo moves of very large buffers, we will need to break the transaction down into multiple batches. I have patches to use IBs for the next kernel. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| | * drm/radeon: Calling object_unrefer() when creating fb failureliu chuansheng2013-01-311-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When kzalloc() failed in radeon_user_framebuffer_create(), need to call object_unreference() to match the object_reference(). Signed-off-by: liu chuansheng <chuansheng.liu@intel.com> Signed-off-by: xueminsu <xuemin.su@intel.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| | * drm/radeon/r5xx-r7xx: wait for the MC to settle after MC blackoutAlex Deucher2013-01-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some chips seem to need a little delay after blacking out the MC before the requests actually stop. Stop DMAR errors reported by Shuah Khan. Reported-by: Shuah Khan <shuahkhan@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| | * drm/radeon/evergreen+: wait for the MC to settle after MC blackoutAlex Deucher2013-01-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some chips seem to need a little delay after blacking out the MC before the requests actually stop. May fix: https://bugs.freedesktop.org/show_bug.cgi?id=56139 https://bugs.freedesktop.org/show_bug.cgi?id=57567 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| | * drm/radeon: protect against div by 0 in backend setupMikko Tiihonen2013-01-301-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure at least one RB is enabled in r6xx_remap_render_backend() to avoid an division by zero in some corner cases. See: https://bugzilla.redhat.com/show_bug.cgi?id=892233 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| | * drm/radeon: fix backend map setup on 1 RB sumo boardsAlex Deucher2013-01-301-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Need to adjust the backend map depending on which RB is enabled. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=892233 Reported-by: Mikko Tiihonen <mikko.tiihonen@iki.fi> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| | * drm/radeon: add quirk for RV100 boardAlex Deucher2013-01-291-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vbios says external TMDS while the board is actually internal TMDS. fixes: https://bugs.freedesktop.org/show_bug.cgi?id=60037 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org