~ubuntu-branches/ubuntu/lucid/linux-mvl-dove/lucid-proposed

« back to all changes in this revision

Viewing changes to drivers/gpu/drm/radeon/rs600.c

  • Committer: Bazaar Package Importer
  • Author(s): Andy Whitcroft, Andy Whitcroft, Eric Miao, Saeed Bishara, Tony Lindgren, Upstream Kernel Changes, Ubuntu: 2.6.32-16.24, Ubuntu: 2.6.32-16.23, Ubuntu: 2.6.32-15.22, Ubuntu: 2.6.32-15.21, Ubuntu: 2.6.32-14.20
  • Date: 2010-03-08 15:26:14 UTC
  • Revision ID: james.westby@ubuntu.com-20100308152614-wawwjda2b5xh0qth
Tags: 2.6.32-202.12
[ Andy Whitcroft ]

* rebase to Ubuntu-2.6.32-16.24
* [Config] updateconfigs following rebase to Ubuntu-2.6.32-16.24
* [Config] updateconfigs following rebase to Ubuntu-2.6.32-16.24
* lintian -- update debhelper package version dependancy
* lintian -- fix ghostscript dependancy
* lintian -- add required misc:Depends
* rename the debug packages to match archive standard
  - LP: #527837

[ Eric Miao ]

* SAUCE: dove: disable conflicting v6 cache fns in zImage head.S
* [Config]: CONFIG_KEXEC=y and CONFIG_ATAGS_PROC=y
* [Config]: update configs for latest Marvell patchset
* [Config]: disable OABI_COMPAT
  - LP: #534277

[ Saeed Bishara ]

* SAUCE: arm: invalidate TLBs when enabling mmu
* SAUCE: arm: disable L2 cache in the v7 finish function

[ Tony Lindgren ]

* SAUCE: arm: Fix init_atags_procfs() to check tag->hdr.size

[ Upstream Kernel Changes ]

* Revert "printk: remove unused code from kernel/printk.c"
* Revert "Save thread registers in coredumps" Because this patch is
  already in the kernel.
* Revert "dove: enable cpu mode (v6/v7) in run-time detection"
* Revert "ARM: provide the cpu_match function to PJ4"
* Revert "ARM: introduce the cpu_match function to the proc_info"
* ARM: 5884/1: arm: Fix DCC console for v7
* ARM: 5885/1: arm: Flush TLB entries in setup_mm_for_reboot()
* ARM: 5886/1: arm: Fix cpu_proc_fin() for proc-v7.S and make kexec work
* ARM: 5888/1: arm: Update comments in cacheflush.h and remove
  unnecessary V6 and V7 comments
* rt5630: fix codec->hw_read function
* mm: Check if any page in a pageblock is reserved before marking it
  MIGRATE_RESERVE
* Add build option to to set the default panic timeout.
* sched: Enable might_sleep before initializing drivers.
* Add code to prevent system calls from being restarted muliple times
  before returning from the kernel.
* Save thread registers in coredumps
* armv6 dcc tty driver
* PM: Add wake lock api.
* PM: Add early suspend api.
* PM: Implement wakelock api.
* PM: Implement early suspend api
* PM: Add user-space wake lock api.
* PM: wakelock: Abort task freezing if a wake lock is held.
* PM: earlysuspend: Add console switch when user requested sleep state
  changes.
* PM: earlysuspend: Removing dependence on console.
* rtc: Add android alarm driver.
* rtc: Try to prevent RTC errors from accumulating.
* switch: switch class and GPIO drivers.
* pmem: Add pmem driver
* Add android_aid.h
* ashmem for 2.6.27.
* Add missing conflict codes for 0079-ashmem-for-2.6.27.patch
* Paranoid network.
* net: socket ioctl to reset connections matching local address
* sysfs_net_ipv4: Add sysfs-based knobs for controlling TCP window size
* uidstat: Adding uid stat driver to collect network statistics.
* adding conflict patch codes for
  0083-uidstat-Adding-uid-stat-driver-to-collect-network-s.patch
* FAT: Add new ioctl VFAT_IOCTL_GET_VOLUME_ID for reading the volume ID.
* Grants system server access to /proc/<pid>/oom_adj for Android
  applications.
* Input: Generic GPIO Input device.
* add missing conflict code for
  0086-Input-Generic-GPIO-Input-device.patch
* Input: Hold wake lock while event queue is not empty.
* Input: Use monotonic time for event time stamps.
* Input: synaptics_i2c_rmi: Driver for Synaptics Touchscreens using RMI
  over I2C.
* input: Add keyreset driver.
* mmc: Add status IRQ and status callback function to mmc platform data
* mmc: sd: Add new CONFIG_MMC_PARANOID_SD_INIT for enabling retries
  during SD detection
* mmc: Add concept of an 'embedded' SDIO device.
* trout: Add functions for WiFi
* mmc: Add new API call 'sdio_reset_comm' for resetting communication
  with an SDIO device
* mmc: sd: When resuming, try a little harder to init the card
* mmc: mmcblk: Add new feature 'CONFIG_MMC_BLOCK_PARANOID_RESUME'
* mmc: sd: Add retries in re-detection
* android_usb: Composite USB gadget driver for android.
* rfkill: Introduce CONFIG_RFKILL_PM and use instead of CONFIG_PM to
  power down
* tiwlan: Add abstract wifi control functions support
* android: Add android config documentation to boot framework.
* block: block_dump: Add number of sectors to debug output
* fs: block_dump: Don't display inode changes if block_dump < 2
* regenerated code for
  0107-mmc-core-Hold-a-wake-lock-accross-delayed-work-m.patch
* mmc: sd: Remove debugging printk
* printk: Fix log_buf_copy termination.
* kernel_debugger_core: add interrupt-context debugger core
* kernel_debugger_core: Add sysrq command.
* pmem: Add include sched.h to fix compile errors
* net: Fix compilation of the IPv6 module
* ashmem: Don't install fault handler for private mmaps.
* ashmem: Add common prefix to name reported in /proc/pid/maps
* net: add PPP on L2TP Access Concentrator (PPPoLAC) driver.
* cgroup: Add generic cgroup subsystem permission checks.
* add missing conflict codes for
  0124-cgroup-Add-generic-cgroup-subsystem-permission-chec.patch
* nohz: Fix ondemand governor not always ramping up on 100% load.
* usb: gadget: android: Allow usb charging to draw up to 500mA instead of
  250.
* regnerate patch for
  0127-futex-Restore-one-of-the-fast-paths-eliminated-by-3.patch
* Optionally flush entire dcache from v6_dma_flush_range
* net: add PPP on PPTP Network Server (PPPoPNS) driver.
* sdio: fix sdio_reset_comm() error path
* net: Fix a bitmask in PPPoPNS and rename constants in PPPoPNS and
  PPPoLAC.
* net: Fix a potential deadlock while releasing PPPoLAC/PPPoPNS socket.
* ashmem: don't require a page aligned size
* security: Add AID_NET_RAW and AID_NET_ADMIN capability check in
  cap_capable().
* net: Replace AID_NET_RAW checks with capable(CAP_NET_RAW).
* net: Force PPPoLAC and PPPoPNS to bind an interface before creating PPP
  channel.
* Add default configuration for Android
* Sync with the newest dove_defconfig
* Turn off TLS feature for android in v7
* Fix compiling error for lowmemorykiller
* Fix Compiling error for shmem
* Temporary disable pm_suspend call.
* Fix crash error for shmem
* Fix met compiling errors from 2.6.31 kernel to 2.6.32 kernel.
* Sync up with 2.6.32.2's dove_defconfig
* cesa: add address decoding windows initialization code
* Refine comments and algorithm for easier to understand LCD's HW RGB
  format.
* PM: runtime support for V6 or V7 mode
* Remove all Z0 specific code
* dove: remove remaning Z0 stuff
* Add auto-calibration
* fix compilation error (kernel/power/Makefile)
* update dove_avng_y1_defconfig
* dovefb: clean up CONFIG_DOVEFB_SINGLE_DISPLAY_ACCURATE_PCLK
* 1. fill initial data for dcon. 2. refine backlight driver interface.
* 1. add clock disable and enable interface 2. refine changing LCD source
  clock implementation.
* Fill backlight driver platform data
* 1. apply Tawfik's patch to hook fb_blank event. 2. add LCD power on and
  off interface.
* Refine backlight interface more portable
* 1. Refine dcon power management feature 2. Implement sysfs interfaces.
* 1. Fix blank function setting to wrong mode when suspend. 2. Add SRAM
  power down interface.
* remove compiling warning.
* dove: remove another DOVE_REV_Z0 stuff
* dove: sync dove_defconfig with latest patches
* dove: fix compilation warning in pm.c
* Adds ADI9889 HDMI transmitter support
* Dove: Add Video Plug support
* MPP changes for Dove -
* Swap R&B for Video plug on video overlay Unclear why this is required,
  but it solves color bitmapping. Keep now for Video plug but requires
  more research
* 1. Remove testing code. 2. disable dumb interface as well when receives
  FB_BLANK.
* Dove nand: add support for Two CS for the DB board
* Dove nand: Add support for "cmdlinepart" option Add support for
  "cmdlinepart" option in kernel command line dove-nand should be used as
  the NAND HAL device name. example: mtdparts=dove-nand:1g(swap),-(root)
* dove: use dove_cesa_addr_dec_data instead of dove_eth_addr_dec_data for
  cesa driver
* dovefb: fix compilation error when mv_spi is disabled
* Dove: remove gpu_size, vmeta_size and pvt_size kernel command line
  parameters from code as they have no effect because fixup function is
  called before parse_cmdline function ( see arch/arm/kernel/setup.c )
* VMeta PM func: 1. Power on the VMeta only when VMeta was been used 2.
  Support suspend/resume when VMeta was been used (also need user space
  player support)
* Add a watch dog timer for Vmeta suspend/resume func
* Dove NAND: fix double byte command on writing small pages
* Change Vmeta PM clock control to using Linux clock framework
* Disable the Vmtea clock/power as default
* Fix MMC/SD cannot be detected issue due to merge upgraded from .31 to
  .32 Signed-off-by: Steve Guo <steve.guo@marvell.com>
* dove: disable some andriod features
* dove: fix crash in shmem
* PM: Debugger Reset Workaround in Deep-Idle
* dove: increase BOOT_PARAMS_SIZE for dram params
* Add support for AV-D1 X0 board and modify ADI9889 driver to fit Linux
  coding style
* remove android config from dove_defconfig
* update dove_avng_y1_defconfig
* Fixed AC97 read error issue. Modified SOC sound control items.
* update dove_avng_x0_defconfig : Disable CONFIG_DOVE_DEBUGGER_MODE_V6
* dove: enable UBIFS extended features and advanced compression
* crypt: update ocf to latest release
* dove: enable kexec support
* sound: rt5623 codec: deprecate hw_read and fix driver name
* dove: use updated i2s codec name
* dove: fix dai structure for avengers boards.
* dove: delete the i2c-dummy.c driver which is not used by any system
* sound: rename cs42l51 codec i2c driver from i2s_i2c to cs42l51
* sound: change rt5630 name from i2s_i2c to rt5630
* dove: configure pm mpps for new revision of avengers board
* dove: change power button code to KEY_SLEEP
* Add more resolution support in kernel driver according VGA timing spec
* LCD: disabled CONFIG_DOVEFB_SINGLE_DISPLAY_ACCURATE_PCLK and instead
  disabled accurate clock option in runtime if both LCD units are
  enabled; this will enable using the same uImage for dual and non-dual
  mode.
* 1. fill initial data for dcon. 2. refine backlight driver interface.
* dove: cleanup gpu_size kernel parameter
* pcie - add option to disable scan by command line parameter
* PM: add FB notifier to manage Book/Deep-Idle toggeling
* ARM: Ensure ARMv6/7 mm files are built using appropriate assembler
  options
* kirkwood: fix compilation errors
* dove: disable highmem and enable CONFIG_VMSPLIT_2G
* dove: set SKB_HEADROOM to 32 instead of 16
* bmm: export outer_cache
* dove: add missing pj4 name entries
* Fix thread stack overflow caused by Dove NAND HAL driver
* Remove unused include file and declaration
* Roll back wait for vsync mechanism to wait_event_interruptable_timeout
  and give timeout delay from 40ms to 4ms.
* dovefb: remove another DOVE_REV_Z0 stuff
* mv643xx_eth: don't include cache padding in rx desc buffer size
* fix build error introduced by add missing conflict codes for
  0124-cgroup-Add-generic-cgroup-subsystem-permission-chec.patch
* crypto: add openssl patch for user space to utilize the cesa engine
* crypto: update openswan patch for version 2.6.24
* dove: add device driver for the GPU gc600 engine
* Marvell Buffer Management Module for VPU & GPU memory buffer maintain
* BMM: split VPU & GPU to choice use BMM or not
* dove: enable building the bmm driver as module
* cesa: remove patch for openswan version 2.6.18
* Configure new LCD register for upcoming DOVE A0 Chip
* fix pixclk when under interlaced mode
* Not to power off LCD SRAM when system blanks screen.
* dvs: make dvs_enable variable depend on board, and change the default
  to enable instead of disable on Dove DB board.

[ Ubuntu: 2.6.32-16.24 ]

* armel -- perf userspace does not support arm
* ia64 -- libelf-dev/binutils-dev to not provide necessary libraries

[ Ubuntu: 2.6.32-16.23 ]

* SAUCE: PM report driver and device suspend/resume times -- move config
* update to standards version 3.8.4.0
* printenv -- expose all of the package selectors
* source package -- cleanup source content control
* doc package -- ensure we do build package content on buildd
* lintian -- correct the address in the debian/copyright
* lintian -- update debhelper package version dependancy
* lintian -- fix ghostscript dependancy
* lintian -- add required misc:Depends
* lintian -- move our debhelper compat level to debian/compat
* perf -- build the kernel carried tools
* perf -- add linux-tools carrying the version switches and manuals
* SAUCE: fix up Kconfig for staging drivers
* [Config] enable NOUVEAU etc following drm backport
* update DRM to mainline v2.6.33
* [Config] Remove AppArmor config options that no longer exist (ports)
* [Config] updateportsconfigs following drm update
* ubuntu: AppArmor -- update to mainline 2010-03-04
* SAUCE: AppArmor: Reintroduce AppArmor 2.4 compatibility
* SAUCE: AppArmor: replace strim with strstrip for 2.6.32 kernels
* [Config] Remove AppArmor config options that no longer exist
* ubuntu: rtl8192se -- version 2010-0115,0014
  - LP: #530275
* [Config] added CONFIG_RTL8192SE module.
  - LP: #530275
* [Config] Added vmw_pvscsi to d-i/scsi-modules
  - LP: #531017
* [Upstream] netfilter: xt_recent: Add an entry reaper
* Revert "KVM: x86 emulator: Check CPL level during privilege instruction
  emulation"
* Revert "KVM: x86 emulator: Fix popf emulation"
* Revert "KVM: x86 emulator: Check IOPL level during io instruction
  emulation"
* Revert "KVM: x86 emulator: Add Virtual-8086 mode of emulation"
* Revert "KVM: fix memory access during x86 emulation."
* Add vlan (8021.Q) module package for d-i.
* (pre-stable) drm/i915: blacklist lid status: Sony VGN-BX196VP, Dell
  Inspiron 700m
  - LP: #515246
* [Upstream] docbook: need xmldoclinks for all doc types
* x86: set_personality_ia32() misses force_personality32
* lib: Introduce generic list_sort function
* drm/nv50: Implement ctxprog/state generation.
* drm/nv50: Remove redundant/incorrect ctxvals initialisation.
* (pre-stable) drm/i915: blacklist lid status: Sony VGN-BX196VP, Dell
  Inspiron 700m
  - LP: #515246

[ Ubuntu: 2.6.32-15.22 ]

* Revert "[Config] added new config option CONFIG_SR_REPORT_TIME_LIMIT"
* Revert "SAUCE: PM report driver and device suspend/resume times."
* [Config] set CONFIG_SR_REPORT_TIME_LIMIT
* SAUCE: PM report driver and device suspend/resume times.

[ Ubuntu: 2.6.32-15.21 ]

* Revert "(pre-stable) drm/i915: Increase fb alignment to 64k"
* Revert "[Config] lenovo-sl-laptop -- enable"
* Revert "ubuntu: lenovo-sl-laptop -- git tip (b19a08f81f)"
* armel -- cramfs module will no longer be built
* d-i -- make all modules optional
* rename the debug packages to match archive standard
  - LP: #527837
* lenovo-sl-laptop is no longer built
* Disable 4MB page tables for Atom, work around errata AAE44
  - LP: #523112
* ubuntu: dm-raid4-5: Depend on XOR_BLOCKS
* ubuntu: fsam7400: Depend on CHECK_SIGNATURE
* SAUCE: drm/i915: don't change DRM configuration when releasing load
  detect pipe
  - LP: #488328
* [Config] armel Update versatile initrd configs
  - LP: #524893
* SAUCE: [um] Don't use nx_enabled under UML
  - LP: #524849
* [Config] added new config option CONFIG_SR_REPORT_TIME_LIMIT
* SAUCE: v3 - Add Dell Business Class Netbook LED driver
* SAUCE: PM report driver and device suspend/resume times.
* Revert "[Upstream] e1000e: enhance frame fragment detection"
  - CVE-2009-4538
* Revert "[Upstream] e1000: enhance frame fragment detection"
  - CVE-2009-4536
* [Config] Enabled CONFIG_LEDS_DELL_NETBOOKS=m
* SAUCE: (pre-stable) netfilter: xt_recent: fix buffer overflow
* SAUCE: (pre-stable) netfilter: xt_recent: fix false match
* Revert "(pre-stable) eCryptfs: Add getattr function"
* Fix potential crash with sys_move_pages
* futex_lock_pi() key refcnt fix
* futex: Handle user space corruption gracefully
* futex: Handle futex value corruption gracefully
* Fix race in tty_fasync() properly
* hwmon: (w83781d) Request I/O ports individually for probing
* hwmon: (lm78) Request I/O ports individually for probing
* hwmon: (adt7462) Wrong ADT7462_VOLT_COUNT
* ALSA: ctxfi - fix PTP address initialization
* drm/i915: disable hotplug detect before Ironlake CRT detect
* drm/i915: enable self-refresh on 965
* drm/i915: Disable SR when more than one pipe is enabled
* drm/i915: Fix DDC on some systems by clearing BIOS GMBUS setup.
* drm/i915: Add HP nx9020/SamsungSX20S to ACPI LID quirk list
* drm/i915: Fix the incorrect DMI string for Samsung SX20S laptop
* drm/i915: Add MALATA PC-81005 to ACPI LID quirk list
* usb: r8a66597-hcd: Flush the D-cache for the pipe-in transfer buffers.
* i2c-tiny-usb: Fix on big-endian systems
* drm/i915: handle FBC and self-refresh better
* drm/i915: Increase fb alignment to 64k
* drm/i915: Update write_domains on active list after flush.
* regulator: Fix display of null constraints for regulators
* ALSA: hda-intel: Avoid divide by zero crash
* CPUFREQ: Fix use after free of struct powernow_k8_data
* freeze_bdev: don't deactivate successfully frozen MS_RDONLY sb
* cciss: Make cciss_seq_show handle holes in the h->drv[] array
* ioat: fix infinite timeout checking in ioat2_quiesce
* resource: add helpers for fetching rlimits
* fs/exec.c: restrict initial stack space expansion to rlimit
* cifs: fix length calculation for converted unicode readdir names
* NFS: Fix a reference leak in nfs_wb_cancel_page()
* NFS: Try to commit unstable writes in nfs_release_page()
* NFSv4: Don't allow posix locking against servers that don't support it
* NFSv4: Ensure that the NFSv4 locking can recover from stateid errors
* NFS: Fix an Oops when truncating a file
* NFS: Fix a umount race
* NFS: Fix a bug in nfs_fscache_release_page()
* NFS: Fix the mapping of the NFSERR_SERVERFAULT error
* md: fix 'degraded' calculation when starting a reshape.
* V4L/DVB: dvb-core: fix initialization of feeds list in demux filter
* Export the symbol of getboottime and mmonotonic_to_bootbased
* kvmclock: count total_sleep_time when updating guest clock
* KVM: PIT: control word is write-only
* tpm_infineon: fix suspend/resume handler for pnp_driver
* amd64_edac: Do not falsely trigger kerneloops
* netfilter: nf_conntrack: fix memory corruption with multiple namespaces
* netfilter: nf_conntrack: per netns nf_conntrack_cachep
* netfilter: nf_conntrack: restrict runtime expect hashsize modifications
* netfilter: xtables: compat out of scope fix
* netfilter: nf_conntrack: fix hash resizing with namespaces
* drm/i915: remove full registers dump debug
* drm/i915: add i915_lp_ring_sync helper
* drm/i915: Don't wait interruptible for possible plane buffer flush
* dasd: remove strings from s390dbf
* crypto: padlock-sha - Add import/export support
* wmi: Free the allocated acpi objects through wmi_get_event_data
* dell-wmi, hp-wmi, msi-wmi: check wmi_get_event_data() return value
* /dev/mem: introduce size_inside_page()
* devmem: check vmalloc address on kmem read/write
* devmem: fix kmem write bug on memory holes
* SCSI: mptfusion : mptscsih_abort return value should be SUCCESS instead
  of value 0.
* sh: Couple kernel and user write page perm bits for CONFIG_X2TLB
* ALSA: hda - use WARN_ON_ONCE() for zero-division detection
* dst: call cond_resched() in dst_gc_task()
* ALSA: hda - Improved MacBook (Pro) 5,1 / 5,2 support
* befs: fix leak
* rtc-fm3130: add missing braces
* Call flush_dcache_page after PIO data transfers in libata-sff.c
* ahci: add Acer G725 to broken suspend list
* pktgen: Fix freezing problem
* x86/amd-iommu: Fix IOMMU-API initialization for iommu=pt
* x86/amd-iommu: Fix deassignment of a device from the pt_domain
* x86: Re-get cfg_new in case reuse/move irq_desc
* Staging: fix rtl8187se compilation errors with mac80211
* ALSA: usb-audio - Avoid Oops after disconnect
* serial: 8250: add serial transmitter fully empty test
* sysfs: sysfs_sd_setattr set iattrs unconditionally
* class: Free the class private data in class_release
* USB: usbfs: only copy the actual data received
* USB: usbfs: properly clean up the as structure on error paths
* rtl8187: Add new device ID
* ACPI: Add NULL pointer check in acpi_bus_start
* ACPI: fix High cpu temperature with 2.6.32
* drm/radeon/kms: use udelay for short delays
* NFS: Too many GETATTR and ACCESS calls after direct I/O
* eCryptfs: Add getattr function
* b43: Fix throughput regression
* ath9k: Fix sequence numbers for PAE frames
* mac80211: Fix probe request filtering in IBSS mode
* iwlwifi: Fix to set correct ht configuration
* dm stripe: avoid divide by zero with invalid stripe count
* dm log: userspace fix overhead_size calcuations
* Linux 2.6.32.9
* sfc: Fix SFE4002 initialisation
* sfc: Fix sign of efx_mcdi_poll_reboot() error in efx_mcdi_poll()
* sfc: SFE4002/SFN4112F: Widen temperature and voltage tolerances
* (pre-stable) HID: handle joysticks with large number of buttons
  - LP: #492056
* (pre-stable) HID: extend mask for BUTTON usage page
  - LP: #492056
* PM: Measure device suspend and resume times
* e1000: enhance frame fragment detection
  - CVE-2009-4536
* e1000e: enhance frame fragment detection
  - CVE-2009-4538
* KVM: fix memory access during x86 emulation.
  - CVE-2010-0306
* KVM: x86 emulator: Add Virtual-8086 mode of emulation
  - CVE-2010-0306
* KVM: x86 emulator: Check IOPL level during io instruction emulation
  - CVE-2010-0306
* KVM: x86 emulator: Fix popf emulation
  - CVE-2010-0306
* KVM: x86 emulator: Check CPL level during privilege instruction
  emulation
  - CVE-2010-0306
* Input: wacom - ensure the device is initialized properly upon resume
* Input: wacom - add defines for packet lengths of various devices
* Input: wacom - add support for new LCD tablets
  - LP: #516777

[ Ubuntu: 2.6.32-14.20 ]

* rebuild following the GCC update to match compiler for out of tree modules
* Revert "[Config] drbd -- enable"
* Revert "ubuntu: drbd -- version 8.3.1"
* SAUCE: khubd -- switch USB product/manufacturer/serial handling to RCU
  - LP: #510937

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
void rs600_gpu_init(struct radeon_device *rdev);
46
46
int rs600_mc_wait_for_idle(struct radeon_device *rdev);
47
47
 
 
48
int rs600_mc_init(struct radeon_device *rdev)
 
49
{
 
50
        /* read back the MC value from the hw */
 
51
        int r;
 
52
        u32 tmp;
 
53
 
 
54
        /* Setup GPU memory space */
 
55
        tmp = RREG32_MC(R_000004_MC_FB_LOCATION);
 
56
        rdev->mc.vram_location = G_000004_MC_FB_START(tmp) << 16;
 
57
        rdev->mc.gtt_location = 0xffffffffUL;
 
58
        r = radeon_mc_setup(rdev);
 
59
        rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev);
 
60
        if (r)
 
61
                return r;
 
62
        return 0;
 
63
}
 
64
 
 
65
/* hpd for digital panel detect/disconnect */
 
66
bool rs600_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd)
 
67
{
 
68
        u32 tmp;
 
69
        bool connected = false;
 
70
 
 
71
        switch (hpd) {
 
72
        case RADEON_HPD_1:
 
73
                tmp = RREG32(R_007D04_DC_HOT_PLUG_DETECT1_INT_STATUS);
 
74
                if (G_007D04_DC_HOT_PLUG_DETECT1_SENSE(tmp))
 
75
                        connected = true;
 
76
                break;
 
77
        case RADEON_HPD_2:
 
78
                tmp = RREG32(R_007D14_DC_HOT_PLUG_DETECT2_INT_STATUS);
 
79
                if (G_007D14_DC_HOT_PLUG_DETECT2_SENSE(tmp))
 
80
                        connected = true;
 
81
                break;
 
82
        default:
 
83
                break;
 
84
        }
 
85
        return connected;
 
86
}
 
87
 
 
88
void rs600_hpd_set_polarity(struct radeon_device *rdev,
 
89
                            enum radeon_hpd_id hpd)
 
90
{
 
91
        u32 tmp;
 
92
        bool connected = rs600_hpd_sense(rdev, hpd);
 
93
 
 
94
        switch (hpd) {
 
95
        case RADEON_HPD_1:
 
96
                tmp = RREG32(R_007D08_DC_HOT_PLUG_DETECT1_INT_CONTROL);
 
97
                if (connected)
 
98
                        tmp &= ~S_007D08_DC_HOT_PLUG_DETECT1_INT_POLARITY(1);
 
99
                else
 
100
                        tmp |= S_007D08_DC_HOT_PLUG_DETECT1_INT_POLARITY(1);
 
101
                WREG32(R_007D08_DC_HOT_PLUG_DETECT1_INT_CONTROL, tmp);
 
102
                break;
 
103
        case RADEON_HPD_2:
 
104
                tmp = RREG32(R_007D18_DC_HOT_PLUG_DETECT2_INT_CONTROL);
 
105
                if (connected)
 
106
                        tmp &= ~S_007D18_DC_HOT_PLUG_DETECT2_INT_POLARITY(1);
 
107
                else
 
108
                        tmp |= S_007D18_DC_HOT_PLUG_DETECT2_INT_POLARITY(1);
 
109
                WREG32(R_007D18_DC_HOT_PLUG_DETECT2_INT_CONTROL, tmp);
 
110
                break;
 
111
        default:
 
112
                break;
 
113
        }
 
114
}
 
115
 
 
116
void rs600_hpd_init(struct radeon_device *rdev)
 
117
{
 
118
        struct drm_device *dev = rdev->ddev;
 
119
        struct drm_connector *connector;
 
120
 
 
121
        list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
 
122
                struct radeon_connector *radeon_connector = to_radeon_connector(connector);
 
123
                switch (radeon_connector->hpd.hpd) {
 
124
                case RADEON_HPD_1:
 
125
                        WREG32(R_007D00_DC_HOT_PLUG_DETECT1_CONTROL,
 
126
                               S_007D00_DC_HOT_PLUG_DETECT1_EN(1));
 
127
                        rdev->irq.hpd[0] = true;
 
128
                        break;
 
129
                case RADEON_HPD_2:
 
130
                        WREG32(R_007D10_DC_HOT_PLUG_DETECT2_CONTROL,
 
131
                               S_007D10_DC_HOT_PLUG_DETECT2_EN(1));
 
132
                        rdev->irq.hpd[1] = true;
 
133
                        break;
 
134
                default:
 
135
                        break;
 
136
                }
 
137
        }
 
138
        if (rdev->irq.installed)
 
139
                rs600_irq_set(rdev);
 
140
}
 
141
 
 
142
void rs600_hpd_fini(struct radeon_device *rdev)
 
143
{
 
144
        struct drm_device *dev = rdev->ddev;
 
145
        struct drm_connector *connector;
 
146
 
 
147
        list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
 
148
                struct radeon_connector *radeon_connector = to_radeon_connector(connector);
 
149
                switch (radeon_connector->hpd.hpd) {
 
150
                case RADEON_HPD_1:
 
151
                        WREG32(R_007D00_DC_HOT_PLUG_DETECT1_CONTROL,
 
152
                               S_007D00_DC_HOT_PLUG_DETECT1_EN(0));
 
153
                        rdev->irq.hpd[0] = false;
 
154
                        break;
 
155
                case RADEON_HPD_2:
 
156
                        WREG32(R_007D10_DC_HOT_PLUG_DETECT2_CONTROL,
 
157
                               S_007D10_DC_HOT_PLUG_DETECT2_EN(0));
 
158
                        rdev->irq.hpd[1] = false;
 
159
                        break;
 
160
                default:
 
161
                        break;
 
162
                }
 
163
        }
 
164
}
 
165
 
48
166
/*
49
167
 * GART.
50
168
 */
100
218
        WREG32(R_00004C_BUS_CNTL, tmp);
101
219
        /* FIXME: setup default page */
102
220
        WREG32_MC(R_000100_MC_PT0_CNTL,
103
 
                 (S_000100_EFFECTIVE_L2_CACHE_SIZE(6) |
104
 
                  S_000100_EFFECTIVE_L2_QUEUE_SIZE(6)));
 
221
                  (S_000100_EFFECTIVE_L2_CACHE_SIZE(6) |
 
222
                   S_000100_EFFECTIVE_L2_QUEUE_SIZE(6)));
 
223
 
105
224
        for (i = 0; i < 19; i++) {
106
225
                WREG32_MC(R_00016C_MC_PT0_CLIENT0_CNTL + i,
107
 
                        S_00016C_ENABLE_TRANSLATION_MODE_OVERRIDE(1) |
108
 
                        S_00016C_SYSTEM_ACCESS_MODE_MASK(
109
 
                                V_00016C_SYSTEM_ACCESS_MODE_IN_SYS) |
110
 
                        S_00016C_SYSTEM_APERTURE_UNMAPPED_ACCESS(
111
 
                                V_00016C_SYSTEM_APERTURE_UNMAPPED_DEFAULT_PAGE) |
112
 
                        S_00016C_EFFECTIVE_L1_CACHE_SIZE(1) |
113
 
                        S_00016C_ENABLE_FRAGMENT_PROCESSING(1) |
114
 
                        S_00016C_EFFECTIVE_L1_QUEUE_SIZE(1));
 
226
                          S_00016C_ENABLE_TRANSLATION_MODE_OVERRIDE(1) |
 
227
                          S_00016C_SYSTEM_ACCESS_MODE_MASK(
 
228
                                  V_00016C_SYSTEM_ACCESS_MODE_NOT_IN_SYS) |
 
229
                          S_00016C_SYSTEM_APERTURE_UNMAPPED_ACCESS(
 
230
                                  V_00016C_SYSTEM_APERTURE_UNMAPPED_PASSTHROUGH) |
 
231
                          S_00016C_EFFECTIVE_L1_CACHE_SIZE(3) |
 
232
                          S_00016C_ENABLE_FRAGMENT_PROCESSING(1) |
 
233
                          S_00016C_EFFECTIVE_L1_QUEUE_SIZE(3));
115
234
        }
116
 
 
117
 
        /* System context map to GART space */
118
 
        WREG32_MC(R_000112_MC_PT0_SYSTEM_APERTURE_LOW_ADDR, rdev->mc.gtt_start);
119
 
        WREG32_MC(R_000114_MC_PT0_SYSTEM_APERTURE_HIGH_ADDR, rdev->mc.gtt_end);
120
 
 
121
235
        /* enable first context */
122
 
        WREG32_MC(R_00013C_MC_PT0_CONTEXT0_FLAT_START_ADDR, rdev->mc.gtt_start);
123
 
        WREG32_MC(R_00014C_MC_PT0_CONTEXT0_FLAT_END_ADDR, rdev->mc.gtt_end);
124
236
        WREG32_MC(R_000102_MC_PT0_CONTEXT0_CNTL,
125
 
                        S_000102_ENABLE_PAGE_TABLE(1) |
126
 
                        S_000102_PAGE_TABLE_DEPTH(V_000102_PAGE_TABLE_FLAT));
 
237
                  S_000102_ENABLE_PAGE_TABLE(1) |
 
238
                  S_000102_PAGE_TABLE_DEPTH(V_000102_PAGE_TABLE_FLAT));
 
239
 
127
240
        /* disable all other contexts */
128
 
        for (i = 1; i < 8; i++) {
 
241
        for (i = 1; i < 8; i++)
129
242
                WREG32_MC(R_000102_MC_PT0_CONTEXT0_CNTL + i, 0);
130
 
        }
131
243
 
132
244
        /* setup the page table */
133
245
        WREG32_MC(R_00012C_MC_PT0_CONTEXT0_FLAT_BASE_ADDR,
134
 
                        rdev->gart.table_addr);
 
246
                  rdev->gart.table_addr);
 
247
        WREG32_MC(R_00013C_MC_PT0_CONTEXT0_FLAT_START_ADDR, rdev->mc.gtt_start);
 
248
        WREG32_MC(R_00014C_MC_PT0_CONTEXT0_FLAT_END_ADDR, rdev->mc.gtt_end);
135
249
        WREG32_MC(R_00011C_MC_PT0_CONTEXT0_DEFAULT_READ_ADDR, 0);
136
250
 
 
251
        /* System context maps to VRAM space */
 
252
        WREG32_MC(R_000112_MC_PT0_SYSTEM_APERTURE_LOW_ADDR, rdev->mc.vram_start);
 
253
        WREG32_MC(R_000114_MC_PT0_SYSTEM_APERTURE_HIGH_ADDR, rdev->mc.vram_end);
 
254
 
137
255
        /* enable page tables */
138
256
        tmp = RREG32_MC(R_000100_MC_PT0_CNTL);
139
257
        WREG32_MC(R_000100_MC_PT0_CNTL, (tmp | S_000100_ENABLE_PT(1)));
146
264
 
147
265
void rs600_gart_disable(struct radeon_device *rdev)
148
266
{
149
 
        uint32_t tmp;
 
267
        u32 tmp;
 
268
        int r;
150
269
 
151
270
        /* FIXME: disable out of gart access */
152
271
        WREG32_MC(R_000100_MC_PT0_CNTL, 0);
153
272
        tmp = RREG32_MC(R_000009_MC_CNTL1);
154
273
        WREG32_MC(R_000009_MC_CNTL1, tmp & C_000009_ENABLE_PAGE_TABLES);
155
274
        if (rdev->gart.table.vram.robj) {
156
 
                radeon_object_kunmap(rdev->gart.table.vram.robj);
157
 
                radeon_object_unpin(rdev->gart.table.vram.robj);
 
275
                r = radeon_bo_reserve(rdev->gart.table.vram.robj, false);
 
276
                if (r == 0) {
 
277
                        radeon_bo_kunmap(rdev->gart.table.vram.robj);
 
278
                        radeon_bo_unpin(rdev->gart.table.vram.robj);
 
279
                        radeon_bo_unreserve(rdev->gart.table.vram.robj);
 
280
                }
158
281
        }
159
282
}
160
283
 
189
312
{
190
313
        uint32_t tmp = 0;
191
314
        uint32_t mode_int = 0;
 
315
        u32 hpd1 = RREG32(R_007D08_DC_HOT_PLUG_DETECT1_INT_CONTROL) &
 
316
                ~S_007D08_DC_HOT_PLUG_DETECT1_INT_EN(1);
 
317
        u32 hpd2 = RREG32(R_007D18_DC_HOT_PLUG_DETECT2_INT_CONTROL) &
 
318
                ~S_007D18_DC_HOT_PLUG_DETECT2_INT_EN(1);
192
319
 
 
320
        if (!rdev->irq.installed) {
 
321
                WARN(1, "Can't enable IRQ/MSI because no handler is installed.\n");
 
322
                WREG32(R_000040_GEN_INT_CNTL, 0);
 
323
                return -EINVAL;
 
324
        }
193
325
        if (rdev->irq.sw_int) {
194
326
                tmp |= S_000040_SW_INT_EN(1);
195
327
        }
199
331
        if (rdev->irq.crtc_vblank_int[1]) {
200
332
                mode_int |= S_006540_D2MODE_VBLANK_INT_MASK(1);
201
333
        }
 
334
        if (rdev->irq.hpd[0]) {
 
335
                hpd1 |= S_007D08_DC_HOT_PLUG_DETECT1_INT_EN(1);
 
336
        }
 
337
        if (rdev->irq.hpd[1]) {
 
338
                hpd2 |= S_007D18_DC_HOT_PLUG_DETECT2_INT_EN(1);
 
339
        }
202
340
        WREG32(R_000040_GEN_INT_CNTL, tmp);
203
341
        WREG32(R_006540_DxMODE_INT_MASK, mode_int);
 
342
        WREG32(R_007D08_DC_HOT_PLUG_DETECT1_INT_CONTROL, hpd1);
 
343
        WREG32(R_007D18_DC_HOT_PLUG_DETECT2_INT_CONTROL, hpd2);
204
344
        return 0;
205
345
}
206
346
 
208
348
{
209
349
        uint32_t irqs = RREG32(R_000044_GEN_INT_STATUS);
210
350
        uint32_t irq_mask = ~C_000044_SW_INT;
 
351
        u32 tmp;
211
352
 
212
353
        if (G_000044_DISPLAY_INT_STAT(irqs)) {
213
354
                *r500_disp_int = RREG32(R_007EDC_DISP_INTERRUPT_STATUS);
219
360
                        WREG32(R_006D34_D2MODE_VBLANK_STATUS,
220
361
                                S_006D34_D2MODE_VBLANK_ACK(1));
221
362
                }
 
363
                if (G_007EDC_DC_HOT_PLUG_DETECT1_INTERRUPT(*r500_disp_int)) {
 
364
                        tmp = RREG32(R_007D08_DC_HOT_PLUG_DETECT1_INT_CONTROL);
 
365
                        tmp |= S_007D08_DC_HOT_PLUG_DETECT1_INT_ACK(1);
 
366
                        WREG32(R_007D08_DC_HOT_PLUG_DETECT1_INT_CONTROL, tmp);
 
367
                }
 
368
                if (G_007EDC_DC_HOT_PLUG_DETECT2_INTERRUPT(*r500_disp_int)) {
 
369
                        tmp = RREG32(R_007D18_DC_HOT_PLUG_DETECT2_INT_CONTROL);
 
370
                        tmp |= S_007D18_DC_HOT_PLUG_DETECT2_INT_ACK(1);
 
371
                        WREG32(R_007D18_DC_HOT_PLUG_DETECT2_INT_CONTROL, tmp);
 
372
                }
222
373
        } else {
223
374
                *r500_disp_int = 0;
224
375
        }
244
395
{
245
396
        uint32_t status, msi_rearm;
246
397
        uint32_t r500_disp_int;
 
398
        bool queue_hotplug = false;
247
399
 
248
400
        status = rs600_irq_ack(rdev, &r500_disp_int);
249
401
        if (!status && !r500_disp_int) {
251
403
        }
252
404
        while (status || r500_disp_int) {
253
405
                /* SW interrupt */
254
 
                if (G_000040_SW_INT_EN(status))
 
406
                if (G_000044_SW_INT(status))
255
407
                        radeon_fence_process(rdev);
256
408
                /* Vertical blank interrupts */
257
409
                if (G_007EDC_LB_D1_VBLANK_INTERRUPT(r500_disp_int))
258
410
                        drm_handle_vblank(rdev->ddev, 0);
259
411
                if (G_007EDC_LB_D2_VBLANK_INTERRUPT(r500_disp_int))
260
412
                        drm_handle_vblank(rdev->ddev, 1);
 
413
                if (G_007EDC_DC_HOT_PLUG_DETECT1_INTERRUPT(r500_disp_int)) {
 
414
                        queue_hotplug = true;
 
415
                        DRM_DEBUG("HPD1\n");
 
416
                }
 
417
                if (G_007EDC_DC_HOT_PLUG_DETECT2_INTERRUPT(r500_disp_int)) {
 
418
                        queue_hotplug = true;
 
419
                        DRM_DEBUG("HPD2\n");
 
420
                }
261
421
                status = rs600_irq_ack(rdev, &r500_disp_int);
262
422
        }
 
423
        if (queue_hotplug)
 
424
                queue_work(rdev->wq, &rdev->hotplug_work);
263
425
        if (rdev->msi_enabled) {
264
426
                switch (rdev->family) {
265
427
                case CHIP_RS600:
397
559
        if (r)
398
560
                return r;
399
561
        /* Enable IRQ */
400
 
        rdev->irq.sw_int = true;
401
562
        rs600_irq_set(rdev);
 
563
        rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL);
402
564
        /* 1M ring buffer */
403
565
        r = r100_cp_init(rdev, 1024 * 1024);
404
566
        if (r) {
432
594
        atom_asic_init(rdev->mode_info.atom_context);
433
595
        /* Resume clock after posting */
434
596
        rv515_clock_startup(rdev);
 
597
        /* Initialize surface registers */
 
598
        radeon_surface_init(rdev);
435
599
        return rs600_startup(rdev);
436
600
}
437
601
 
446
610
 
447
611
void rs600_fini(struct radeon_device *rdev)
448
612
{
449
 
        rs600_suspend(rdev);
450
613
        r100_cp_fini(rdev);
451
614
        r100_wb_fini(rdev);
452
615
        r100_ib_fini(rdev);
454
617
        rs600_gart_fini(rdev);
455
618
        radeon_irq_kms_fini(rdev);
456
619
        radeon_fence_driver_fini(rdev);
457
 
        radeon_object_fini(rdev);
 
620
        radeon_bo_fini(rdev);
458
621
        radeon_atombios_fini(rdev);
459
622
        kfree(rdev->bios);
460
623
        rdev->bios = NULL;
491
654
                        RREG32(R_0007C0_CP_STAT));
492
655
        }
493
656
        /* check if cards are posted or not */
494
 
        if (!radeon_card_posted(rdev) && rdev->bios) {
495
 
                DRM_INFO("GPU not posted. posting now...\n");
496
 
                atom_asic_init(rdev->mode_info.atom_context);
497
 
        }
 
657
        if (radeon_boot_test_post_card(rdev) == false)
 
658
                return -EINVAL;
 
659
 
498
660
        /* Initialize clocks */
499
661
        radeon_get_clock_info(rdev->ddev);
500
662
        /* Initialize power management */
502
664
        /* Get vram informations */
503
665
        rs600_vram_info(rdev);
504
666
        /* Initialize memory controller (also test AGP) */
505
 
        r = r420_mc_init(rdev);
 
667
        r = rs600_mc_init(rdev);
506
668
        if (r)
507
669
                return r;
508
670
        rs600_debugfs(rdev);
514
676
        if (r)
515
677
                return r;
516
678
        /* Memory manager */
517
 
        r = radeon_object_init(rdev);
 
679
        r = radeon_bo_init(rdev);
518
680
        if (r)
519
681
                return r;
520
682
        r = rs600_gart_init(rdev);
526
688
        if (r) {
527
689
                /* Somethings want wront with the accel init stop accel */
528
690
                dev_err(rdev->dev, "Disabling GPU acceleration\n");
529
 
                rs600_suspend(rdev);
530
691
                r100_cp_fini(rdev);
531
692
                r100_wb_fini(rdev);
532
693
                r100_ib_fini(rdev);