summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon
Commit message (Collapse)AuthorAgeFilesLines
...
| * drm/radeon: use packet3 for nop on hawaii with new firmwareAlex Deucher2014-08-051-1/+4
| | | | | | | | | | | | | | Older firmware didn't support the new nop packet. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
| * drm/radeon: tweak ACCEL_WORKING2 query for hawaiiAlex Deucher2014-08-051-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Return 2 so we can be sure the kernel has the necessary changes for acceleration to work. Note: This patch depends on these two commits: - drm/radeon: fix cut and paste issue for hawaii. - drm/radeon: use packet2 for nop on hawaii with old firmware Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com> Cc: stable@vger.kernel.org
| * drm/radeon: use packet2 for nop on hawaii with old firmwareAlex Deucher2014-08-051-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | Older firmware didn't support the new nop packet. v2 (Andreas Boll): - Drop usage of packet3 for new firmware Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> (v1) Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com> Cc: stable@vger.kernel.org
| * drm/radeon: update IB size estimation for VMChristian König2014-08-051-13/+30
| | | | | | | | | | | | | | That should allow us to allocate bigger BOs. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: split PT setup in more functionsChristian König2014-08-057-247/+492
| | | | | | | | | | | | | | Move the decision what to use into the common VM code. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add VM GART copy optimization to NI as wellChristian König2014-08-051-1/+20
| | | | | | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: take a BO reference on VM cleanupChristian König2014-08-051-2/+6
| | | | | | | | | | | | | | This closes a small window where the GPU might have accessed freed up memory. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add radeon_bo_ref functionChristian König2014-08-052-0/+10
| | | | | | | | | | | | | | To be consistent with radeon_bo_unref, needed in the following patch. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: remove taking mclk_lock from radeon_bo_unrefChristian König2014-08-051-2/+0
| | | | | | | | | | | | | | | | It's causing lockdep warnings and why should we access the memory that is freed up? Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: adjust default radeon_vm_block_size v2Christian König2014-08-052-4/+16
| | | | | | | | | | | | | | | | v2: rebase on vm_size scale change. Adjust vm_size default to 8, Better handle the default and smaller values. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: try to enable VM flushing once moreChristian König2014-08-051-2/+1
| | | | | | | | | | | | | | | | Let's try to fix bugs related to this instead of just disabling it. Signed-off-by: Christian König <christian.koenig@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use an intervall tree to manage the VMA v2Alex Deucher2014-08-054-61/+51
| | | | | | | | | | | | | | | | | | | | Scales much better than scanning the address range linearly. v2: store pfn instead of address Signed-off-by: Christian König <christian.koenig@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: remove radeon_bo_clear_vaChristian König2014-08-051-11/+1
| | | | | | | | | | | | | | | | | | Won't work anyway, instead WARN_ON if the VA list isn't empty when we free the BO. Signed-off-by: Christian König <christian.koenig@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: invalidate moved BOs in the VM (v2)Christian König2014-08-053-12/+49
| | | | | | | | | | | | | | | | | | | | | | Don't wait for the BO to be used again, just update the PT on the next VM use. v2: remove stray semicolon. Signed-off-by: Christian König <christian.koenig@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: re-enable dpm by default on BTCAlex Deucher2014-08-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch depends on: e07929810f0a19ddd756558290c7d72827cbfcd9 (drm/radeon/dpm: fix typo in vddci setup for eg/btc) bugs: https://bugs.freedesktop.org/show_bug.cgi?id=73053 https://bugzilla.kernel.org/show_bug.cgi?id=68571 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| * drm/radeon: re-enable dpm by default on caymanAlex Deucher2014-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch depends on: b0880e87c1fd038b84498944f52e52c3e86ebe59 (drm/radeon/dpm: fix vddci setup typo on cayman) bug: https://bugs.freedesktop.org/show_bug.cgi?id=69723 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| * drm/radeon: Only flush HDP cache from idle ioctl if BO is in VRAMMichel Dänzer2014-08-051-2/+4
| | | | | | | | | | | | | | | | The HDP cache only applies to CPU access to VRAM. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon/dpm: handle voltage info fetching on hawaiiAlex Deucher2014-08-051-1/+12
| | | | | | | | | | | | | | | | | | | | | | Some hawaii cards use a different method to fetch the voltage info from the vbios. bug: https://bugs.freedesktop.org/show_bug.cgi?id=74250 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| * drm/radeon/atom: add new voltage fetch function for hawaiiAlex Deucher2014-08-052-0/+38
| | | | | | | | | | | | | | | | Some hawaii boards use a different method for fetching the voltage information from the vbios. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| * drm/radeon: Always flush the HDP cache before submitting a CS to the GPUMichel Dänzer2014-08-057-13/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | This ensures the GPU sees all previous CPU writes to VRAM, which makes it safe: * For userspace to stream data from CPU to GPU via VRAM instead of GTT * For IBs to be stored in VRAM instead of GTT * For ring buffers to be stored in VRAM instead of GTT, if the HPD flush is performed via MMIO Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: s/ioctl_wait_idle/mmio_hpd_flush/Michel Dänzer2014-08-055-40/+34
| | | | | | | | | | | | | | And clean up the function comment a little. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: separate ring and IB handlingChristian König2014-08-053-288/+320
| | | | | | | | | | | | | | Both on their own are complex enough. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: fix reversed logic in evergreen_mc_resumeAlex Deucher2014-08-051-1/+1
| | | | | | | | | | | | | | | | | | Need to unblank the display when resuming the MC. No functional change as this code path is not currently hit. We always disable the displays entirely rather than just blanking them. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: set VM base addr using the PFP v2Christian König2014-08-052-3/+4
| | | | | | | | | | | | | | | | | | | | Seems to make VM flushes more stable on SI and CIK. v2: only use the PFP on the GFX ring on CIK Signed-off-by: Christian König <christian.koenig@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon/cik: Read back SDMA WPTR register after writing itMichel Dänzer2014-08-051-0/+1
| | | | | | | | | | | | | | | | For symmetry with other *_set_wptr hooks. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: Use write-combined CPU mappings of IBs on >= CIKMichel Dänzer2014-08-051-4/+16
| | | | | | | | | | | | Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: Use write-combined CPU mappings of ring buffers with PCIeMichel Dänzer2014-08-051-1/+3
| | | | | | | | | | | | | | | | | | PCI GART doesn't support unsnooped access. AGP GART already uses write-combined CPU mappings. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: load the lm63 driver for an lm64 thermal chip.Alex Deucher2014-08-051-2/+2
| | | | | | | | | | | | | | Looks like the lm63 driver supports the lm64 as well. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| * drm/radeon: make radeon_connector_encoder_is_hbr2 staticAlex Deucher2014-08-052-2/+1
| | | | | | | | | | | | It's only used in radeon_connectors.c. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add trace_radeon_vm_flushChristian König2014-08-052-0/+19
| | | | | | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: fix R600_PTE_GART handlingChristian König2014-08-053-7/+5
| | | | | | | | | | | | | | That didn't worked correctly any more and opened up a security problem. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: remove discardable flag from radeon_gem_object_createChristian König2014-08-053-7/+5
| | | | | | | | | | | | | | | | Unused and unimplemented. Also fix specifying the kernel flag incorrectly at one occasion. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add a PX quirk listAlex Deucher2014-08-052-20/+51
| | | | | | | | | | | | | | | | | | | | | | | | Some PX laptops seems to have problems turning the dGPU on/off. Add a quirk list to disable runpm by default on those systems. Also convert the current PX d3 delay handling to a quirk. bug: https://bugzilla.kernel.org/show_bug.cgi?id=51381 https://bugzilla.kernel.org/show_bug.cgi?id=74551 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: remove visible vram size limit on bo allocation (v4)Alex Deucher2014-08-052-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that fallback to gtt is fixed for cpu access, we can remove this limit. bug: https://bugs.freedesktop.org/show_bug.cgi?id=78717 v2: use new gart_pin_size to accurately track available gtt. v3: fix comment v4: clarify comment Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
| * drm/radeon: use vram/gart pinned size in radeon_do_test_movesAlex Deucher2014-08-051-7/+1
| | | | | | | | | | | | | | | | | | Gives more accurate count and prevents failures when we can't allocate memory for the tests. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
| * drm/radeon: use vram/gart pinned size in radeon_gem_info_ioctlAlex Deucher2014-08-051-7/+4
| | | | | | | | | | | | | | | | Gives a more accurate limit than the previous code. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
| * drm/radeon: track pinned memory (v2)Alex Deucher2014-08-052-3/+17
| | | | | | | | | | | | | | | | | | | | So we know how large an allocation we can allow. v2: incorporate Michel's comments Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
| * drm/radeon: Allow write-combined CPU mappings of BOs in GTT (v2)Michel Dänzer2014-08-0521-47/+70
| | | | | | | | | | | | | | | | v2: fix rebase onto drm-fixes Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: Pass GART page flags to radeon_gart_set_page() explicitlyMichel Dänzer2014-08-058-24/+56
| | | | | | | | | | | | Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: Remove radeon_gart_restore()Michel Dänzer2014-08-0512-38/+0
| | | | | | | | | | | | | | | | Doesn't seem necessary, the GART table memory should be persistent. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: Demote 'BO allocation size too large' message to debug onlyMichel Dänzer2014-08-051-2/+2
| | | | | | | | | | | | | | | | | | These clutter up dmesg during piglit runs. Userspace generally deals gracefully with this failure. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use a fetch function to get the edidAlex Deucher2014-08-057-16/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We keep a cached version of the edid in radeon_connector which we use for determining connectedness and when to enable certain features like hdmi audio, etc. When the user uses the firmware interface to override the driver with some other edid the driver's copy is never updated. The fetch function will check if there is a user supplied edid and update the driver's copy if there is. bug: https://bugs.freedesktop.org/show_bug.cgi?id=80691 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: restructure edid fetchingAlex Deucher2014-08-053-111/+110
| | | | | | | | | | | | | | | | Split radeon_ddc_get_modes() and move it into radeon_connectors.c since that is the only place that uses it. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon/audio: break out of loops once we match connectorStefan Brüns2014-08-051-2/+6
| | | | | | | | | | | | | | | | | | No need to continue with the loops once we've matched the appropriate connector. See commit 8a992ee14551eae53fd3ab6c2dc8e06ba6fff174 Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: Use correct value for unknown audio/video latencyStefan Brüns2014-08-051-2/+2
| | | | | | | | | | | | | | | | | | Valid values are 1 to 251 for 0 to 500 ms latency, 0 for unknown and 255 for audio/video unsupported by sink, according to HDMI 1.3 spec. Also matches Radeon HDA verb 0xf7b documentation. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: Inline r100_mm_rreg, -wreg, v3Lauri Kasanen2014-08-052-37/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was originally un-inlined by Andi Kleen in 2011 citing size concerns. Indeed, a first attempt at inlining it grew radeon.ko by 7%. However, 2% of cpu is spent in this function. Simply inlining it gave 1% more fps in Urban Terror. v2: We know the minimum MMIO size. Adding it to the if allows the compiler to optimize the branch out, improving both performance and size. The v2 patch decreases radeon.ko size by 2%. I didn't re-benchmark, but common sense says perf is now more than 1% better. v3: Also change _wreg, make the threshold a define. Inlining _wreg increased the size a bit compared to v2, so now radeon.ko is only 1% smaller. Signed-off-by: Lauri Kasanen <cand@gmx.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: consolidate vga and dvi get_modes functions (v2)Alex Deucher2014-08-051-13/+1
| | | | | | | | | | | | | | | | They are identical. v2: rebase Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: enable display scaling on all connectors (v2)Alex Deucher2014-08-052-21/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables the display scaler on all connectors for r5xx and newer asics. Previously we only enabled the scaler for fixed mode displays (eDP or LVDS) since they have to use the scaler to support non-native modes. Most other displays are multi-sync or have a built in scaler to support non-native modes. The default scaling mode for non-fixed displays is none which will use the scaler in the monitor. Note that we do not populate any fake modes like we do for fixed displays so it will only use the modes in the edid. For other modes, you'll need to populate them manually. bug: https://bugs.freedesktop.org/show_bug.cgi?id=80868 v2: properly handle scaling with no modes defined Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: remove null test before kfreeFabian Frederick2014-08-051-6/+2
| | | | | | | | | | | | | | | | | | | | | | Fix checkpatch warning: WARNING: kfree(NULL) is safe this check is probably not required Cc: Alex Deucher <alexander.deucher@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon/cik: Add support for new ucode format (v5)Alex Deucher2014-08-054-190/+596
| | | | | | | | | | | | | | | | | | | | | | This adds CIK support for the new ucode format. v2: add size validation, integrate debug info v3: add support for MEC2 on KV v4: fix typos v4: update to latest format Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
OpenPOWER on IntegriCloud