public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: stable-review@kernel.org, torvalds@linux-foundation.org,
	akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
	Alex Deucher <alexdeucher@gmail.com>,
	Dave Airlie <airlied@redhat.com>
Subject: [114/129] drm/radeon/kms: fix a regression on r7xx AGP due to the HDP flush fix
Date: Sat, 18 Sep 2010 12:13:32 -0700	[thread overview]
Message-ID: <20100918191307.081234318@clark.site> (raw)
In-Reply-To: <20100918191317.GA11386@kroah.com>

2.6.35-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Alex Deucher <alexdeucher@gmail.com>

commit 87cbf8f2c5d1b1fc4642c3dc0bb6efc587479603 upstream.

commit: 812d046915f48236657f02c06d7dc47140e9ceda
drm/radeon/kms/r7xx: add workaround for hw issue with HDP flush
breaks on AGP boards since there is no VRAM gart table.

This patch fixes the issue by creating a VRAM scratch page so that
can be used on both AGP and PCIE.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=29834

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/gpu/drm/radeon/r600.c   |    2 -
 drivers/gpu/drm/radeon/radeon.h |    6 ++++
 drivers/gpu/drm/radeon/rv770.c  |   52 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 59 insertions(+), 1 deletion(-)

--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -3526,7 +3526,7 @@ void r600_ioctl_wait_idle(struct radeon_
 	 * rather than write to HDP_REG_COHERENCY_FLUSH_CNTL
 	 */
 	if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740)) {
-		void __iomem *ptr = (void *)rdev->gart.table.vram.ptr;
+		void __iomem *ptr = (void *)rdev->vram_scratch.ptr;
 		u32 tmp;
 
 		WREG32(HDP_DEBUG1, 0);
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -997,6 +997,11 @@ int radeon_gem_set_tiling_ioctl(struct d
 int radeon_gem_get_tiling_ioctl(struct drm_device *dev, void *data,
 				struct drm_file *filp);
 
+/* VRAM scratch page for HDP bug */
+struct r700_vram_scratch {
+	struct radeon_bo		*robj;
+	volatile uint32_t		*ptr;
+};
 
 /*
  * Core structure, functions and helpers.
@@ -1060,6 +1065,7 @@ struct radeon_device {
 	const struct firmware *pfp_fw;	/* r6/700 PFP firmware */
 	const struct firmware *rlc_fw;	/* r6/700 RLC firmware */
 	struct r600_blit r600_blit;
+	struct r700_vram_scratch vram_scratch;
 	int msi_enabled; /* msi enabled */
 	struct r600_ih ih; /* r6/700 interrupt ring */
 	struct workqueue_struct *wq;
--- a/drivers/gpu/drm/radeon/rv770.c
+++ b/drivers/gpu/drm/radeon/rv770.c
@@ -889,6 +889,54 @@ static void rv770_gpu_init(struct radeon
 
 }
 
+static int rv770_vram_scratch_init(struct radeon_device *rdev)
+{
+	int r;
+	u64 gpu_addr;
+
+	if (rdev->vram_scratch.robj == NULL) {
+		r = radeon_bo_create(rdev, NULL, RADEON_GPU_PAGE_SIZE,
+					true, RADEON_GEM_DOMAIN_VRAM,
+					&rdev->vram_scratch.robj);
+		if (r) {
+			return r;
+		}
+	}
+
+	r = radeon_bo_reserve(rdev->vram_scratch.robj, false);
+	if (unlikely(r != 0))
+		return r;
+	r = radeon_bo_pin(rdev->vram_scratch.robj,
+			  RADEON_GEM_DOMAIN_VRAM, &gpu_addr);
+	if (r) {
+		radeon_bo_unreserve(rdev->vram_scratch.robj);
+		return r;
+	}
+	r = radeon_bo_kmap(rdev->vram_scratch.robj,
+				(void **)&rdev->vram_scratch.ptr);
+	if (r)
+		radeon_bo_unpin(rdev->vram_scratch.robj);
+	radeon_bo_unreserve(rdev->vram_scratch.robj);
+
+	return r;
+}
+
+static void rv770_vram_scratch_fini(struct radeon_device *rdev)
+{
+	int r;
+
+	if (rdev->vram_scratch.robj == NULL) {
+		return;
+	}
+	r = radeon_bo_reserve(rdev->vram_scratch.robj, false);
+	if (likely(r == 0)) {
+		radeon_bo_kunmap(rdev->vram_scratch.robj);
+		radeon_bo_unpin(rdev->vram_scratch.robj);
+		radeon_bo_unreserve(rdev->vram_scratch.robj);
+	}
+	radeon_bo_unref(&rdev->vram_scratch.robj);
+}
+
 int rv770_mc_init(struct radeon_device *rdev)
 {
 	u32 tmp;
@@ -954,6 +1002,9 @@ static int rv770_startup(struct radeon_d
 		if (r)
 			return r;
 	}
+	r = rv770_vram_scratch_init(rdev);
+	if (r)
+		return r;
 	rv770_gpu_init(rdev);
 	r = r600_blit_init(rdev);
 	if (r) {
@@ -1179,6 +1230,7 @@ void rv770_fini(struct radeon_device *rd
 	r600_irq_fini(rdev);
 	radeon_irq_kms_fini(rdev);
 	rv770_pcie_gart_fini(rdev);
+	rv770_vram_scratch_fini(rdev);
 	radeon_gem_fini(rdev);
 	radeon_fence_driver_fini(rdev);
 	radeon_clocks_fini(rdev);



  parent reply	other threads:[~2010-09-18 19:16 UTC|newest]

Thread overview: 132+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-18 19:13 [000/129] 2.6.35.5 -stable review Greg KH
2010-09-18 19:11 ` [001/129] hwmon: (ads7871) Fix ads7871_probe error paths Greg KH
2010-09-18 19:11 ` [002/129] hwmon: (k8temp) Differentiate between AM2 and ASB1 Greg KH
2010-09-18 19:11 ` [003/129] xen: handle events as edge-triggered Greg KH
2010-09-18 19:11 ` [004/129] xen: use percpu interrupts for IPIs and VIRQs Greg KH
2010-09-18 19:11 ` [005/129] xfs: fix untrusted inode number lookup Greg KH
2010-09-18 19:11 ` [006/129] xfs: ensure we mark all inodes in a freed cluster XFS_ISTALE Greg KH
2010-09-18 19:11 ` [007/129] ALSA: hda - Add Sony VAIO quirk for ALC269 Greg KH
2010-09-18 19:11 ` [008/129] ALSA: HDA: Use model=auto for LG R510 Greg KH
2010-09-18 19:11 ` [009/129] ALSA: hda - Rename iMic to Int Mic on Lenovo NB0763 Greg KH
2010-09-18 19:11 ` [010/129] libata-sff: remove harmful BUG_ON from ata_bmdma_qc_issue Greg KH
2010-09-18 19:11 ` [011/129] sata_mv: fix broken DSM/TRIM support (v2) Greg KH
2010-09-18 19:11 ` [012/129] pata_cmd64x: revert commit d62f5576 Greg KH
2010-09-18 19:11 ` [013/129] writeback: write_cache_pages doesnt terminate at nr_to_write <= 0 Greg KH
2010-09-18 19:11 ` [014/129] x86, tsc, sched: Recompute cyc2ns_offsets during resume from sleep states Greg KH
2010-09-18 19:11 ` [015/129] perf, x86, Pentium4: Clear the P4_CCCR_FORCE_OVF flag Greg KH
2010-09-18 19:11 ` [016/129] netfilter: fix CONFIG_COMPAT support Greg KH
2010-09-18 19:11 ` [017/129] PCI: MSI: Remove unsafe and unnecessary hardware access Greg KH
2010-09-18 19:11 ` [018/129] PCI: MSI: Restore read_msi_msg_desc(); add get_cached_msi_msg_desc() Greg KH
2010-09-18 19:11 ` [019/129] direct-io: move aio_complete into ->end_io Greg KH
2010-09-18 19:11 ` [020/129] ext4: move aio completion after unwritten extent conversion Greg KH
2010-09-18 19:11 ` [021/129] xfs: " Greg KH
2010-09-18 19:12 ` [022/129] Revert "Input: appletouch - fix integer overflow issue" Greg KH
2010-09-18 19:12 ` [023/129] ALSA: hda - Handle missing NID 0x1b on ALC259 codec Greg KH
2010-09-18 19:12 ` [024/129] ALSA: hda - Handle pin NID 0x1a on ALC259/269 Greg KH
2010-09-18 19:12 ` [025/129] Staging: rt2870sta: Add more device IDs from vendor drivers Greg KH
2010-09-18 19:12 ` [026/129] staging: hv: Fix missing functions for net_device_ops Greg KH
2010-09-18 19:12 ` [027/129] staging: hv: Fixed bounce kmap problem by using correct index Greg KH
2010-09-18 19:12 ` [028/129] staging: hv: Fixed the value of the 64bit-hole inside ring buffer Greg KH
2010-09-18 19:12 ` [029/129] staging: hv: Increased storvsc ringbuffer and max_io_requests Greg KH
2010-09-18 19:12 ` [030/129] staging: hv: Fixed lockup problem with bounce_buffer scatter list Greg KH
2010-09-18 19:12 ` [031/129] fuse: flush background queue on connection close Greg KH
2010-09-18 19:12 ` [032/129] mac80211: delete work timer Greg KH
2010-09-18 19:12 ` [033/129] ath9k_htc: Fix disconnect issue in HT40 mode Greg KH
2010-09-18 19:12 ` [034/129] ath9k_hw: Fix EEPROM uncompress block reading on AR9003 Greg KH
2010-09-18 19:12 ` [035/129] ath9k_hw: fix parsing of HT40 5 GHz CTLs Greg KH
2010-09-18 19:12 ` [036/129] ocfs2: Fix incorrect checksum validation error Greg KH
2010-09-18 19:12 ` [037/129] serial: bfin_sport_uart: restore transmit frame sync fix Greg KH
2010-09-18 19:12 ` [038/129] USB: ehci-ppc-of: problems in unwind Greg KH
2010-09-18 19:12 ` [039/129] USB: Fix kernel oops with g_ether and Windows Greg KH
2010-09-18 19:12 ` [040/129] USB: CP210x Add new device ID Greg KH
2010-09-18 19:12 ` [041/129] USB: cp210x: Add B&G H3000 link cable ID Greg KH
2010-09-18 19:12 ` [042/129] usb: allow drivers to use allocated bandwidth until unbound Greg KH
2010-09-18 19:12 ` [043/129] USB: ftdi_sio: Added custom PIDs for ChamSys products Greg KH
2010-09-18 19:12 ` [044/129] usb: serial: mos7840: Add USB ID to support the B&B Electronics USOPTL4-2P Greg KH
2010-09-18 19:12 ` [045/129] usb: serial: mos7840: Add USB IDs to support more B&B USB/RS485 converters Greg KH
2010-09-18 19:12 ` [046/129] ima: always maintain counters Greg KH
2010-09-18 19:12 ` [047/129] USB: cxacru: Use a bulk/int URB to access the command endpoint Greg KH
2010-09-18 19:12 ` [048/129] USB: cdc-acm: Adding second ACM channel support for various Nokia and one Samsung phones Greg KH
2010-09-18 19:12 ` [049/129] USB: cdc-acm: Add pseudo modem without AT command capabilities Greg KH
2010-09-18 19:12 ` [050/129] USB: cdc-acm: Fixing crash when ACM probing interfaces with no endpoint descriptors Greg KH
2010-09-18 19:12 ` [051/129] ALSA: hda - Add a new hp-laptop model for Conexant 5066, tested on HP G60 Greg KH
2010-09-18 19:12 ` [052/129] ALSA: usb-audio: fix detection of vendor-specific device protocol settings Greg KH
2010-09-18 19:12 ` [053/129] ALSA: virtuoso: work around missing reset in the Xonar DS Windows driver Greg KH
2010-09-18 19:12 ` [054/129] ALSA: virtuoso: fix setting of Xonar DS line-in/mic-in controls Greg KH
2010-09-18 19:12 ` [055/129] ALSA: seq/oss - Fix double-free at error path of snd_seq_oss_open() Greg KH
2010-09-18 19:12 ` [056/129] ALSA: usb - Release capture substream URBs properly Greg KH
2010-09-18 19:12 ` [057/129] ALSA: hda - Add quirk for Lenovo T400s Greg KH
2010-09-18 19:12 ` [058/129] ALSA: hda - Add errata initverb sequence for CS42xx codecs Greg KH
2010-09-18 19:12 ` [059/129] ALSA: hda - Fix wrong HP pin detection in snd_hda_parse_pin_def_config() Greg KH
2010-09-18 19:12 ` [060/129] ALSA: usb-audio: Assume first control interface is for audio Greg KH
2010-09-18 19:12 ` [061/129] ALSA: hda - patch_nvhdmi.c: Add missing codec IDs, unify names Greg KH
2010-09-18 19:12 ` [062/129] swap: prevent reuse during hibernation Greg KH
2010-09-18 19:12 ` [063/129] swap: discard while swapping only if SWAP_FLAG_DISCARD Greg KH
2010-09-18 19:12 ` [064/129] swap: do not send discards as barriers Greg KH
2010-09-18 19:12 ` [065/129] sysfs: checking for NULL instead of ERR_PTR Greg KH
2010-09-18 19:12 ` [066/129] oprofile: fix crash when accessing freed task structs Greg KH
2010-09-18 19:12 ` [067/129] oprofile, x86: fix init_sysfs error handling Greg KH
2010-09-18 19:12 ` [068/129] oprofile, x86: fix init_sysfs() function stub Greg KH
2010-09-18 19:12 ` [069/129] HID: Set Report ID properly for Output reports on the Control endpoint Greg KH
2010-09-18 19:12 ` [070/129] libata: skip EH autopsy and recovery during suspend Greg KH
2010-09-18 19:12 ` [071/129] libata,pata_via: revert ata_wait_idle() removal from ata_sff/via_tf_load() Greg KH
2010-09-18 19:12 ` [072/129] ahci: fix hang on failed softreset Greg KH
2010-09-18 19:12 ` [073/129] O_DIRECT: fix the splitting up of contiguous I/O Greg KH
2010-09-18 19:12 ` [074/129] tracing: Fix a race in function profile Greg KH
2010-09-18 19:12 ` [075/129] tracing: Do not allow llseek to set_ftrace_filter Greg KH
2010-09-18 19:12 ` [076/129] tracing: t_start: reset FTRACE_ITER_HASH in case of seek/pread Greg KH
2010-09-18 19:12 ` [077/129] irda: off by one Greg KH
2010-09-18 19:12 ` [078/129] hp_accel: add quirks for HP ProBook 532x and HP Mini 5102 Greg KH
2010-09-18 19:12 ` [079/129] gcov: fix null-pointer dereference for certain module types Greg KH
2010-09-18 19:12 ` [080/129] tmio_mmc: dont clear unhandled pending interrupts Greg KH
2010-09-18 19:12 ` [081/129] mmc: fix the use of kunmap_atomic() in tmio_mmc.h Greg KH
2010-09-18 19:13 ` [082/129] mmc: fix all hangs related to mmc/sd card insert/removal during suspend/resume Greg KH
2010-09-18 19:13 ` [083/129] mmc: build fix: mmc_pm_notify is only available with CONFIG_PM=y Greg KH
2010-09-18 19:13 ` [084/129] statfs() gives ESTALE error Greg KH
2010-09-18 19:13 ` [085/129] minix: fix regression in minix_mkdir() Greg KH
2010-09-18 19:13 ` [086/129] bounce: call flush_dcache_page() after bounce_copy_vec() Greg KH
2010-09-18 19:13 ` [087/129] mm: compaction: handle active and inactive fairly in too_many_isolated Greg KH
2010-09-18 19:13 ` [088/129] kernel/groups.c: fix integer overflow in groups_search Greg KH
2010-09-18 19:13 ` [089/129] binfmt_misc: fix binfmt_misc priority Greg KH
2010-09-18 19:13 ` [090/129] Input: i8042 - fix device removal on unload Greg KH
2010-09-18 19:13 ` [091/129] Input: i8042 - reset keyboard controller wehen resuming from S2R Greg KH
2010-09-18 19:13 ` [092/129] memory hotplug: fix next block calculation in is_removable Greg KH
2010-09-18 19:13 ` [093/129] perf: Initialize callchains rootss childen hits Greg KH
2010-09-18 19:13 ` [094/129] powerpc/perf_event: Reduce latency of calling perf_event_do_pending Greg KH
2010-09-18 19:13 ` [095/129] p54: fix tx feedback status flag check Greg KH
2010-09-18 19:13 ` [096/129] ath5k: check return value of ieee80211_get_tx_rate Greg KH
2010-09-18 19:13 ` [097/129] wireless extensions: fix kernel heap content leak Greg KH
2010-09-18 19:13 ` [098/129] RDMA/cxgb3: Dont exceed the max HW CQ depth Greg KH
2010-09-18 19:13 ` [099/129] x86, tsc: Fix a preemption leak in restore_sched_clock_state() Greg KH
2010-09-18 19:13 ` [100/129] x86-64, compat: Test %rax for the syscall number, not %eax Greg KH
2010-09-18 19:13 ` [101/129] compat: Make compat_alloc_user_space() incorporate the access_ok() Greg KH
2010-09-18 19:13 ` [102/129] x86-64, compat: Retruncate rax after ia32 syscall entry tracing Greg KH
2010-09-18 19:13 ` [103/129] ALSA: HDA: Enable internal speaker on Dell M101z Greg KH
2010-09-18 19:13 ` [104/129] x86: hpet: Work around hardware stupidity Greg KH
2010-09-18 19:13 ` [105/129] arm: fix really nasty sigreturn bug Greg KH
2010-09-18 19:13 ` [106/129] hwmon: (emc1403) Remove unnecessary hwmon_device_unregister Greg KH
2010-09-18 19:13 ` [107/129] hwmon: (f75375s) Shift control mode to the correct bit position Greg KH
2010-09-18 19:13 ` [108/129] hwmon: (f75375s) Do not overwrite values read from registers Greg KH
2010-09-18 19:13 ` [109/129] apm_power: Add missing break statement Greg KH
2010-09-18 19:13 ` [110/129] cifs: fix potential double put of TCP session reference Greg KH
2010-09-18 19:13 ` [111/129] NFS: Fix a typo in nfs_sockaddr_match_ipaddr6 Greg KH
2010-09-18 19:13 ` [112/129] SUNRPC: Fix race corrupting rpc upcall Greg KH
2010-09-18 19:13 ` [113/129] agp/intel: Promote warning about failure to setup flush to error Greg KH
2010-09-18 19:13 ` Greg KH [this message]
2010-09-18 19:13 ` [115/129] drm/i915: Enable MI_FLUSH on Sandybridge Greg KH
2010-09-18 19:13 ` [116/129] drm/radeon/kms: force legacy pll algo for RV515 LVDS Greg KH
2010-09-18 19:13 ` [117/129] drm/radeon/kms: force legacy pll algo for RV620 LVDS Greg KH
2010-09-18 19:13 ` [118/129] drm/radeon/kms: properly set crtc high base on r7xx Greg KH
2010-09-18 19:13 ` [119/129] drm/radeon/kms/evergreen: fix gpu hangs in userspace accel code Greg KH
2010-09-18 19:13 ` [120/129] drm/radeon/kms/evergreen: fix backend setup Greg KH
2010-09-18 19:13 ` [121/129] i915: return -EFAULT if copy_to_user fails Greg KH
2010-09-18 19:13 ` [122/129] i915_gem: " Greg KH
2010-09-18 19:13 ` [123/129] drm/i915/dp: Really try 5 times before giving up Greg KH
2010-09-18 19:13 ` [124/129] drm/i915: Allocate the PCI resource for the MCHBAR Greg KH
2010-09-18 19:13 ` [125/129] drm/i915: overlay on gen2 cant address above 1G Greg KH
2010-09-18 19:13 ` [126/129] drm/i915: Prevent double dpms on Greg KH
2010-09-18 19:13 ` [127/129] drm/i915: dont enable self-refresh on Ironlake Greg KH
2010-09-18 19:13 ` [128/129] Revert "drm/i915: Allow LVDS on pipe A on gen4+" Greg KH
2010-09-18 19:13 ` [129/129] drm: Only decouple the old_fb from the crtc is we call mode_set* Greg KH
2010-09-18 21:08 ` [000/129] 2.6.35.5 -stable review Marcin Slusarz
2010-09-19  4:04   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100918191307.081234318@clark.site \
    --to=gregkh@suse.de \
    --cc=airlied@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=alexdeucher@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable-review@kernel.org \
    --cc=stable@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox