From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org,
Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>,
Alex Deucher <alexander.deucher@amd.com>
Subject: [ 67/79] radeon: use max_bus_speed to activate gen2 speeds
Date: Tue, 11 Jun 2013 13:03:33 -0700 [thread overview]
Message-ID: <20130611195324.856071642@linuxfoundation.org> (raw)
In-Reply-To: <20130611195312.352656079@linuxfoundation.org>
3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
commit 7e0e41963740525af702bb23edede8ae9afc4ac0 upstream.
radeon currently uses a drm function to get the speed capabilities for
the bus, drm_pcie_get_speed_cap_mask. However, this is a non-standard
method of performing this detection and this patch changes it to use
the max_bus_speed attribute.
From: Lucas Kannebley Tavares <lucaskt@linux.vnet.ibm.com>
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/radeon/evergreen.c | 10 +++-------
drivers/gpu/drm/radeon/r600.c | 9 ++-------
drivers/gpu/drm/radeon/rv770.c | 9 ++-------
3 files changed, 7 insertions(+), 21 deletions(-)
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -3946,8 +3946,7 @@ void evergreen_fini(struct radeon_device
void evergreen_pcie_gen2_enable(struct radeon_device *rdev)
{
- u32 link_width_cntl, speed_cntl, mask;
- int ret;
+ u32 link_width_cntl, speed_cntl;
if (radeon_pcie_gen2 == 0)
return;
@@ -3962,11 +3961,8 @@ void evergreen_pcie_gen2_enable(struct r
if (ASIC_IS_X2(rdev))
return;
- ret = drm_pcie_get_speed_cap_mask(rdev->ddev, &mask);
- if (ret != 0)
- return;
-
- if (!(mask & DRM_PCIE_SPEED_50))
+ if ((rdev->pdev->bus->max_bus_speed != PCIE_SPEED_5_0GT) &&
+ (rdev->pdev->bus->max_bus_speed != PCIE_SPEED_8_0GT))
return;
speed_cntl = RREG32_PCIE_P(PCIE_LC_SPEED_CNTL);
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -4353,8 +4353,6 @@ static void r600_pcie_gen2_enable(struct
{
u32 link_width_cntl, lanes, speed_cntl, training_cntl, tmp;
u16 link_cntl2;
- u32 mask;
- int ret;
if (radeon_pcie_gen2 == 0)
return;
@@ -4373,11 +4371,8 @@ static void r600_pcie_gen2_enable(struct
if (rdev->family <= CHIP_R600)
return;
- ret = drm_pcie_get_speed_cap_mask(rdev->ddev, &mask);
- if (ret != 0)
- return;
-
- if (!(mask & DRM_PCIE_SPEED_50))
+ if ((rdev->pdev->bus->max_bus_speed != PCIE_SPEED_5_0GT) &&
+ (rdev->pdev->bus->max_bus_speed != PCIE_SPEED_8_0GT))
return;
speed_cntl = RREG32_PCIE_P(PCIE_LC_SPEED_CNTL);
--- a/drivers/gpu/drm/radeon/rv770.c
+++ b/drivers/gpu/drm/radeon/rv770.c
@@ -1240,8 +1240,6 @@ static void rv770_pcie_gen2_enable(struc
{
u32 link_width_cntl, lanes, speed_cntl, tmp;
u16 link_cntl2;
- u32 mask;
- int ret;
if (radeon_pcie_gen2 == 0)
return;
@@ -1256,11 +1254,8 @@ static void rv770_pcie_gen2_enable(struc
if (ASIC_IS_X2(rdev))
return;
- ret = drm_pcie_get_speed_cap_mask(rdev->ddev, &mask);
- if (ret != 0)
- return;
-
- if (!(mask & DRM_PCIE_SPEED_50))
+ if ((rdev->pdev->bus->max_bus_speed != PCIE_SPEED_5_0GT) &&
+ (rdev->pdev->bus->max_bus_speed != PCIE_SPEED_8_0GT))
return;
DRM_INFO("enabling PCIE gen 2 link speeds, disable with radeon.pcie_gen2=0\n");
next prev parent reply other threads:[~2013-06-11 20:06 UTC|newest]
Thread overview: 91+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-11 20:02 [ 00/79] 3.9.6-stable review Greg Kroah-Hartman
2013-06-11 20:02 ` [ 01/79] USB: serial: Add Option GTM681W to qcserial device table Greg Kroah-Hartman
2013-06-11 20:02 ` [ 02/79] USB: option: blacklist network interface on Huawei E1820 Greg Kroah-Hartman
2013-06-11 20:02 ` [ 03/79] USB: option,zte_ev: move most ZTE CDMA devices to zte_ev Greg Kroah-Hartman
2013-06-11 20:02 ` [ 04/79] usb: dwc3: pci: PHY should be deleted later than dwc3 core Greg Kroah-Hartman
2013-06-11 20:02 ` [ 05/79] xhci - correct comp_mode_recovery_timer on return from hibernate Greg Kroah-Hartman
2013-06-11 20:02 ` [ 06/79] xhci-mem: init list heads at the beginning of init Greg Kroah-Hartman
2013-06-11 20:02 ` [ 07/79] xhci: fix list access before init Greg Kroah-Hartman
2013-06-11 20:02 ` [ 08/79] xhci: Disable D3cold for buggy TI redrivers Greg Kroah-Hartman
2013-06-11 20:02 ` [ 09/79] x86/PCI: Map PCI setup data with ioremap() so it can be in highmem Greg Kroah-Hartman
2013-06-11 20:02 ` [ 10/79] usb: musb: make use_sg flag URB specific Greg Kroah-Hartman
2013-06-11 20:02 ` [ 11/79] ALSA: usb-audio: fix Roland/Cakewalk UM-3G support Greg Kroah-Hartman
2013-06-11 20:02 ` [ 12/79] ALSA: usb-audio - Apply Logitech QuickCam Pro 9000 quirk only to audio iface Greg Kroah-Hartman
2013-06-11 20:02 ` [ 13/79] ALSA: usb-audio - Fix invalid volume resolution on Logitech HD webcam c270 Greg Kroah-Hartman
2013-06-11 20:02 ` [ 14/79] USB: iuu_phoenix: fix bulk-message timeout Greg Kroah-Hartman
2013-06-11 20:02 ` [ 15/79] USB: keyspan: fix bogus array index Greg Kroah-Hartman
2013-06-11 20:02 ` [ 16/79] USB: ark3116: fix control-message timeout Greg Kroah-Hartman
2013-06-11 20:02 ` [ 17/79] USB: visor: fix initialisation of Treo/Kyocera devices Greg Kroah-Hartman
2013-06-11 20:02 ` [ 18/79] USB: zte_ev: fix control-message timeouts Greg Kroah-Hartman
2013-06-11 20:02 ` [ 19/79] USB: zte_ev: fix broken open Greg Kroah-Hartman
2013-06-11 20:02 ` [ 20/79] USB: Serial: cypress_M8: Enable FRWD Dongle hidcom device Greg Kroah-Hartman
2013-06-11 20:02 ` [ 21/79] USB: whiteheat: fix broken port configuration Greg Kroah-Hartman
2013-06-11 20:02 ` [ 22/79] USB: serial: fix Treo/Kyocera interrrupt-in urb context Greg Kroah-Hartman
2013-06-11 20:02 ` [ 23/79] USB: revert periodic scheduling bugfix Greg Kroah-Hartman
2013-06-11 20:02 ` [ 24/79] USB: mos7840: fix DMA to stack Greg Kroah-Hartman
2013-06-11 20:02 ` [ 25/79] USB: mos7720: " Greg Kroah-Hartman
2013-06-11 20:02 ` [ 26/79] USB: mos7720: fix message timeouts Greg Kroah-Hartman
2013-06-11 20:02 ` [ 27/79] USB: mos7720: fix hardware flow control Greg Kroah-Hartman
2013-06-11 20:02 ` [ 28/79] acpi-cpufreq: set current frequency based on target P-State Greg Kroah-Hartman
2013-06-11 20:02 ` [ 29/79] ACPI / video: ignore BIOS initial backlight value for HP m4 Greg Kroah-Hartman
2013-06-11 20:02 ` [ 30/79] ACPI / video: ignore BIOS initial backlight value for HP Pavilion g6 Greg Kroah-Hartman
2013-06-11 20:02 ` [ 31/79] ACPI / scan: do not match drivers against objects having scan handlers Greg Kroah-Hartman
2013-06-11 20:02 ` [ 32/79] ACPI / PM: Do not execute _PS0 for devices without _PSC during initialization Greg Kroah-Hartman
2013-06-11 20:02 ` [ 33/79] x86 / platform / hp_wmi: Fix bluetooth_rfkill misuse in hp_wmi_rfkill_setup() Greg Kroah-Hartman
2013-06-11 20:03 ` [ 34/79] ALSA: hda/via - Disable broken dynamic power control Greg Kroah-Hartman
2013-06-11 20:03 ` [ 35/79] ALSA: hda/via - Fix wrongly cleared pins after suspend on VT1802 Greg Kroah-Hartman
2013-06-11 20:03 ` [ 36/79] ALSA: hda - Allow setting automute/automic hooks after parsing Greg Kroah-Hartman
2013-06-11 20:03 ` [ 37/79] ALSA: hda - Add keep_eapd_on flag to generic parser Greg Kroah-Hartman
2013-06-11 20:03 ` [ 38/79] ARM: Kirkwood: TS219: Fix crash by double PCIe instantiation Greg Kroah-Hartman
2013-06-11 20:03 ` [ 39/79] ARM: 7742/1: topology: export cpu_topology Greg Kroah-Hartman
2013-06-11 20:03 ` [ 40/79] ARM: 7743/1: compressed/head.S: work around new binutils warning Greg Kroah-Hartman
2013-06-11 20:03 ` [ 41/79] ARM: 7747/1: pcpu: ensure __my_cpu_offset cannot be re-ordered across barrier() Greg Kroah-Hartman
2013-06-11 20:03 ` [ 42/79] powerpc/eeh: Dont check RTAS token to get PE addr Greg Kroah-Hartman
2013-06-11 20:03 ` [ 43/79] powerpc/hw_breakpoints: Add DABRX cpu feature to fix 32-bit regression Greg Kroah-Hartman
2013-06-11 20:03 ` [ 44/79] powerpc/perf: Fix deadlock caused by calling printk() in PMU exception Greg Kroah-Hartman
2013-06-11 20:03 ` [ 45/79] dmaengine: ste_dma40: fix pm runtime ref counting Greg Kroah-Hartman
2013-06-11 20:03 ` [ 46/79] radeon: Fix system hang issue when using KMS with older cards Greg Kroah-Hartman
2013-06-11 20:03 ` [ 47/79] drm/radeon: dont allow audio on DCE6 Greg Kroah-Hartman
2013-06-11 20:03 ` [ 48/79] hpfs: fix warnings when the filesystem fills up Greg Kroah-Hartman
2013-06-11 20:03 ` [ 49/79] cifs: fix off-by-one bug in build_unc_path_to_root Greg Kroah-Hartman
2013-06-11 20:03 ` [ 50/79] ecryptfs: fixed msync to flush data Greg Kroah-Hartman
2013-06-11 20:03 ` [ 51/79] eCryptfs: Check return of filemap_write_and_wait during fsync Greg Kroah-Hartman
2013-06-11 20:03 ` [ 52/79] hwmon: (adm1021) Strengthen chip detection for ADM1021, LM84 and MAX1617 Greg Kroah-Hartman
2013-06-11 20:03 ` [ 53/79] drm/mgag200: Add missing write to index before accessing data register Greg Kroah-Hartman
2013-06-11 20:03 ` [ 54/79] drm: fix a use-after-free when GPU acceleration disabled Greg Kroah-Hartman
2013-06-11 20:03 ` [ 55/79] drm/i915/sdvo: Use &intel_sdvo->ddc instead of intel_sdvo->i2c for DDC Greg Kroah-Hartman
2013-06-11 20:03 ` [ 56/79] drm/i915: no lvds quirk for hp t5740 Greg Kroah-Hartman
2013-06-11 20:03 ` [ 57/79] drm/i915: Fix spurious -EIO/SIGBUS on wedged gpus Greg Kroah-Hartman
2013-06-11 20:03 ` [ 58/79] Revert "ACPI / scan: do not match drivers against objects having scan handlers" Greg Kroah-Hartman
2013-06-11 20:03 ` [ 59/79] powerpc: Fix build error in stable/3.9 Greg Kroah-Hartman
2013-06-11 20:03 ` [ 60/79] usb: dwc3: gadget: free trb pool only from epnum 2 Greg Kroah-Hartman
2013-06-11 20:03 ` [ 61/79] drm/gma500: Increase max resolution for mode setting Greg Kroah-Hartman
2013-06-11 20:03 ` [ 62/79] pci: Set dev->dev.type in alloc_pci_dev Greg Kroah-Hartman
2013-06-11 20:03 ` [ 63/79] powerpc: Set default VGA device Greg Kroah-Hartman
2013-06-11 20:03 ` [ 64/79] powerpc/pseries: Force 32 bit MSIs for devices that require it Greg Kroah-Hartman
2013-06-11 20:03 ` [ 65/79] powerpc/pseries: Make 32-bit MSI quirk work on systems lacking firmware support Greg Kroah-Hartman
2013-06-12 17:19 ` Kleber Sacilotto de Souza
2013-06-11 20:03 ` [ 66/79] powerpc/pseries: Perform proper max_bus_speed detection Greg Kroah-Hartman
2013-06-11 20:03 ` Greg Kroah-Hartman [this message]
2013-06-11 20:03 ` [ 68/79] iio:inkern: Fix typo/bug in convert raw to processed Greg Kroah-Hartman
2013-06-11 20:03 ` [ 69/79] iio: frequency: ad4350: Fix bug / typo in mask Greg Kroah-Hartman
2013-06-11 20:03 ` [ 70/79] drm/i915: force full modeset if the connector is in DPMS OFF mode Greg Kroah-Hartman
2013-06-11 20:03 ` [ 71/79] USB: serial: add wait_until_sent operation Greg Kroah-Hartman
2013-06-11 20:03 ` [ 72/79] USB: serial: add generic wait_until_sent implementation Greg Kroah-Hartman
2013-06-11 20:03 ` [ 73/79] USB: ftdi_sio: clean up get_modem_status Greg Kroah-Hartman
2013-06-11 20:03 ` [ 74/79] USB: ftdi_sio: fix chars_in_buffer overhead Greg Kroah-Hartman
2013-06-11 20:03 ` [ 75/79] USB: io_ti: " Greg Kroah-Hartman
2013-06-11 20:03 ` [ 76/79] Fix lockup related to stop_machine being stuck in __do_softirq Greg Kroah-Hartman
2013-06-11 20:03 ` [ 77/79] xen/smp: Fixup NOHZ per cpu data when onlining an offline CPU Greg Kroah-Hartman
2013-06-11 20:03 ` [ 78/79] timekeeping: Correct run-time detection of persistent_clock Greg Kroah-Hartman
2013-06-11 20:03 ` [ 79/79] s390: Add pgste to ptep_modify_prot_start() Greg Kroah-Hartman
2013-06-12 14:06 ` [ 00/79] 3.9.6-stable review Guenter Roeck
2013-06-12 14:15 ` Josh Boyer
2013-06-12 14:21 ` Guenter Roeck
2013-06-12 15:49 ` Shuah Khan
2013-06-12 16:58 ` Greg Kroah-Hartman
2013-06-12 20:29 ` Guenter Roeck
2013-06-12 20:34 ` Guenter Roeck
2013-06-12 20:53 ` Kleber Sacilotto de Souza
2013-06-13 17:41 ` Greg Kroah-Hartman
2013-06-13 17:45 ` Greg Kroah-Hartman
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=20130611195324.856071642@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=alexander.deucher@amd.com \
--cc=klebers@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.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