summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drm/i915/execbuffer: Correctly clear the current object list upon EFAULTChris Wilson2011-01-111-3/+1
| | | | | | | | | | Before releasing the lock in order to copy the relocation list from user pages, we need to drop all the object references as another thread may usurp and execute another batchbuffer before we reacquire the lock. However, the code was buggy and failed to clear the list... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org
* drm/i915/debugfs: Show all objects in the gttChris Wilson2011-01-111-10/+43
| | | | | | Useful for determining the layout. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: Record AGP memory type upon errorChris Wilson2011-01-113-4/+16
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: Periodically flush the active lists and requestsChris Wilson2011-01-111-4/+26
| | | | | | | | | | | In order to retire active buffers whilst no client is active, we need to insert our own flush requests onto the ring. This is useful for servers that queue up some rendering and then go to sleep as it allows us to the complete processing of those requests, potentially making that memory available again much earlier. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915/gtt: Unmap the PCI pages after unbinding them from the GTTChris Wilson2011-01-111-7/+3
| | | | | | | | | | | | | | Dave Airlie spotted that his ILK laptop with DMAR enabled was generating the occasional DMAR warning. "The ordering in the previous code was to rewrite the GTT table before unmapping the pages and that makes sense to me." This is his stable patch ported to d-i-n. Reported-by: Dave Airlie <airlied@redhat.com> Original-patch-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: Record the error batchbuffer on each ringChris Wilson2011-01-113-120/+50
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: Include TLB miss overhead for computing WMChris Wilson2011-01-111-2/+9
| | | | | | | | The docs recommend that if 8 display lines fit inside the FIFO buffer, then the number of watermark entries should be increased to hide the latency of filling the rest of the FIFO buffer. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: Propagate error from flushing the ringChris Wilson2011-01-113-48/+90
| | | | | | ... in order to avoid a BUG() and potential unbounded waits. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: detect & report PCH display error interruptsJesse Barnes2011-01-112-2/+81
| | | | | | | | FDI and the transcoders can fail for various reasons, so detect those conditions and report on them. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: cleanup rc6 codeJesse Barnes2011-01-114-46/+75
| | | | | | | | | | | | | | Cleanup several aspects of the rc6 code: - misnamed intel_disable_clock_gating function (was only about rc6) - remove commented call to intel_disable_clock_gating - rc6 enabling code belongs in its own function (allows us to move the actual clock gating enable call back into restore_state) - allocate power & render contexts up front, only free on unload (avoids ugly lazy init at rc6 enable time) Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> [ickle: checkpatch cleanup] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: fix rc6 enabling around suspend/resumeJesse Barnes2011-01-112-3/+3
| | | | | | | | | Enabling RC6 implies setting a graphics context. Make sure we do that only after the ring has been enabled, otherwise our ring commands will hang. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: re-enable rc6 support for Ironlake+Jesse Barnes2011-01-114-21/+91
| | | | | | | | | | | | | Re-enable rc6 support on Ironlake for power savings. Adds a debugfs file to check current RC state, adds a missing workaround for Ironlake MI_SET_CONTEXT instructions, and renames MCHBAR_RENDER_STANDBY to RSTDBYCTL to match the docs. Keep RC6 and the power context disabled on pre-ILK. It only seems to hang and doesn't save any power. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: Make the ring IMR handling privateChris Wilson2011-01-112-12/+15
| | | | | | | | | As the IMR for the USER interrupts are not modified elsewhere, we can separate the spinlock used for these from that of hpd and pipestats. Those two IMR are manipulated under an IRQ and so need heavier locking. Reported-and-tested-by: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915/ringbuffer: Simplify the ring irq refcountingChris Wilson2011-01-112-39/+25
| | | | | | | | ... and move it under the spinlock to gain the appropriate memory barriers. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32752 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915/debugfs: Show the per-ring IMRChris Wilson2011-01-113-14/+24
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: Mask USER interrupts on gen6 (until required)Chris Wilson2011-01-115-62/+113
| | | | | | | Otherwise we may consume 20% of the CPU just handling IRQs whilst rendering. Ouch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: Handle ringbuffer stalls when flushingChris Wilson2011-01-114-43/+65
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: Enforce write ordering through the GTTChris Wilson2011-01-112-1/+16
| | | | | | | | | | We need to ensure that writes through the GTT land before any modification to the MMIO registers and so must impose a mandatory write barrier when flushing the GTT domain. This was revealed by relaxing the write ordering by experimentally mapping the registers and the GATT as write-combining. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: Remove impossible testChris Wilson2011-01-111-8/+0
| | | | | | | As has_gem is unconditionally set to true, the conditional immediately following that assignment is superfluous. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: avoid reading non-existent PLL reg on Ironlake+Jesse Barnes2011-01-111-5/+7
| | | | | | | | | These functions need to be reworked for Ironlake and above, but until then at least avoid reading non-existent registers. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> [ickle: combine with a gratuitous tidy] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: add 'reset' parameterChris Wilson2011-01-111-0/+6
| | | | | | | | | | | When bringing up new hardware, or otherwise experimenting, GPU hangs are a way of life. However, the automatic GPU reset can do more harm than good under these circumstances, as we may wish to capture a full trace for debugging. Based on a patch by Zhenyu Wang. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: fix the wrong latency value while computing wm0Yuanhan Liu2011-01-111-5/+5
| | | | | | | | | On Ironlake, the LP0 latency is hardcoded and in ns unit, while on Sandybridge, it comes from a register and with unit 0.1 us. So, fix the wrong latency value while computing wm0 on Ironlake and Sandybridge. Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: support low power watermarks on IronlakeJesse Barnes2011-01-112-130/+133
| | | | | | | | | | | | | | | This patch actually makes the watermark code even uglier (if that's possible), but has the advantage of sharing code between SNB and ILK at least. Longer term we should refactor the watermark stuff into its own file and clean it up now that we know how it's supposed to work. Supporting WM2 on my Vaio reduced power consumption by around 0.5W, so this patch is definitely worthwhile (though it also needs lots of test coverage). Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> [ickle: pass the watermark structs arounds] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* agp/intel: Flush the chipset write buffers when changing GTT baseChris Wilson2011-01-112-0/+11
| | | | | | | | | | Flush the chipset write buffers before and after adjusting the GTT base register, just in case. We only modify this value upon initialisation (boot and resume) so there should be no outstanding writes, however there are always those persistent PGTBL_ER that keep getting reported upon resume. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: Workaround erratum on i830 for TAIL pointer within last 2 cachelinesChris Wilson2011-01-112-3/+11
| | | | | | | | | On i830 if the tail pointer is set to within 2 cachelines of the end of the buffer, the chip may hang. So instead if the tail were to land in that location, we pad the end of the buffer with NOPs, and start again at the beginning. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: Use the mappable sizes determined by GTT for consistency.Chris Wilson2011-01-112-17/+10
| | | | | | There should be no difference, but we can eliminate redundant code. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: support overclocking on Sandy BridgeJesse Barnes2011-01-112-0/+28
| | | | | | | | | | In some configuration, the PCU may allow us to overclock the GPU. Check for this case and adjust the max frequency as appropriate. Also initialize the min/max frequencies to default values as indicated by hardware. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915/lvds: Always use 0 to disable the pfit controllerChris Wilson2011-01-111-0/+4
| | | | | | | | ... and just any combination of bits & ~PFIT_ENABLE. This way we do not attempt disable to the panel fitter controller uselessly upon intel_lvds_disable(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915/panel: Only record the backlight level when it is enabledChris Wilson2011-01-115-8/+39
| | | | | | | | | | | | | By tracking the current status of the backlight we can prevent recording the value of the current backlight when we have disabled it. And so prevent restoring it to 'off' after an unbalanced sequence of intel_lvds_disable/enable. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=22672 Tested-by: Alex Riesen <raa.lkml@gmail.com> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org
* drm/i915/sdvo: Defer detection of output capabilities until probingChris Wilson2011-01-111-22/+11
| | | | | | | | | | | | | | | | | | Alex Fiestas reported an issue with his HDMI connector being misdetected as DVI unless he had something connected upon boot. By moving the decision as to whether to use HDMI or DVI encoding for the HDMI capable output until we probe the monitor means that we should avoid sending a HDMI signal to a DVI monitor and also correctly detect hardware like Alex's. However, to really determine what connector is soldered onto the wire we need to inspect the VBT sdvo child devices - but can we trust it? Reported-by: Alex Fiestas <alex@eyeos.org> Tested-by: Alex Fiestas <alex@eyeos.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32828 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org
* drm/i915: fix calculation of eDP signal levels on SandybridgeYuanhan Liu2011-01-112-11/+21
| | | | | | | | | | | Some voltage swing/pre-emphasis level use the same value on eDP Sandybridge, like 400mv_0db and 600mv_0db are with the same value of (0x0 << 22). So, fix them, and point out the value if it isn't a supported voltage swing/pre-emphasis level. Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org
* drm/i915/crt: Check for a analog monitor in case of DVI-IDavid Müller2011-01-111-5/+25
| | | | | | | | | | | | | | | | | | | Since Linux 2.6.36 the digital output on my system (855GME + DVI-I) is not working any longer. The analog output is always activated regardless of the type of monitor attached. The culprit seems to be intel_crt_detect_ddc(), which returns true as soon as an ACK from the EDID device is received. Obviously this approach does not work with DVI-I where the analog and digital outputs share a common DDC bus. In a similar manner to the shared DDC wire, ala the "Mac Mini Hack", we need an additional check to make sure that there really is an analog device attached to the DDC. Signed-off-by: David Müller <d.mueller@elsoft.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org
* drm/i915: make DP training try a little harderJesse Barnes2011-01-111-4/+23
| | | | | | | | | | | | | | When trying to do channel equalization, we need to make sure we still have clock recovery on all lanes while training. We also need to try clock recovery again if we lose the clock or if channel eq fails 5 times. We'll try clock recovery up to 5 more times before giving up entirely. Gets suspend/resume working on my Vaio again and brings us back into compliance with the DP training sequence spec. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915: check eDP encoder correctly when setting modesJesse Barnes2011-01-111-1/+1
| | | | | | | | | | | | We were using a stale pointer in the check which caused us to use CPU attached DP params when we should have been using PCH attached params. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31988 Tested-by: Jan-Hendrik Zab <jan@jhz.name> Tested-by: Christoph Lukas <christoph.lukas@gmx.net> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org
* Merge branch 'drm-core-next' of ↵Linus Torvalds2011-01-10187-10722/+24781
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (390 commits) drm/radeon/kms: disable underscan by default drm/radeon/kms: only enable hdmi features if the monitor supports audio drm: Restore the old_fb upon modeset failure drm/nouveau: fix hwmon device binding radeon: consolidate asic-specific function decls for pre-r600 vga_switcheroo: comparing too few characters in strncmp() drm/radeon/kms: add NI pci ids drm/radeon/kms: don't enable pcie gen2 on NI yet drm/radeon/kms: add radeon_asic struct for NI asics drm/radeon/kms/ni: load default sclk/mclk/vddc at pm init drm/radeon/kms: add ucode loader for NI drm/radeon/kms: add support for DCE5 display LUTs drm/radeon/kms: add ni_reg.h drm/radeon/kms: add bo blit support for NI drm/radeon/kms: always use writeback/events for fences on NI drm/radeon/kms: adjust default clock/vddc tracking for pm on DCE5 drm/radeon/kms: add backend map workaround for barts drm/radeon/kms: fill gpu init for NI asics drm/radeon/kms: add disabled vbios accessor for NI asics drm/radeon/kms: handle NI thermal controller ...
| * drm/radeon/kms: disable underscan by defaultAlex Deucher2011-01-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lots of HDMI TVs overscan the incoming image by default. The underscan option was added as a way to compensate for that by underscanning the image so that the edges would not be cut off on an overscanning TV. However, the TV provides no way of knowing whether it is overscanning or not. If the user has disabled overscan on their TV or has a TV that does not overscan, you will get black bars around the edges of your screen. Prior to the patch we got complaints and bug reports from users with overscanning TVs, now with the patch, we get lots of complaints and bug reports from users with non-overscanning TVs. There's no good default, but on average there have been more users complaining about it being on by default than off, so change it to off. This will probably result in a new deluge of overscanning TV user complaints. There's no winning. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: only enable hdmi features if the monitor supports audioAlex Deucher2011-01-101-3/+3
| | | | | | | | | | | | | | | | This avoids some issues in the current hdmi audio code for monitors without audio. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * Merge branch 'drm-radeon-ni' of ../drm-radeon-next into drm-core-nextDave Airlie2011-01-1026-149/+1629
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'drm-radeon-ni' of ../drm-radeon-next: (30 commits) radeon: consolidate asic-specific function decls for pre-r600 drm/radeon/kms: add NI pci ids drm/radeon/kms: don't enable pcie gen2 on NI yet drm/radeon/kms: add radeon_asic struct for NI asics drm/radeon/kms/ni: load default sclk/mclk/vddc at pm init drm/radeon/kms: add ucode loader for NI drm/radeon/kms: add support for DCE5 display LUTs drm/radeon/kms: add ni_reg.h drm/radeon/kms: add bo blit support for NI drm/radeon/kms: always use writeback/events for fences on NI drm/radeon/kms: adjust default clock/vddc tracking for pm on DCE5 drm/radeon/kms: add backend map workaround for barts drm/radeon/kms: fill gpu init for NI asics drm/radeon/kms: add disabled vbios accessor for NI asics drm/radeon/kms: handle NI thermal controller drm/radeon/kms: parse DCE5 encoder caps when setting up encoders drm/radeon/kms: dvo dpms updates for DCE5 drm/radeon/kms: dac dpms updates for DCE5 drm/radeon/kms: DCE5 atom dig encoder updates drm/radeon/kms: DCE5 atom transmitter control updates ...
| | * radeon: consolidate asic-specific function decls for pre-r600Daniel Vetter2011-01-072-62/+50
| | | | | | | | | | | | | | | | | | | | | | | | Move them to radeon_asic.h together with the other asic specific stuff. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
| | * drm/radeon/kms: add NI pci idsAlex Deucher2011-01-071-0/+36
| | | | | | | | | | | | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| | * drm/radeon/kms: don't enable pcie gen2 on NI yetAlex Deucher2011-01-071-1/+2
| | | | | | | | | | | | | | | | | | | | | Still needs to be implemented. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| | * drm/radeon/kms: add radeon_asic struct for NI asicsAlex Deucher2011-01-071-0/+51
| | | | | | | | | | | | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| | * drm/radeon/kms/ni: load default sclk/mclk/vddc at pm initAlex Deucher2011-01-071-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | The vbios only partially initializes the memory controller on NI, so now we need to load the MC ucode in the driver and set the default clocks once the ucode is loaded. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| | * drm/radeon/kms: add ucode loader for NIAlex Deucher2011-01-075-4/+380
| | | | | | | | | | | | | | | | | | | | | | | | | | | The MC ucode is no longer loaded by the vbios tables as on previous asics. It now must be loaded by the driver. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| | * drm/radeon/kms: add support for DCE5 display LUTsAlex Deucher2011-01-071-3/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | The hardware supports advanced user defined color management but at the moment, there is no infrastructure in place to take advantage of it so for now we just support the legacy LUTs. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| | * drm/radeon/kms: add ni_reg.hAlex Deucher2011-01-072-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | This adds some new NI (northern islands) specific display register defines. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| | * drm/radeon/kms: add bo blit support for NIAlex Deucher2011-01-071-2/+67
| | | | | | | | | | | | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| | * drm/radeon/kms: always use writeback/events for fences on NIAlex Deucher2011-01-071-0/+5
| | | | | | | | | | | | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| | * drm/radeon/kms: adjust default clock/vddc tracking for pm on DCE5Alex Deucher2011-01-073-17/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NI chips no longer load the MC ucode in the asic_init sequence so the asic comes up in a basic mode with low engine/memory clocks and a voltage. Once the MC ucode is loaded by the driver the card can be programmed to it's proper default clocks and voltage. As such the default clocks in the firmware info table as the post clocks, not the default running clocks. Track the default post clocks and default running clocks separately to handle this. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| | * drm/radeon/kms: add backend map workaround for bartsAlex Deucher2011-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | Same as Cypress. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
OpenPOWER on IntegriCloud