1. 17 2月, 2011 1 次提交
  2. 14 2月, 2011 3 次提交
  3. 27 1月, 2011 1 次提交
  4. 17 1月, 2011 1 次提交
    • A
      drm/radeon/kms: balance asic_reset functions · 25b2ec5b
      Alex Deucher 提交于
      First, we were calling mc_stop() at the top of the function
      which turns off all MC (memory controller) clients,
      then checking if the GPU is idle.  If it was idle we
      returned without re-enabling the MC clients which would
      lead to a blank screen, etc.  This patch checks if the
      GPU is idle before calling mc_stop().
      
      Second, if the reset failed, we were returning without
      re-enabling the MC clients.  This patch re-enables
      the MC clients before returning regardless of whether
      the reset was successful or not.
      Signed-off-by: NAlex Deucher <alexdeucher@gmail.com>
      Cc: Jerome Glisse <jglisse@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      25b2ec5b
  5. 07 1月, 2011 1 次提交
  6. 06 1月, 2011 1 次提交
  7. 22 12月, 2010 1 次提交
  8. 09 11月, 2010 1 次提交
  9. 06 10月, 2010 1 次提交
    • A
      drm/radeon/kms: enable writeback (v2) · 724c80e1
      Alex Deucher 提交于
      When writeback is enabled, the GPU shadows writes to certain
      registers into a buffer in memory.  The driver can then read
      the values from the shadow rather than reading back from the
      register across the bus.  Writeback can be disabled by setting
      the no_wb module param to 1.
      
      On r6xx/r7xx/evergreen, the following registers are shadowed:
      - CP scratch registers
      - CP read pointer
      - IH write pointer
      On r1xx-rr5xx, the following registers are shadowed:
      - CP scratch registers
      - CP read pointer
      
      v2:
      - Combine wb patches for r6xx-evergreen and r1xx-r5xx
      - Writeback is disabled on AGP boards since it tends to be
      unreliable on AGP using the gart.
      - Check radeon_wb_init return values properly.
      Signed-off-by: NAlex Deucher <alexdeucher@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      724c80e1
  10. 02 8月, 2010 2 次提交
    • D
      drm/radeon: add basic zmask/hiz support (v4) · ab9e1f59
      Dave Airlie 提交于
      This interface allows userspace to request hyperz support, it probably
      needs more locking, and really reporting that you can have hyperz is racy
      since someone else might get it before you do.
      
      v2: modify so we pass 0 valued packets to let DDX/r300c keep working.
      also fixed incorrect 0x4f1c reference.
      
      v3: fixup zb_bw_cntl so older drivers keep working
      
      v4: add locking, fixup SC_HYPERZ_EN - patch stream to disable hiz
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      ab9e1f59
    • D
      drm/radeon/kms: check/restore sanity before doing anything else with GPU. · 4c712e6c
      Dave Airlie 提交于
      On systems using kexec, the new kernel is booted straight from the old kernel, without any warning to the graphics driver. So the GPU is basically left as-is in a running state, however the CPU side is completly reset.
      
      Without stating the saneness of anyone using kexec on live systems, we should at least try not to crash the GPU. This patch resets 3 registers to 0 that could cause bad things to happen to the running system.
      
      This allows kexec to work on a Power6/RN50 system.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      4c712e6c
  11. 20 7月, 2010 1 次提交
  12. 16 7月, 2010 1 次提交
    • A
      drm/radeon/kms: fix gtt MC base alignment on rs4xx/rs690/rs740 asics · 8d369bb1
      Alex Deucher 提交于
      The asics in question have the following requirements with regard to
      their gart setups:
      
      1. The GART aperture size has to be in the form of 2^X bytes, where X is from 25 to 31
      2. The GART aperture MC base has to be aligned to a boundary equal to the size of the
      aperture.
      3. The GART page table has to be aligned to the boundary equal to the size of the table.
      4. The GART page table size is: table_entry_size * (aperture_size / page_size)
      5. The GART page table has to be allocated in non-paged, non-cached, contiguous system
      memory.
      
      This patch takes care 2.  The rest should already be handled properly.
      
      This fixes a regression noticed by: Torsten Kaiser <just.for.lkml@googlemail.com>
      Tested-by: NTorsten Kaiser <just.for.lkml@googlemail.com>
      Signed-off-by: NAlex Deucher <alexdeucher@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      8d369bb1
  13. 01 7月, 2010 1 次提交
  14. 18 5月, 2010 1 次提交
    • A
      drm/radeon/kms/pm: rework power management · ce8f5370
      Alex Deucher 提交于
      - Separate dynpm and profile based power management methods.  You can select the pm method
        by echoing the selected method ("dynpm" or "profile") to power_method in sysfs.
      - Expose basic 4 profile in profile method
        "default" - default clocks
        "auto" - select between low and high based on ac/dc state
        "low" - DC, low power mode
        "high" - AC, performance mode
        The current base profile is "default", but it should switched to "auto" once we've tested
        on more systems.  Switching the state is a matter of echoing the requested profile to
        power_profile in sysfs.  The lowest power states are selected automatically when dpms turns
        the monitors off in all states but default.
      - Remove dynamic fence-based reclocking for the moment.  We can revisit this later once we
        have basic pm in.
      - Move pm init/fini to modesetting path.  pm is tightly coupled with display state.  Make sure
        display side is initialized before pm.
      - Add pm suspend/resume functions to make sure pm state is properly reinitialized on resume.
      - Remove dynpm module option.  It's now selectable via sysfs.
      Signed-off-by: NAlex Deucher <alexdeucher@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      ce8f5370
  15. 28 4月, 2010 1 次提交
  16. 27 4月, 2010 1 次提交
    • J
      drm/radeon/kms: R3XX-R4XX fix GPU reset code · a1e9ada3
      Jerome Glisse 提交于
      Previous reset code leaded to computer hard lockup (need to unplug
      the power too reboot the computer) on various configuration. This
      patch change the reset code to avoid hard lockup. The GPU reset
      is failing most of the time but at least user can log in remotely
      or properly shutdown the computer.
      
      Two issues were leading to hard lockup :
      - Writting to the scratch register lead to hard lockup most likely
      because the write back mecanism is in fuzy state after GPU lockup.
      - Resetting the GPU memory controller and not reinitializing it
      after leaded to hard lockup. We did only reinitialize in case of
      successfull reset thus unsuccessfull reset quickly leaded to hard
      lockup.
      Signed-off-by: NJerome Glisse <jglisse@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      a1e9ada3
  17. 23 4月, 2010 1 次提交
  18. 19 4月, 2010 1 次提交
  19. 06 4月, 2010 4 次提交
    • J
      drm/radeon/kms: simplify & improve GPU reset V2 · 90aca4d2
      Jerome Glisse 提交于
      This simplify and improve GPU reset for R1XX-R6XX hw, it's
      not 100% reliable here are result:
      - R1XX/R2XX works bunch of time in a row, sometimes it
        seems it can work indifinitly
      - R3XX/R3XX the most unreliable one, sometimes you will be
        able to reset few times, sometimes not even once
      - R5XX more reliable than previous hw, seems to work most
        of the times but once in a while it fails for no obvious
        reasons (same status than previous reset just no same
        happy ending)
      - R6XX/R7XX are lot more reliable with this patch, still
        it seems that it can fail after a bunch (reset every
        2sec for 3hour bring down the GPU & computer)
      
      This have been tested on various hw, for some odd reasons
      i wasn't able to lockup RS480/RS690 (while they use to
      love locking up).
      
      Note that on R1XX-R5XX the cursor will disapear after
      lockup haven't checked why, switch to console and back
      to X will restore cursor.
      
      Next step is to record the bogus command that leaded to
      the lockup.
      
      V2 Fix r6xx resume path to avoid reinitializing blit
      module, use the gpu_lockup boolean to avoid entering
      inifinite waiting loop on fence while reiniting the GPU
      Signed-off-by: NJerome Glisse <jglisse@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      90aca4d2
    • J
      drm/radeon/kms: rename gpu_reset to asic_reset · a2d07b74
      Jerome Glisse 提交于
      Patch rename gpu_reset to asic_reset in prevision of having
      gpu_reset doing more stuff than just basic asic reset.
      Signed-off-by: NJerome Glisse <jglisse@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      a2d07b74
    • J
      drm/radeon/kms: fence cleanup + more reliable GPU lockup detection V4 · 225758d8
      Jerome Glisse 提交于
      This patch cleanup the fence code, it drops the timeout field of
      fence as the time to complete each IB is unpredictable and shouldn't
      be bound.
      
      The fence cleanup lead to GPU lockup detection improvement, this
      patch introduce a callback, allowing to do asic specific test for
      lockup detection. In this patch the CP is use as a first indicator
      of GPU lockup. If CP doesn't make progress during 1second we assume
      we are facing a GPU lockup.
      
      To avoid overhead of testing GPU lockup frequently due to fence
      taking time to be signaled we query the lockup callback every
      500msec. There is plenty code comment explaining the design & choise
      inside the code.
      
      This have been tested mostly on R3XX/R5XX hw, in normal running
      destkop (compiz firefox, quake3 running) the lockup callback wasn't
      call once (1 hour session). Also tested with forcing GPU lockup and
      lockup was reported after the 1s CP activity timeout.
      
      V2 switch to 500ms timeout so GPU lockup get call at least 2 times
         in less than 2sec.
      V3 store last jiffies in fence struct so on ERESTART, EBUSY we keep
         track of how long we already wait for a given fence
      V4 make sure we got up to date cp read pointer so we don't have
         false positive
      Signed-off-by: NJerome Glisse <jglisse@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      225758d8
    • M
      drm/radeon: R300 AD only has one quad pipe. · 57b54ea6
      Michel Dänzer 提交于
      Gleaned from the Mesa code.
      
      Fixes https://bugs.freedesktop.org/show_bug.cgi?id=27355 .
      Signed-off-by: NMichel Dänzer <daenzer@vmware.com>
      Cc: stable@kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      57b54ea6
  20. 31 3月, 2010 3 次提交
  21. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  22. 15 3月, 2010 1 次提交
  23. 25 2月, 2010 1 次提交
  24. 23 2月, 2010 2 次提交
  25. 18 2月, 2010 2 次提交
    • J
      drm/radeon/kms: simplify memory controller setup V2 · d594e46a
      Jerome Glisse 提交于
      Get rid of _location and use _start/_end also simplify the
      computation of vram_start|end & gtt_start|end. For R1XX-R2XX
      we place VRAM at the same address of PCI aperture, those GPU
      shouldn't have much memory and seems to behave better when
      setup that way. For R3XX and newer we place VRAM at 0. For
      R6XX-R7XX AGP we place VRAM before or after AGP aperture this
      might limit to limit the VRAM size but it's very unlikely.
      For IGP we don't change the VRAM placement.
      
      Tested on (compiz,quake3,suspend/resume):
      PCI/PCIE:RV280,R420,RV515,RV570,RV610,RV710
      AGP:RV100,RV280,R420,RV350,RV620(RPB*),RV730
      IGP:RS480(RPB*),RS690,RS780(RPB*),RS880
      
      RPB: resume previously broken
      
      V2 correct commit message to reflect more accurately the bug
      and move VRAM placement to 0 for most of the GPU to avoid
      limiting VRAM.
      Signed-off-by: NJerome Glisse <jglisse@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      d594e46a
    • P
      drm/radeon: Add asic hook for dma copy to r200 cards. · 44ca7478
      Pauli Nieminen 提交于
      r200 cards have dma engine which can be used to tranfer data
      between vram and system memory.
      
      r300 dma engine registers match r200 dma engine. Enabling
      dma copy for r200 is simple as hooking r200 asic to already
      existing function r300_copy_dma.
      
      Rename r300_dma_copy to r200_dma_copyto reflect that supports
      starts from r200 cards.
      
      v2: Created a new asic object for r200 cards.
      Signed-off-by: NPauli Nieminen <suokkos@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      44ca7478
  26. 11 2月, 2010 1 次提交
  27. 09 2月, 2010 2 次提交
  28. 05 2月, 2010 2 次提交