aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-09-20drm/radeon: Remove unused functionsLauri Kasanen4-74/+0
This applies on top of drm/radeon: Mark all possible functions / structs as static. Signed-off-by: Lauri Kasanen <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: Mark all possible functions / structs as staticLauri Kasanen27-93/+93
Let's allow GCC to optimize better. This exposed some five unused functions, but this patch doesn't remove them. Signed-off-by: Lauri Kasanen <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: remove dead function defAlex Deucher1-2/+1
Was removed in the async VM update series. Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: implement bounds checking on thermal controller lookupAlex Deucher1-2/+9
Don't read past the end of the array if we encounter an unknown thermal controller. Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: document async VM changes in ni.cAlex Deucher1-0/+15
Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: make page table updates async v2Christian König5-25/+71
Currently doing the update with the CP. v2: Rebased on Jeromes bugfix. Make validity comparison more human readable. Signed-off-by: Christian König <[email protected]>
2012-09-20drm/radeon: make sure ib bo is properly bound and up to date in vm spaceJerome Glisse1-0/+5
Make sure that the ib bo is bound and is page table is up to date in the virtual address space. Signed-off-by: Jerome Glisse <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-09-20drm/radeon: Move looping over the PTEs into chip codeChristian König5-34/+34
Makes it easier to move it into the rings. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jerome Glisse <[email protected]>
2012-09-20drm/radeon: rework VM page table handlingChristian König4-116/+43
Removing the need to wait for anything. Still not ideal, since we need to free pt on va remove. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jerome Glisse <[email protected]>
2012-09-20drm/radeon: rework VMID handlingChristian König8-76/+153
Move binding onto the ring, simplifying handling a bit. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jerome Glisse <[email protected]>
2012-09-20drm/radeon: make VM flushs a ring operationChristian König8-38/+42
Move flushing the VMs as function into the rings. First step to make VM operations async. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jerome Glisse <[email protected]>
2012-09-20drm/radeon: add sync helper functionChristian König1-6/+14
Signed-off-by: Christian König <[email protected]> Reviewed-by: Jerome Glisse <[email protected]>
2012-09-20drm/radeon: remove vm_unbindChristian König5-29/+0
It actually isn't very useful. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jerome Glisse <[email protected]>
2012-09-20drm/radeon: move VM funcs into asic structureChristian König3-47/+54
So it looks more like the rest of the driver. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jerome Glisse <[email protected]>
2012-09-20drm/radeon: cleanup VM id handling a bitChristian König7-26/+25
Store a reference to the VM into the IB structure, that makes calculating the IBs address a bit less complicated. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jerome Glisse <[email protected]>
2012-09-20drm/radeon/atom: add consolidate bpc codeAlex Deucher1-67/+29
Several encoder setup functions had the same duplicated code for selecting the proper bpc setting for various atom tables. Consolidate it. Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: rework the backlight control to be an asic callbackAlex Deucher7-33/+84
This cleans up the interface a bit as well. Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: add initial support for ATCS ACPI methodsAlex Deucher2-1/+138
Just verify the interface and track what functions are supported. Not actually used yet. Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: document radeon_atpx_handler.c (v2)Alex Deucher1-0/+111
v2: rebase updates Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: reorganize ATPX support (v2)Alex Deucher1-60/+110
- rework the acpi execute code - User proper parameters for ATPX functions v2: rebase fixes Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: update ATPX verify interface handling (v2)Alex Deucher1-17/+124
Verify the ATPX interface and track what ATPX functions are available for future use. v2: rework due to tree changes Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: document radeon_acpi.cAlex Deucher1-0/+101
Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: block the keypress on ATIF eventsLuca Tettamanti1-1/+6
The AMD ACPI interface may use ACPI_VIDEO_NOTIFY_PROBE to signal SBIOS requests; block the keypress in this case since the user did not actually press the mode switch key. Signed-off-by: Luca Tettamanti <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2012-09-20ACPI video: allow events handlers to veto the keypressLuca Tettamanti1-4/+4
The standard video events may be overloaded for device specific purposes. For example AMD ACPI interface overloads ACPI_VIDEO_NOTIFY_PROBE (0x81) to signal AMD-specific events. In such cases we don't want to send the keypress (KEY_SWITCHVIDEOMODE) to the userspace because the user did not press the mode switch key (the spurious keypress confuses the DE which usually changes the display configuration and messes up a dual-screen setup). This patch gives the handlers the chance to examine the event and block the keypress if the event is device specific. v2: refactor as suggested by Zhang Rui <[email protected]> Signed-off-by: Luca Tettamanti <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: re-organize the acpi notifier callbackAlex Deucher4-43/+48
Move it out of the radeon_pm.c and into radeon_acpi.c since we use it for more than just pm now. Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: implement handler for ACPI eventLuca Tettamanti7-11/+152
Set up an handler for ACPI events and respond to brightness change requests from the system BIOS. v2: fix notification when using device-specific command codes (tested by Pali Rohár <[email protected]>); cache the encoder controlling the backlight during the initialization to avoid searching it every time (suggested by Alex Deucher). v3: whitespace fixes (Alex Deucher). Signed-off-by: Luca Tettamanti <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: implement wrapper for GET_SYSTEM_PARAMSLuca Tettamanti1-2/+83
Use GET_SYSTEM_PARAMS for retrieving the configuration for the system BIOS notifications. v2: packed struct (Lee, Chun-Yi <[email protected]>) v3: fix enable with device specific command code Signed-off-by: Luca Tettamanti <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: implement radeon_atif_verify_interfaceLuca Tettamanti2-6/+113
Wrap the call to VERIFY_INTERFACE and add the parsing of the support vectors. v2: use a packed struct for handling the output of ACPI calls, hides ugly pointer arithmetics (Lee, Chun-Yi <[email protected]>). v3: fix radeon_atif_parse_functions handling (Alex Deucher) Signed-off-by: Luca Tettamanti <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: refactor radeon_atif_callLuca Tettamanti1-15/+23
Don't hard-code function number, this will allow to reuse the function. v2: add support for the 2nd parameter (from Lee, Chun-Yi <[email protected]>). Signed-off-by: Luca Tettamanti <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: add backlight control for atom devices (v2)Alex Deucher3-16/+248
On systems that use the build in GPU backlight controller, we can use atom tables to change the brightness level. v2: use firmware flags Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: rework legacy backlight controlAlex Deucher2-13/+17
To better enable sharing with atom backlight control. Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: track whether the GPU controls the backlight (v2)Alex Deucher2-0/+6
A table in the vbios tells us whether the GPU backlight controller is used or not. If the bit is set, the GPU backlight controller is used; if it is not set, an off-chip backlight controller is used. v2: store all the firmware flags, not just BL control Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: add a license header to radeon_apci.cAlex Deucher1-0/+23
Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: add new AMD ACPI header and update relevant code (v2)Alex Deucher3-22/+455
Add a new header that defines the AMD ACPI interface used for laptops, PowerXpress, and chipset specific functionality and update the current code to use it. Todo: - properly verify the ACPI interfaces - hook up and handle ACPI notifications - make PX code more robust - implement PCIe Gen and width switching using ACPI v2: fix typo in header Signed-off-by: Alex Deucher <[email protected]>
2012-09-20Annotate int2float() as being a pure function.Steven Fuerst2-2/+2
This allows gcc to fold duplicate calls into a single call. Since the current users do actually call it multiple times with the same arguments, this is an obvious win. Signed-off-by: Steven Fuerst <[email protected]>
2012-09-20Replace int2float() with an optimized version.Steven Fuerst1-23/+28
We use __fls() to find the most significant bit. Using that, the loop can be avoided. A second trick is to use the behaviour of the rotate instructions to expand the range of the unsigned int to float conversion to the full 32 bits in a branchless way. The routine is now exact up to 2^24. Above that, we truncate which is equivalent to rounding towards zero. Signed-off-by: Steven Fuerst <[email protected]>
2012-09-20Rename i2f() to int2float(), and make it global so one copy can be removed.Steven Fuerst3-79/+40
Remove the copy of i2f() in r600_blit_kms.c We rename the function to something longer now that it is a global symbol. This reduces the likelyhood of unintended clashes later. This might be a candidate for inclusion inside general drm infrastructure. However, at the moment only the radeon driver uses it. Signed-off-by: Steven Fuerst <[email protected]>
2012-09-20drm/radeon: remove gui_idle interrupt infrastructureAlex Deucher8-91/+0
It was only used for dynpm, but has been replaced with a better implementation using fences. Remove it. Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon/dynpm: wait for fences on all rings when reclockingAlex Deucher1-11/+6
1. Drop gui idle stuff, it's not as reliable as fences and only covers the 3D engine. 2. Wait for fences on all rings. This makes sure all rings are idle when reclocking. Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: properly handle mc_stop/mc_resume on evergreen+ (v2)Alex Deucher4-91/+88
- Stop the displays from accessing the FB - Block CPU access - Turn off MC client access This should fix issues some users have seen, especially with UEFI, when changing the MC FB location that result in hangs or display corruption. v2: fix crtc enabled check noticed by Luca Tettamanti Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon/r5xx-r7xx: don't use radeon_crtc for vblank callback (v2)Alex Deucher1-4/+12
This might be called before we've allocated the radeon_crtcs v2: fix typo in array size Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon/r1xx-r4xx: don't use radeon_crtc for vblank callbackAlex Deucher1-2/+4
This might be called before we've allocated the radeon_crtcs Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: clean up evergreen_get_vblank_counterAlex Deucher1-15/+3
Use the new offset array rather than open coding it. Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon/dce4+: don't use radeon_crtc for vblank callbackAlex Deucher1-4/+16
This might be called before we've allocated the radeon_crtcs Signed-off-by: Alex Deucher <[email protected]>
2012-09-20drm/radeon: Prevent leak of scratch register on resume from suspendSimon Kitching1-1/+2
Cards typically have 5-7 scratch registers; one of these is reserved for rdev->rptr_save_reg. Unfortunately the reservation is done in function r100_cp_init, which is called by all drivers except r600 - and this function is also invoked on resume from suspend. After several resumes, no scratch registers are free and graphics acceleration is disabled. Dmesg then reports either: *ERROR* radeon: cp failed to get scratch reg (-22). *ERROR* radeon: cp isn't working(-22). radeon 0000:01:00.0: failed initializing CP (-22). or: *ERROR* radeon: failed to get scratch reg (-22). *ERROR* radeon: failed testing IB on GFX ring (-22). *ERROR* ib ring test failed (-22). The chain of calls on boot for all except r600 is: radeon_init -> ... -> (rXXX_init) -> rXXX_startup -> r100_cp_init The chain of calls on resume for all except r600 is: rXXX_resume -> rXXX_startup -> r100_cp_init. R600 correctly allocates rptr_save_reg in r600_init (ie once only, not in resume). However moving the code into the init functions for all drivers means touching 4 drivers. So instead, this patch just adds a test in r100_cp_init to avoid reallocating on resume. As the rdev structure is allocated via kzalloc in radeon_driver_load_kms, and zero is not a valid registerid, zero safely implies not-yet-allocated. This issue appears to have been introduced in c7eff978 (3.6.0-rcN) Signed-off-by: Simon Kitching <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2012-09-17Revert "drm/radeon: rework pll selection (v3)"Alex Deucher1-129/+34
This reverts commit 985f61f7ee647ad570c05eab0b74915da2ac8e19. This commit fixed certain cases, but ended up regressing others due to limitations in the current KMS API. A proper fix is too invasive for 3.6. Push it back to 3.7. Reported-by: Andres Freund <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2012-09-14drm/nouveau: fix booting with plymouth + dumb supportDave Airlie1-1/+1
We noticed a plymouth bug on Fedora 18, and I then noticed this stupid thinko, fixing it fixed the problem with plymouth. Cc: [email protected] Acked-by: Ben Skeggs <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-09-14Merge branch 'drm-fixes-3.6' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie2-37/+134
into drm-fixes Alex writes: This is the current set of radeon fixes for 3.6. Two small fixes: - fix the fence issues introduced in 3.5 with 64-bit fences - PLL fix for multiple DP heads * 'drm-fixes-3.6' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: make 64bit fences more robust v3 drm/radeon: rework pll selection (v3)
2012-09-13drm/radeon: make 64bit fences more robust v3Christian König1-3/+5
Only increase the higher 32bits if we really detect a wrap around. v2: instead of increasing the higher 32bits just use the higher 32bits from the last emitted fence. v3: also use last emitted fence value as upper limit. The intention of this patch is to make fences as robust as they where before introducing 64bit fences. This is necessary because on older systems it looks like the fence value gets corrupted on initialization. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=51344 Should also fix: https://bugs.freedesktop.org/show_bug.cgi?id=54129 https://bugs.freedesktop.org/show_bug.cgi?id=54662 https://bugzilla.redhat.com/show_bug.cgi?id=846505 https://bugzilla.redhat.com/show_bug.cgi?id=845639 3.5 needs a separate patch due to changes in the fence code. Will send that out separately. Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2012-09-13drm/radeon: rework pll selection (v3)Alex Deucher1-34/+129
For DP we can use the same PPLL for all active DP encoders. Take advantage of that to prevent cases where we may end up sharing a PPLL between DP and non-DP which won't work. Also clean up the code a bit. v2: - fix missing pll_id assignment in crtc init v3: - fix DP PPLL check - document functions - break in main encoder search loop after matching. no need to keep checking additional encoders. fixes: https://bugs.freedesktop.org/show_bug.cgi?id=54471 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]