From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932214AbcCAX5e (ORCPT ); Tue, 1 Mar 2016 18:57:34 -0500 Received: from mail333.us4.mandrillapp.com ([205.201.137.77]:43800 "EHLO mail333.us4.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756268AbcCAX5T convert rfc822-to-8bit (ORCPT ); Tue, 1 Mar 2016 18:57:19 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=linuxfoundation.org; b=BImfcEKjfapAv5rOOnEGge373PjMXJYS8nSz+xp/BDWI0bF/beSKfGQOu/MVrRGvd1s+R+mFwA+J r7vz2YoFXVKHdbPnznfzjJhzgfgNLEq6vtmskAn2cK+D3smO1BxzHSbzRhrAubhF/+LLxRu8TuJl M5X53mYVJbXVfylD9G0=; From: Greg Kroah-Hartman Subject: [PATCH 4.4 214/342] drm/radeon: mask out WC from BO on unsupported arches X-Mailer: git-send-email 2.7.2 To: Cc: Greg Kroah-Hartman , , =?utf-8?Q?Christian=20K=C3=B6nig?= , =?utf-8?Q?Michel=20D=C3=A4nzer?= , Oded Gabbay , Alex Deucher Message-Id: <20160301234534.843250949@linuxfoundation.org> In-Reply-To: <20160301234527.990448862@linuxfoundation.org> References: <20160301234527.990448862@linuxfoundation.org> X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30481620.dc38049a27524974b6f7f3be75e417f0 X-Mandrill-User: md_30481620 Date: Tue, 01 Mar 2016 23:54:56 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Oded Gabbay commit c5244987394648913ae1a03879c58058a2fc2cee upstream. Reviewed-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Oded Gabbay Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/radeon/radeon_object.c | 7 +++++++ 1 file changed, 7 insertions(+) --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -33,6 +33,7 @@ #include #include #include +#include #include "radeon.h" #include "radeon_trace.h" @@ -245,6 +246,12 @@ int radeon_bo_create(struct radeon_devic DRM_INFO_ONCE("Please enable CONFIG_MTRR and CONFIG_X86_PAT for " "better performance thanks to write-combining\n"); bo->flags &= ~(RADEON_GEM_GTT_WC | RADEON_GEM_GTT_UC); +#else + /* For architectures that don't support WC memory, + * mask out the WC flag from the BO + */ + if (!drm_arch_can_wc_memory()) + bo->flags &= ~RADEON_GEM_GTT_WC; #endif radeon_ttm_placement_from_domain(bo, domain);