summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2009-12-10drm/radeon: Remove tests for -ERESTART from the TTM code.Thomas Hellstrom2-29/+14
Also sets affected TTM calls up to not wait interruptible, since that would cause an in-kernel spin until the TTM call succeeds, since the Radeon code does not return to user-space when a signal is received. Modifies interruptible fence waits to return -ERESTARTSYS rather than -EBUSY when interrupted by a signal, since that's the (yet undocumented) semantics required by the TTM sync object hooks. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-10drm/ttm: Have the TTM code return -ERESTARTSYS instead of -ERESTART.Thomas Hellstrom4-35/+23
Return -ERESTARTSYS instead of -ERESTART when interrupted by a signal. The -ERESTARTSYS is converted to an -EINTR by the kernel signal layer before returned to user-space. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-10drm/radeon/kms: Convert radeon to new TTM validation API (V2)Jerome Glisse3-51/+67
This convert radeon to use new TTM validation API, it doesn't really take advantage of it beside in the eviction case. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-10drm/ttm: Rework validation & memory space allocation (V3)Jerome Glisse3-269/+256
This change allow driver to pass sorted memory placement, from most prefered placement to least prefered placement. In order to avoid long function prototype a structure is used to gather memory placement informations such as range restriction (if you need a buffer to be in given range). Range restriction is determined by fpfn & lpfn which are the first page and last page number btw which allocation can happen. If those fields are set to 0 ttm will assume buffer can be put anywhere in the address space (thus it avoids putting a burden on the driver to always properly set those fields). This patch also factor few functions like evicting first entry of lru list or getting a memory space. This avoid code duplication. V2: Change API to use placement flags and array instead of packing placement order into a quadword. V3: Make sure we set the appropriate mem.placement flag when validating or allocation memory space. [Pending Thomas Hellstrom further review but okay from preliminary review so far]. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-10drm: Add search/get functions to get a block in a specific rangeJerome Glisse2-0/+122
These are required for changes to TTM. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-10drm/radeon/kms: fix avivo tiling regression since radeon object reworkDave Airlie1-2/+3
The object rework moved the tiling flag setup around wrongly, so tiling we getting setup then overwritten by fb format. Fixes regression with drm-radeon-next on rv530 laptop tiling test. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/i915: Remove a debugging printk from hangcheckChris Wilson1-1/+0
A residual bare printk survived the merger of the hang detector, remove this debugging left-over. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-12-09drm/radeon/kms: make sure i2c id matchesAlex Deucher1-48/+43
Entries in the i2c table aren't always ordered by id. This allows us to remove some quirks that are no longer needed. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-09drm/radeon/kms: make sure ss id matchesAlex Deucher1-6/+12
entries in the ss table aren't always ordered by id. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-09drm/radeon/kms: connector fixesAlex Deucher2-9/+15
- Don't add dac load detection property to DVI-D - Make sure i2c info is valid before adding DP aux chan bus - Don't create scaling_mode_property twice - fix typo that prevented coherent and load detection from working - add coherent prop to DP (for dp->dvi adapters) Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-09drm/ttm: fix memory leak noticed by kmemleak.Dave Airlie1-1/+3
If we don't need the zone we need to free it. Acked-By: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-09drm: disable all the possible outputs/crtcs before entering KMS modeZhao Yakui1-0/+3
Sometimes we will use a crtc for integerated LVDS, which is different with that assigned by BIOS. If we want to get flicker-free transitions, then we could read out the current state for it and set our current state accordingly. But it is true that if we aren't reading current state out, we do need to turn everything off before modesetting. Otherwise the clocks can get very angry and we get things worse than a flicker at boot. In fact we also do the similar thing in UMS mode. We will disable all the possible outputs/crtcs for the first modesetting. So we disable all the possible outputs/crtcs before entering the KMS mode. Before we configure connector/encoder/crtc, the function of drm_helper_disable_unused_function can disable all the possible outputs/crtcs. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Rafal Milecki <zajec5@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/i915: restore render clock gating on resumeAndrew Lutomirski4-23/+22
Rather than restoring just a few clock gating registers on resume, just reinitialize the whole thing. Signed-off-by: Andy Lutomirski <luto@mit.edu> [anholt: Fixed up for RC6 support landed since the patch was written] Signed-off-by: Eric Anholt <eric@anholt.net>
2009-12-08Merge remote branch 'korg/drm-radeon-dp' into drm-linusDave Airlie24-323/+2657
This merges the radeon KMS DisplayPort and hotplug detect support. Tested on RV635 DP card with a Dell 2408 monitor. Conflicts: drivers/gpu/drm/drm_fb_helper.c
2009-12-08Merge remote branch 'korg/drm-radeon-next' into drm-linusDave Airlie42-1122/+2731
This merges all the radeon changes that weren't reliant on core-next.
2009-12-08Merge remote branch 'anholt/drm-intel-next' into drm-linusDave Airlie38-829/+3405
This merges the upstream Intel tree and fixes up numerous conflicts due to patches merged into Linus tree later in -rc cycle. Conflicts: drivers/char/agp/intel-agp.c drivers/gpu/drm/drm_dp_i2c_helper.c drivers/gpu/drm/i915/i915_irq.c drivers/gpu/drm/i915/i915_suspend.c
2009-12-08Merge branch 'drm-core-next' into drm-linusDave Airlie39-289/+2509
Bring all core drm changes into 2.6.32 tree and resolve the conflict that occurs. Conflicts: drivers/gpu/drm/drm_fb_helper.c
2009-12-08drm/kms: fix fb cmap allocation to use modeset->crtc not crtcBen Skeggs1-1/+1
crtc may be undefined at this point. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: enable hpd supportAlex Deucher10-10/+98
This enabled interrupt driven hpd support for all radeon chips. Assuming the hpd pin is wired up correctly, the driver will generate uevents on digital monitor connect and disconnect and retrain DP monitors automatically. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: add asic callbacks for hpdAlex Deucher3-1/+65
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: add hpd support for r6xx/r7xx/rs780/rs880 asicsAlex Deucher1-23/+485
This just adds the functionality, it's not hooked up yet. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: add hpd support for r5xx/rs600/rs690/rs740 asicsAlex Deucher1-0/+130
This just adds the functionality, it's not hooked up yet. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: add hpd support for r1xx-r4xx asicsAlex Deucher1-2/+104
This just adds the functionality, it's not hooked up yet. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: add regs and irq tracking bits for hpdAlex Deucher4-23/+154
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: get HPD info for connectorsAlex Deucher7-84/+330
This populates the connectors with HPD (Hot Plug Detect) information. This will be used in subsequent patches for automatic digital monitor connect/disconnect handling. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: clean up DP debuggingAlex Deucher1-28/+28
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: fix DP detectAlex Deucher4-11/+10
only return connected if there is actually a monitor connected. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: drop unused array to fix warning.Dave Airlie1-3/+0
Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: do dp link training at dpms on time not mode set.Dave Airlie1-4/+6
This moves the radeon DP link training call to happen when we dpms on the encoder not when we set the mode. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: make displayport work by reorganising vsemph setup.Dave Airlie1-1/+2
This fix reorganises the initial DP link training slightly, and actually makes DP work under kms here. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms/dp: fix return in dpcd retrival.Dave Airlie1-0/+1
Not returning here caused us to get a display port version of 0 for everything this caused power up to not get sent which ends up in a black screen. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: free aux channel i2c adapter on destroyAlex Deucher1-1/+18
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: add support for DP modesettingAlex Deucher6-82/+600
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: handle dp sinks in atom encoder/transmitter tablesAlex Deucher3-12/+100
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: store sink type in atom dig connectorAlex Deucher3-10/+17
This will be used laster when the encoder and transmitters are set up. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: i2c reorgAlex Deucher7-120/+166
- keep the atom i2c id in the i2c rec - fix gpio regs for GPIO and MDGPIO on pre-avivo chips - track whether the i2c line is hw capable - track whether the i2c line uses the multimedia i2c block Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: DP fixes and cleanup from the ddxAlex Deucher5-150/+105
- dpcp -> dpcd - fix up dig encoder routing - aux transaction table takes delay in 10 usec units Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: initial radeon displayport portingDave Airlie9-24/+500
This is enough to retrieve EDID and DPCP. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-07drm/i915: Set the error code after failing to insert new offset into mm ht.Chris Wilson1-0/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org Signed-off-by: Eric Anholt <eric@anholt.net>
2009-12-07drm/i915: Report purgeable status in buffer lists.Chris Wilson1-2/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-12-07agp/intel-agp: Clear entire GTT on startupDavid Woodhouse1-1/+6
Some BIOSes fail to initialise the GTT, which will cause DMA faults when the IOMMU is enabled. We need to clear the whole thing to point at the scratch page, not just the part that Linux is going to use. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> [anholt: Note that this may also help with stability in the presence of driver bugs, by not drawing to memory we don't own] Signed-off-by: Eric Anholt <eric@anholt.net>
2009-12-08drm/ttm: fix unreachable code.Dave Airlie1-2/+3
None of the in-tree drivers use user objects yet so this wasn't hitting us. Stanse found unreachable code in ttm_bo_add_ttm: http://decibel.fi.muni.cz/~xslaby/stanse/error.cgi?db=32&id=714#l238 Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/intel: refactor DP i2c support and DP common header to drm helperDave Airlie6-83/+83
Both radeon and nouveau can re-use this code so move it up a level so they can. However the hw interfaces for aux ch are different enough that the code to translate from mode, address, bytes to actual hw interfaces isn't generic, so move that code into the Intel driver. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: fix vram setup on rs600/rs690/rs740Alex Deucher3-5/+21
Don't remap vram to 0 on IGP chips. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-07drm/i915: Fix product names and #definesAdam Jackson17-349/+347
IGD* isn't a useful name. Replace with the codenames, as sourced from pci.ids. Signed-off-by: Adam Jackson <ajax@redhat.com> [anholt: Fixed up for merge with pineview/ironlake changes] Signed-off-by: Eric Anholt <eric@anholt.net>
2009-12-08drm/radeon/kms: more r4xx lvds fixesAlex Deucher3-6/+16
Grab pll ref div from regs at driver init. r4xx seems very picky about the dividers for the pll driving lvds. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms/legacy: set common regs to sane valueAlex Deucher4-0/+21
The DDX and radeonfb always set these regs to a sane value. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms/legacy: set overscan regs on modesetAlex Deucher2-0/+16
These can end up with garbage otherwise. fixes rh bug 537140 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: add support to atom parser for FB read/writeDave Airlie3-4/+8
FB read/write really doesn't need to access the actual VRAM, we can just use a scratch area. This is required for using atom displayport calls later. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-07agp/intel: Fix product names and #definesAdam Jackson1-42/+42
IGD* isn't a useful name. Replace with the codenames, as sourced from pci.ids. Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>