summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-10-21drm/amdgpu: remove old lockup detection infrastructureChristian König
It didn't worked to well anyway. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
2015-10-21drm: fix trivial typosGeliang Tang
s/regsiter/register/ Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-19drm/amdgpu/dce: simplify suspend/resumeAlex Deucher
We were basically opencoding the same thing in both hw_init and resume and hw_fini and suspend. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-19drm/amdgpu/gfx8: set TC_WB_ACTION_EN in RELEASE_MEM packetAlex Deucher
This is the recommended setting from the hw team for newer versions of the firmware. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2015-10-15drm/radeon: Use rdev->gem.mutex to protect hyperz/cmask ownersDaniel Vetter
This removes the last depency of radeon for dev->struct_mutex! Also the locking scheme for hyperz/cmask owners seems a bit unsound, there's no protection in the preclose handler (and that never did hold dev->struct_mutex while being called). So grab the same lock there, too. There's also all the checks in the cs checker, but since the overall design seems to never stall for the previous owner I figured it's ok if I leave this racy. It was racy even before I touched it after all too. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu: fix lockup when clean pending fencesJunwei Zhang
The first lockup fence will lock the fence list of scheduler. Then cancel the delayed workqueues for all clean pending fences without waiting the workqueues to finish. Change-Id: I9bec826de1aa49d587b0662f3fb4a95333979429 Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-10-14drm/amdgpu: add timer to fence to detect scheduler lockupJunwei Zhang
Change-Id: I67e987db0efdca28faa80b332b75571192130d33 Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: David Zhou <david1.zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-10-14drm/amdgpu: add VM CS mapping trace pointChristian König
Output all VM mappings a command submission uses. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu: add option to clear VM page tables after every submitChristian König
This makes it much easier to find when userspace misses to send some buffers. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu: add option to stop on VM faultChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu: only print meaningful VM faultsChristian König
Port of radeon commit 9b7d786b900baf7c0d1a7e211570aef1cb27590f. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu: also trace already allocated VMIDsChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu: Drop unnecessary #include <linux/vga_switcheroo.h>Lukas Wunner
This was added to two radeon files even though they don't use any vga_switcheroo symbols, the amdgpu fork inherited them: Added to amdgpu_acpi.c by commit d7a2952f1ade ("drm/radeon: Add support for the ATIF ACPI method to the radeon driver"). Added to amdgpu_bios.c by commit 6a9ee8af344e ("vga_switcheroo: initial implementation (v15)"). Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/radeon: Drop unnecessary #include <linux/vga_switcheroo.h>Lukas Wunner
This was added to three files even though they don't use any vga_switcheroo symbols: Added to radeon_acpi.c by commit d7a2952f1ade ("drm/radeon: Add support for the ATIF ACPI method to the radeon driver"). Added to radeon_asic.c by commit 0a10c85129c2 ("drm/radeon: create radeon_asic.c"). Added to radeon_bios.c by commit 6a9ee8af344e ("vga_switcheroo: initial implementation (v15)"). Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu: clean up pageflip interrupt handlingAlex Deucher
Check to make sure we aren't touching a non-existent display controller and simplify the code. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu: rework sdma structuresAlex Deucher
Rework the sdma structures in the driver to consolidate all of the sdma info into a single structure and allow for asics that may have different numbers of sdma instances. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu: unpin cursor BOs on suspend and pin them again on resumeAlex Deucher
Everything is evicted from VRAM before suspend, so we need to make sure all BOs are unpinned and re-pinned after resume. Fixes broken mouse cursor after resume introduced by commit b9729b17. Port of radeon commit: f3cbb17bcf676a2fc6aedebe9fbebd59e550c51a Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/dce8: Fold set_cursor() into show_cursor()Alex Deucher
Port of radeon commit: 8991668ab4e26f985a8485719bce5d6d0623a644 Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/dce8: Clean up reference counting and pinning of the cursor BOsAlex Deucher
Take a GEM reference for and pin the new cursor BO, unpin and drop the GEM reference for the old cursor BO in dce8 crtc_cursor_set2, and use amdgpu_crtc->cursor_addr in dce8 set_cursor. This fixes dce8 cursor_reset accidentally incrementing the cursor BO pin count, and cleans up the code a little. Port of radeon commit: cd404af0c930104462aa91344f07d002cf8248ed Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/dce8: Move hotspot handling out of set_cursorAlex Deucher
It's only needed in dce8 crtc_cursor_set2. Port of radeon commit: 2e007e611bc0a46dfed1547e0228a57f800e703d Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/dce8: Re-show the cursor after a modeset (v2)Alex Deucher
Setting a mode seems to clear the cursor registers, so we need to re-program them to make sure the cursor is visible. Port of radeon commit: 6d3759fac636028849f3bbec80c4b77e9bfdb1d2 v2: change radeon reference in error message Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/dce8: Use cursor_set2 hook for enabling / disabling the HW cursorAlex Deucher
The cursor_set2 hook provides the cursor hotspot position within the cursor image. When the hotspot position changes, we can adjust the cursor position such that the hotspot doesn't move on the screen. This prevents the cursor from appearing to intermittently jump around on the screen when the position of the hotspot within the cursor image changes. Port of radeon commits: 78b1a6010b46a69bcd47b723a80f92693f26d17b 3feba08d79c32777a845c3c8a4ab93092bdf6f19 Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/dce11: Fold set_cursor() into show_cursor()Alex Deucher
Port of radeon commit: 8991668ab4e26f985a8485719bce5d6d0623a644 Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/dce11: Clean up reference counting and pinning of the cursor BOsAlex Deucher
Take a GEM reference for and pin the new cursor BO, unpin and drop the GEM reference for the old cursor BO in dce11 crtc_cursor_set2, and use amdgpu_crtc->cursor_addr in dce11 set_cursor. This fixes dce11 cursor_reset accidentally incrementing the cursor BO pin count, and cleans up the code a little. Port of radeon commit: cd404af0c930104462aa91344f07d002cf8248ed Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/dce11: Move hotspot handling out of set_cursorAlex Deucher
It's only needed in dce11 crtc_cursor_set2. Port of radeon commit: 2e007e611bc0a46dfed1547e0228a57f800e703d Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/dce11: Re-show the cursor after a modeset (v2)Alex Deucher
Setting a mode seems to clear the cursor registers, so we need to re-program them to make sure the cursor is visible. Port of radeon commit: 6d3759fac636028849f3bbec80c4b77e9bfdb1d2 v2: change radeon reference in error output Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/dce11: Use cursor_set2 hook for enabling / disabling the HW cursorAlex Deucher
The cursor_set2 hook provides the cursor hotspot position within the cursor image. When the hotspot position changes, we can adjust the cursor position such that the hotspot doesn't move on the screen. This prevents the cursor from appearing to intermittently jump around on the screen when the position of the hotspot within the cursor image changes. Port of radeon commits: 78b1a6010b46a69bcd47b723a80f92693f26d17b 3feba08d79c32777a845c3c8a4ab93092bdf6f19 Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/dce10: Fold set_cursor() into show_cursor()Alex Deucher
Port of radeon commit: 8991668ab4e26f985a8485719bce5d6d0623a644 Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/dce10: Clean up reference counting and pinning of the cursor BOsAlex Deucher
Take a GEM reference for and pin the new cursor BO, unpin and drop the GEM reference for the old cursor BO in dce10 crtc_cursor_set2, and use amdgpu_crtc->cursor_addr in dce10 set_cursor. This fixes dce10 cursor_reset accidentally incrementing the cursor BO pin count, and cleans up the code a little. Port of radeon commit: cd404af0c930104462aa91344f07d002cf8248ed Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/dce10: Move hotspot handling out of set_cursorAlex Deucher
It's only needed in dce10 crtc_cursor_set2. Port of radeon commit: 2e007e611bc0a46dfed1547e0228a57f800e703d Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/dce10: Re-show the cursor after a modeset (v2)Alex Deucher
Setting a mode seems to clear the cursor registers, so we need to re-program them to make sure the cursor is visible. Port of radeon commit: 6d3759fac636028849f3bbec80c4b77e9bfdb1d2 v2: change radeon reference in error message Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/dce10: Use cursor_set2 hook for enabling / disabling the HW cursorAlex Deucher
The cursor_set2 hook provides the cursor hotspot position within the cursor image. When the hotspot position changes, we can adjust the cursor position such that the hotspot doesn't move on the screen. This prevents the cursor from appearing to intermittently jump around on the screen when the position of the hotspot within the cursor image changes. Port of radeon commits: 78b1a6010b46a69bcd47b723a80f92693f26d17b 3feba08d79c32777a845c3c8a4ab93092bdf6f19 Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/atom: add support for new div32 opcodes (v3)Alex Deucher
Better precision than the regular div opcode. v2: drop 64 bit divide v3: fix op handling. This actually is a 64 bit divide. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/atom: add support for new mul32 opcodes (v2)Alex Deucher
Better precision than the regular mul opcode. v2: handle big endian properly. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/atom: add support for process ds opcodeAlex Deucher
Just skips a data section. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-14drm/amdgpu/atom: implement debug opcodeAlex Deucher
Basically a nop. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-07drm/amdgpu: disable hw semaphores by defaultAlex Deucher
These are buggy on some asics and not really used anymore now that the GPU schedular is enabled. Change-Id: I67182b409d64de308392a15d1a0a15018071dc0b Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-07drm/amdgpu: enable scheduler by defaultChunming Zhou
Change-Id: Idce64f63e8422324996fc5d583d0bc9a5ac60d0c Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-10-07drm/amdgpu: add TOPDOWN flag to the whole vramChunming Zhou
need to decrease visible vram usage by default. Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: monk.liu <monk.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-10-07drm/amdgpu: add vram usage into debugfsChunming Zhou
Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-10-07drm/amdgpu: split gfx8 gpu init into sw and hw partsAlex Deucher
Calculate the driver state in sw_init and program the registers in hw init. Acked-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-02drm/radeon: remove volatile qualifierGrazvydas Ignotas
There doesn't seem to be any need to have 'ib' volatile, the code is not even consistent with it and some places already miss it. As it is now it's just making gcc produce worse code. If there are special requirements for that memory, then proper primitives like memory barriers or accessor functions should be used, but it doesn't look like that is needed here. While at it, change the type to match the one in radeon_ib structure. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-02drm/radeon: refactor register check loopGrazvydas Ignotas
After this patch the register check loop does the same thing as before, except that now gcc does better job optimizing it: it now sees that end_reg was already checked against PACKET3_SET_CONTEXT_REG_END and can optimize REG_SAFE_BM_SIZE comparison out of evergreen_is_safe_reg() as (PACKET3_SET_CONTEXT_REG_END >> 7) < REG_SAFE_BM_SIZE. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-02drm/radeon: split evergreen_cs_check_regGrazvydas Ignotas
evergreen_cs_check_reg() is a large function and gcc doesn't want to inline it. It has a quick check for reg_safe_bm[] to see if register needs special handling, which often results in early exit. However because the function is large, it has a long prologue/epilogue to save/restore all the callee-save registers which according to perf is taking significant amount of time. To avoid this, we can reuse evergreen_is_safe_reg() to do the early check directly in register loop. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-02drm/radeon: simplify register checkerGrazvydas Ignotas
To avoid having to distinguish between CAYMAN or older on every register check, place a pointer in evergreen_cs_track and use it unconditionally. Also make use of the fact that both reg_safe_bm[] arrays are of the same length to remove another CAYMAN check. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-02drm/amdgpu: Spell vga_switcheroo consistentlyLukas Wunner
Currently everyone and their dog has their own favourite spelling for vga_switcheroo. This makes it hard to grep dmesg for log entries relating to vga_switcheroo. It also makes it hard to find related source files in the tree. vga_switcheroo.c uses pr_fmt "vga_switcheroo". Use that everywhere. Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-02drm/radeon: Spell vga_switcheroo consistentlyLukas Wunner
Currently everyone and their dog has their own favourite spelling for vga_switcheroo. This makes it hard to grep dmesg for log entries relating to vga_switcheroo. It also makes it hard to find related source files in the tree. vga_switcheroo.c uses pr_fmt "vga_switcheroo". Use that everywhere. Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-02Merge tag 'drm-intel-next-2015-09-11' of ↵Dave Airlie
git://anongit.freedesktop.org/drm-intel into drm-next - initialize backlight from VBT as fallback (Jani) - hpd A support from Ville - various atomic polish all over (mostly from Maarten) - first parts of virtualize gpu guest support on bdw from Zhiyuan Lv - GuC fixes from Alex - polish for the chv clocks code (Ville) - various things all over, as usual * tag 'drm-intel-next-2015-09-11' of git://anongit.freedesktop.org/drm-intel: (145 commits) drm/i915: Update DRIVER_DATE to 20150911 drm/i915: Remove one very outdated comment drm/i915: Use crtc->state for duplication. drm/i915: Do not handle a null plane state. drm/i915: Remove legacy plane updates for cursor and sprite planes. drm/i915: Use atomic state when changing cursor visibility. drm/i915: Use the atomic state in intel_update_primary_planes. drm/i915: Use the plane state in intel_crtc_info. drm/i915: Use atomic plane state in the primary plane update. drm/i915: add attached connector to hdmi container drm/i915: don't hard code vlv backlight frequency if unset drm/i915: initialize backlight max from VBT drm/i915: use pch backlight override on hsw too drm/i915/bxt: Clean up bxt_init_clock_gating drm/i915: Fix cmdparser STORE/LOAD command descriptors drm/i915: Dump pfit state as hex drm/i915: access the PP_ON_DELAYS/PP_OFF_DELAYS regs only pre GEN5 drm/i915: access the PP_CONTROL reg only pre GEN5 drm/i915: Refactor common ringbuffer allocation code drm/i915: use the yesno helper for logging ...
2015-09-30Merge tag 'topic/drm-misc-2015-09-25' of ↵Dave Airlie
git://anongit.freedesktop.org/drm-intel into drm-next Another attempt at drm-misc for 4.4 ... - better atomic helpers for runtime pm drivers - atomic fbdev - dp aux i2c STATUS_UPDATE handling (for short i2c replies from the sink) - bunch of constify patches - inital kerneldoc for vga switcheroo - some vblank code cleanups from Ville and Thierry - various polish all over * tag 'topic/drm-misc-2015-09-25' of git://anongit.freedesktop.org/drm-intel: (57 commits) drm/irq: Add drm_crtc_vblank_count_and_time() drm/irq: Rename drm_crtc -> crtc drm: drm_atomic_crtc_get_property should be static drm/gma500: Remove DP_LINK_STATUS_SIZE redefinition vga_switcheroo: Set active attribute to false for audio clients drm/core: Preserve the fb id on close. drm/core: Preserve the framebuffer after removing it. drm: Use vblank timestamps to guesstimate how many vblanks were missed drm: store_vblank() is never called with NULL timestamp drm: Clean up drm_calc_vbltimestamp_from_scanoutpos() vbl_status drm: Limit the number of .get_vblank_counter() retries drm: Pass flags to drm_update_vblank_count() drm/i915: Fix vblank count variable types drm: Kill pixeldur_ns drm: Stop using linedur_ns and pixeldur_ns for vblank timestamps drm: Move timestamping constants into drm_vblank_crtc drm/fbdev: Update legacy plane->fb refcounting for atomic restore drm: fix kernel-doc warnings in drm_crtc.h vga_switcheroo: Sort headers alphabetically drm: Spell vga_switcheroo consistently ...
2015-09-27Linux 4.3-rc3v4.3-rc3Linus Torvalds