From patchwork Fri Apr 11 13:55:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 3968431 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4A1079F336 for ; Fri, 11 Apr 2014 13:55:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6FEDB207FE for ; Fri, 11 Apr 2014 13:55:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 527B3207FD for ; Fri, 11 Apr 2014 13:55:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D4356E2A5; Fri, 11 Apr 2014 06:55:25 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ee0-f41.google.com (mail-ee0-f41.google.com [74.125.83.41]) by gabe.freedesktop.org (Postfix) with ESMTP id D35166E2A5 for ; Fri, 11 Apr 2014 06:55:23 -0700 (PDT) Received: by mail-ee0-f41.google.com with SMTP id t10so4206748eei.14 for ; Fri, 11 Apr 2014 06:55:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id; bh=Pb5RYG1s2kUJg/TioZJ9mv4fQoJumA2DK5uBjT8nXqE=; b=DgiDA52U7PGou0CHe3XSb0WCGL3Aea+YFtodtHvvlGi8GhJ+OTscLW7Qf4YoNeHPb9 kVrCSbGcFubHZCr8m7BvRA+LA8gc6ToIKNTm6buuEcayhWkoBgCd9bks3ZiVd+GtdyPj qm+5ycj+oWQtIYf67HcFlo4J33/b0i3sno3Js= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Pb5RYG1s2kUJg/TioZJ9mv4fQoJumA2DK5uBjT8nXqE=; b=lmEDzZHQd94r5YO/TdAvareasCR5Pt0zU5qrgm8+/GraJLTeB+djoBD40KXN9JWjrS 1tDIFJpLYBila+cSz6Yh/fgC5PJI0PfFPc5Banxzts0I9Hl3GcHatmLmzd8tGIlCPsQb CHhos0FhGKKxxli9C1Dmb1N+YGGl3XLjnnPkzaiX/gg5CrfyrfTGub573ORWOawKXkdO Bjq1K76VWgg7Ye6N8WlFP2Px778Lse65d9YHlxaN7qOKfay2X+Y32+mtTF2GvPsrP7fe R7ZyL32XSlGwt++wuOL1w6L/a8eple0fl0G1rohK+h+umfnv3ZjPCGkBDiKl8u/aA4SV 6aeg== X-Gm-Message-State: ALoCoQmTE+1a3e6XEkuJXgVdRt+jSsgjagQeCwOH4yJRwoVa4s2n/ISDAB+MUr6uFsfxudxPvFsv X-Received: by 10.14.219.137 with SMTP id m9mr2985753eep.77.1397224522592; Fri, 11 Apr 2014 06:55:22 -0700 (PDT) Received: from phenom.ffwll.local (84-73-67-144.dclient.hispeed.ch. [84.73.67.144]) by mx.google.com with ESMTPSA id t44sm17859196eeo.6.2014.04.11.06.55.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Apr 2014 06:55:21 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Fri, 11 Apr 2014 15:55:17 +0200 Message-Id: <1397224517-29864-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.8.5.2 Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH] drm/i915: Don't complain about stolen conflicts on gen3 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Apparently stuff works that way on those machines. I agree with Chris' concern that this is a bit risky but imo worth a shot in -next just for fun. Afaics all these machines have the pci resources allocated like that by the BIOS, so I suspect that it's all ok. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76983 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71031 Tested-by: lu hua Signed-off-by: Daniel Vetter Reviewed-by: Jesse Barnes Tested-by: Paul Menzel --- drivers/gpu/drm/i915/i915_gem_stolen.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c index 62ef55ba061c..99d147af173a 100644 --- a/drivers/gpu/drm/i915/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c @@ -93,7 +93,11 @@ static unsigned long i915_stolen_to_physical(struct drm_device *dev) r = devm_request_mem_region(dev->dev, base + 1, dev_priv->gtt.stolen_size - 1, "Graphics Stolen Memory"); - if (r == NULL) { + /* + * GEN3 firmware likes to smash pci bridges into the stolen + * range. Apparently this works. + */ + if (r == NULL && !IS_GEN3(dev)) { DRM_ERROR("conflict detected with stolen region: [0x%08x - 0x%08x]\n", base, base + (uint32_t)dev_priv->gtt.stolen_size); base = 0;