aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* drm/ttm: Have the TTM code return -ERESTARTSYS instead of -ERESTART.Thomas Hellstrom2009-12-10
| | | | | | | | | | 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>
* drm/radeon/kms: Convert radeon to new TTM validation API (V2)Jerome Glisse2009-12-10
| | | | | | | | 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>
* drm/ttm: Rework validation & memory space allocation (V3)Jerome Glisse2009-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* drm: Add search/get functions to get a block in a specific rangeJerome Glisse2009-12-10
| | | | | | | These are required for changes to TTM. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix avivo tiling regression since radeon object reworkDave Airlie2009-12-10
| | | | | | | | | 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>
* drm/radeon/kms: make sure i2c id matchesAlex Deucher2009-12-08
| | | | | | | | | 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>
* drm/radeon/kms: make sure ss id matchesAlex Deucher2009-12-08
| | | | | | | | 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>
* drm/radeon/kms: connector fixesAlex Deucher2009-12-08
| | | | | | | | | | | - 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>
* drm/ttm: fix memory leak noticed by kmemleak.Dave Airlie2009-12-08
| | | | | | | 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>
* drm: disable all the possible outputs/crtcs before entering KMS modeZhao Yakui2009-12-08
| | | | | | | | | | | | | | | | | | | | | | 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>
* Merge remote branch 'korg/drm-radeon-dp' into drm-linusDave Airlie2009-12-07
|\ | | | | | | | | | | | | | | | | 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
| * drm/radeon/kms: enable hpd supportAlex Deucher2009-12-07
| | | | | | | | | | | | | | | | | | | | | | 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>
| * drm/radeon/kms: add asic callbacks for hpdAlex Deucher2009-12-07
| | | | | | | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: add hpd support for r6xx/r7xx/rs780/rs880 asicsAlex Deucher2009-12-07
| | | | | | | | | | | | | | | | 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>
| * drm/radeon/kms: add hpd support for r5xx/rs600/rs690/rs740 asicsAlex Deucher2009-12-07
| | | | | | | | | | | | | | | | 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>
| * drm/radeon/kms: add hpd support for r1xx-r4xx asicsAlex Deucher2009-12-07
| | | | | | | | | | | | | | | | 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>
| * drm/radeon/kms: add regs and irq tracking bits for hpdAlex Deucher2009-12-07
| | | | | | | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: get HPD info for connectorsAlex Deucher2009-12-07
| | | | | | | | | | | | | | | | | | 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>
| * drm/radeon/kms: clean up DP debuggingAlex Deucher2009-12-07
| | | | | | | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: fix DP detectAlex Deucher2009-12-07
| | | | | | | | | | | | | | | | 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>
| * drm/radeon/kms: drop unused array to fix warning.Dave Airlie2009-12-07
| | | | | | | | Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: do dp link training at dpms on time not mode set.Dave Airlie2009-12-07
| | | | | | | | | | | | | | 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>
| * drm/radeon/kms: make displayport work by reorganising vsemph setup.Dave Airlie2009-12-07
| | | | | | | | | | | | | | 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>
| * drm/radeon/kms/dp: fix return in dpcd retrival.Dave Airlie2009-12-07
| | | | | | | | | | | | | | 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>
| * drm/radeon/kms: free aux channel i2c adapter on destroyAlex Deucher2009-12-07
| | | | | | | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: add support for DP modesettingAlex Deucher2009-12-07
| | | | | | | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: handle dp sinks in atom encoder/transmitter tablesAlex Deucher2009-12-07
| | | | | | | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: store sink type in atom dig connectorAlex Deucher2009-12-07
| | | | | | | | | | | | | | | | 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>
| * drm/radeon/kms: i2c reorgAlex Deucher2009-12-07
| | | | | | | | | | | | | | | | | | | | - 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>
| * drm/radeon/kms: DP fixes and cleanup from the ddxAlex Deucher2009-12-07
| | | | | | | | | | | | | | | | | | - 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>
| * drm/radeon/kms: initial radeon displayport portingDave Airlie2009-12-07
| | | | | | | | | | | | This is enough to retrieve EDID and DPCP. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: add support to atom parser for FB read/writeDave Airlie2009-12-07
| | | | | | | | | | | | | | | | 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>
| * Merge remote branch 'origin/drm-core-next' into testDave Airlie2009-12-07
| |\ | | | | | | | | | | | | Conflicts: drivers/gpu/drm/drm_fb_helper.c
* | | Merge remote branch 'korg/drm-radeon-next' into drm-linusDave Airlie2009-12-07
|\| | | | | | | | | | | This merges all the radeon changes that weren't reliant on core-next.
| * | drm/radeon/kms: fix vram setup on rs600/rs690/rs740Alex Deucher2009-12-07
| | | | | | | | | | | | | | | | | | | | | 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>
| * | drm/radeon/kms: more r4xx lvds fixesAlex Deucher2009-12-07
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | drm/radeon/kms/legacy: set common regs to sane valueAlex Deucher2009-12-07
| | | | | | | | | | | | | | | | | | | | | 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>
| * | drm/radeon/kms/legacy: set overscan regs on modesetAlex Deucher2009-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | drm/radeon/kms: fix RS600 MC setup.Dave Airlie2009-12-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Again we try to put VRAM at 0, and it didn't work on this chipset, reports of corrupt RAM appeared on irc and bugzilla. Fix the vram location according to what the BIOS setup, I'm not 100% sure we don't need the same thing on rs690/rs780/rs880, we probably should do it there just in case as its what the DDX does. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms: fix up gart setup on rs600Alex Deucher2009-12-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set up rs600 gart like r600: - set gart system aperture to vram - inside gart system aperture is unmapped* - outside gart system aperture is mapped* *mapped refers to memory handled by page tables Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms: quirk for Gigabyte RV515 card, DVI+VGA not 2xDVI.Dave Airlie2009-12-03
| | | | | | | | | | | | | | | | | | Similiar to other quirks for RV515, this card has no second DVI port. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms: rs6xx/rs740: clamp vram to aperture sizeAlex Deucher2009-12-03
| | | | | | | | | | | | | | | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms: fix vram setup on rs600Alex Deucher2009-12-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | also fix up rs690 mem width. should fix fdo bug 25408 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms: fix legacy crtc2 dpmsAlex Deucher2009-12-03
| | | | | | | | | | | | | | | | | | | | | | | | noticed by Matthijs Kooijman on fdo bug 22140 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms: handle vblanks properly with dpms onAlex Deucher2009-12-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | avivo chips Copied from pre-avivo code. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms: Add quirk for HIS X1300 boardAlex Deucher2009-12-03
| | | | | | | | | | | | | | | | | | | | | | | | Board is DVI+VGA, not DVI+DVI Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms: don't use bios dividers for lvds on r4xxAlex Deucher2009-12-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | R4xx cards don't have lvds pll dividers since they use atom. should fix rh bug 541562 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms: fix ring info in debugfs on r600+Rafał Miłecki2009-12-03
| | | | | | | | | | | | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Acked-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms: fix typo in define: engine -> memoryRafał Miłecki2009-12-03
| | | | | | | | | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms/pm: fix typosRafał Miłecki2009-12-03
| | | | | | | | | | | | | | | | | | | | | Unit typo noticed by taiu on IRC Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>