summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fix a struct file leak in do_mmap_pgoff()Al Viro2009-12-112-18/+15
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Unify sys_mmap*Al Viro2009-12-1146-907/+109
| | | | | | | New helper - sys_mmap_pgoff(); switch syscalls to using it. Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Cut hugetlb case early for 32bit on ia64Al Viro2009-12-111-0/+3
| | | | | | | It won't work anyway (hugetlb addresses there are way beyond 4Gb) and it's easier to stop it here. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* arch_mmap_check() on mn10300Al Viro2009-12-112-5/+5
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Kill ancient crap in s390 compat mmapAl Viro2009-12-111-5/+0
| | | | | | | | | | | | | We've had TASK_SIZE set to 1<<31 for 31bit tasks since May 2004. Before that old32_mmap() had to deal with do_mmap_pgoff() giving it an address out of range. It had tried to do that by checking return value and doing do_munmap() (at wrong address, BTW). IOW, that code had been dead for 5.5 years (and bogus - for 8). Kill. Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* arm: add arch_mmap_check(), get rid of sys_arm_mremap()Al Viro2009-12-113-26/+4
| | | | | Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* file ->get_unmapped_area() shouldn't duplicate work of get_unmapped_area()Al Viro2009-12-112-17/+24
| | | | | | | | ... we should call mm ->get_unmapped_area() instead and let our caller do the final checks. Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* kill useless checks in sparc mremap variantsAl Viro2009-12-115-51/+2
| | | | | | Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* fix pgoff in "have to relocate" case of mremap()Al Viro2009-12-111-1/+3
| | | | | Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* fix the arch checks in MREMAP_FIXED caseAl Viro2009-12-111-2/+17
| | | | | | Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* fix checks for expand-in-place mremapAl Viro2009-12-111-2/+11
| | | | | Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* do_mremap() untangling, part 3Al Viro2009-12-111-4/+12
| | | | | | | | | Take the check for being able to expand vma in place into a separate helper. Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* do_mremap() untangling, part 2Al Viro2009-12-111-48/+72
| | | | | | | | | Take the MREMAP_FIXED into a separate helper, simplify the living hell out of conditions in both cases. Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* untangling do_mremap(), part 1Al Viro2009-12-111-33/+55
| | | | | | | | | | Take locating vma and checks on it to a separate helper (it will be shared between MREMAP_FIXED/non-MREMAP_FIXED cases when we split them in the next patch) Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Merge branch 'drm-linus' of ↵Linus Torvalds2009-12-11122-2947/+12028
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (189 commits) drm/radeon/kms: fix warning about cur_placement being uninitialised. drm/ttm: Print debug information on memory manager when eviction fails drm: Add memory manager debug function drm/radeon/kms: restore surface registers on resume. drm/radeon/kms/r600/r700: fallback gracefully on ucode failure drm/ttm: Initialize eviction placement in case the driver callback doesn't drm/radeon/kms: cleanup structure and module if initialization fails drm/radeon/kms: actualy set the eviction placements we choose drm/radeon/kms: Fix NULL ptr dereference drm/radeon/kms/avivo: add support for new pll selection algo drm/radeon/kms/avivo: fix some bugs in the display bandwidth setup drm/radeon/kms: fix return value from fence function. drm/radeon: Remove tests for -ERESTART from the TTM code. drm/ttm: Have the TTM code return -ERESTARTSYS instead of -ERESTART. drm/radeon/kms: Convert radeon to new TTM validation API (V2) drm/ttm: Rework validation & memory space allocation (V3) drm: Add search/get functions to get a block in a specific range drm/radeon/kms: fix avivo tiling regression since radeon object rework drm/i915: Remove a debugging printk from hangcheck drm/radeon/kms: make sure i2c id matches ...
| * drm/radeon/kms: fix warning about cur_placement being uninitialised.Dave Airlie2009-12-101-1/+1
| | | | | | | | Signed-off-by: Dave Airlie <airlied@redhat.com>
| * Merge remote branch 'korg/drm-radeon-next' of into drm-linusDave Airlie2009-12-1032-512/+849
| |\ | | | | | | | | | | | | | | | | | | | | | This merges some TTM overhauls to allow us to do better object placement for certain radeon GPUs that need scanout+cursor within range of each other, along with an API change to not return ERESTART to userspace, but to use ERESTARTSYS properly internally and have it convert to EINTR and catch that correctly. Also lots of radeon fixes across the board.
| | * drm/ttm: Print debug information on memory manager when eviction failsJerome Glisse2009-12-101-13/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | This add helper function to print information on eviction placements and memory manager status when eviction fails to allocate memory space. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| | * drm: Add memory manager debug functionJerome Glisse2009-12-102-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | drm_mm_debug_table will print the memory manager state in table allowing to give a snapshot of the manager at given point in time. Usefull for debugging. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| | * drm/radeon/kms: restore surface registers on resume.Dave Airlie2009-12-1011-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On resume on my rv530 laptop surface cntl was left disabled, so wierd stuff would happen with rendering to a tiled front buffer. This checks if the surface regs are assigned to bos and reprograms the surface registers on resume using the same path that clears them all on init. Signed-off-by: Dave Airlie <airlied@redhat.com>
| | * drm/radeon/kms/r600/r700: fallback gracefully on ucode failureAlex Deucher2009-12-102-25/+25
| | | | | | | | | | | | | | | | | | | | | Sent the wrong patch earlier. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| | * drm/ttm: Initialize eviction placement in case the driver callback doesn'tJerome Glisse2009-12-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | This would allow to catch driver callback error of not properly setting the eviction placement structure. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| | * drm/radeon/kms: cleanup structure and module if initialization failsJerome Glisse2009-12-101-22/+20
| | | | | | | | | | | | | | | | | | | | | | | | This would allow us to properly unload others module like TTM if initialization fails after we initiliazed TTM structure. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| | * drm/radeon/kms: actualy set the eviction placements we chooseJerome Glisse2009-12-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Stupid bug, somehow copying the eviction placements into the result structure was missing. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| | * drm/radeon/kms: Fix NULL ptr dereferenceJerome Glisse2009-12-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | radeon_atombios_fini might be call while there is not valid atombios structure allocated, thus test for a not null ptr before trying to access this structure. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| | * drm/radeon/kms/avivo: add support for new pll selection algoAlex Deucher2009-12-106-3/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Supported on all AVIVO-based asics. Can be disabled via the new_pll module parameter: new_pll=0 - disable new_pll=1 - enable enabled by default [airlied: fixed to use do_div] Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| | * drm/radeon/kms/avivo: fix some bugs in the display bandwidth setupAlex Deucher2009-12-103-5/+28
| | | | | | | | | | | | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| | * drm/radeon/kms: fix return value from fence function.Dave Airlie2009-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We only want to return here for errors, the wait functions return a positive timeout otherwise, which gets back to userspace and causes X to crash here. Signed-off-by: Dave Airlie <airlied@redhat.com>
| | * drm/radeon: Remove tests for -ERESTART from the TTM code.Thomas Hellstrom2009-12-102-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>
| | * drm/ttm: Have the TTM code return -ERESTARTSYS instead of -ERESTART.Thomas Hellstrom2009-12-104-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>
| | * drm/radeon/kms: Convert radeon to new TTM validation API (V2)Jerome Glisse2009-12-103-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>
| | * drm/ttm: Rework validation & memory space allocation (V3)Jerome Glisse2009-12-103-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>
| | * drm: Add search/get functions to get a block in a specific rangeJerome Glisse2009-12-102-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>
| | * drm/radeon/kms: fix avivo tiling regression since radeon object reworkDave Airlie2009-12-101-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>
| | * drm/radeon/kms: make sure i2c id matchesAlex Deucher2009-12-091-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>
| | * drm/radeon/kms: make sure ss id matchesAlex Deucher2009-12-091-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>
| | * drm/radeon/kms: connector fixesAlex Deucher2009-12-092-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>
| | * drm/ttm: fix memory leak noticed by kmemleak.Dave Airlie2009-12-091-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>
| | * drm: disable all the possible outputs/crtcs before entering KMS modeZhao Yakui2009-12-091-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>
| * | Merge remote branch 'anholt/drm-intel-next' into drm-linusDave Airlie2009-12-108-27/+32
| |\ \ | | |/ | |/| | | | Pull more Intel changes in, especially one to init the GTT properly
| | * drm/i915: Remove a debugging printk from hangcheckChris Wilson2009-12-091-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>
| | * drm/i915: restore render clock gating on resumeAndrew Lutomirski2009-12-084-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>
| | * drm/i915: Set the error code after failing to insert new offset into mm ht.Chris Wilson2009-12-081-0/+1
| | | | | | | | | | | | | | | | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Report purgeable status in buffer lists.Chris Wilson2009-12-081-2/+3
| | | | | | | | | | | | | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * agp/intel-agp: Clear entire GTT on startupDavid Woodhouse2009-12-081-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>
| * | Merge remote branch 'korg/drm-radeon-dp' into drm-linusDave Airlie2009-12-0824-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
| | * | drm/radeon/kms: enable hpd supportAlex Deucher2009-12-0810-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>
| | * | drm/radeon/kms: add asic callbacks for hpdAlex Deucher2009-12-083-1/+65
| | | | | | | | | | | | | | | | | | | | 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-081-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>
| | * | drm/radeon/kms: add hpd support for r5xx/rs600/rs690/rs740 asicsAlex Deucher2009-12-081-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>