From patchwork Thu Oct 2 00:34:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 5015181 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E2C94BEEA6 for ; Thu, 2 Oct 2014 01:12:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6C12820259 for ; Thu, 2 Oct 2014 01:12:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 832D420211 for ; Thu, 2 Oct 2014 01:12:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753357AbaJBBM4 (ORCPT ); Wed, 1 Oct 2014 21:12:56 -0400 Received: from gate.crashing.org ([63.228.1.57]:51622 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752075AbaJBBM4 (ORCPT ); Wed, 1 Oct 2014 21:12:56 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id s920YMOb009322; Wed, 1 Oct 2014 19:34:23 -0500 Message-ID: <1412210062.10667.1.camel@pasglop> Subject: [PATCH v2 2/4] gpu/radeon: Move 64-bit MSI quirk from arch to driver From: Benjamin Herrenschmidt To: Alex Deucher , Bjorn Helgaas Cc: Dave Airlie , Brian King , Takashi Iwai , linux-pci@vger.kernel.org, Yijing Wang , Anton Blanchard , linuxppc-dev@ozlabs.org Date: Thu, 02 Oct 2014 10:34:22 +1000 X-Mailer: Evolution 3.12.2 Mime-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A number of radeon cards have a HW limitation causing them to be unable to generate the full 64-bit of address bits for MSIs. This breaks MSIs on some platforms such as POWER machines. We used to have a powerpc specific quirk to address that on a single card, but this doesn't scale very well, this is better put under control of the drivers who know precisely what a given HW revision can do. This moves the setting of the quirk flag to the radeon driver Signed-off-by: Benjamin Herrenschmidt --- v2: This is just adjusted to the new flag name arch/powerpc/kernel/pci_64.c | 1 - drivers/gpu/drm/radeon/radeon_irq_kms.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index d41a831..5330f6d 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c @@ -271,5 +271,4 @@ static void quirk_radeon_32bit_msi(struct pci_dev *dev) { dev->no_64bit_msi = true; } -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x68f2, quirk_radeon_32bit_msi); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0xaa68, quirk_radeon_32bit_msi); diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c index 16807af..e760671 100644 --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c @@ -202,6 +202,16 @@ static bool radeon_msi_ok(struct radeon_device *rdev) if (rdev->flags & RADEON_IS_AGP) return false; + /* + * Older chips have a HW limitation, they can only generate 40 bits + * of address for "64-bit" MSIs which breaks on some platforms, notably + * IBM POWER servers, so we limit them + */ + if (rdev->family < CHIP_BONAIRE) { + dev_info(rdev->dev, "radeon: MSI limited to 32-bit\n"); + rdev->pdev->no_64bit_msi = true; + } + /* force MSI on */ if (radeon_msi == 1) return true;