From patchwork Sat Jan 30 05:59:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oded Gabbay X-Patchwork-Id: 8169661 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1B627BEEED for ; Sat, 30 Jan 2016 05:59:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 388E62039C for ; Sat, 30 Jan 2016 05:59:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2624620395 for ; Sat, 30 Jan 2016 05:59:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B53626E04B; Fri, 29 Jan 2016 21:59:45 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by gabe.freedesktop.org (Postfix) with ESMTPS id B70A36E04B for ; Fri, 29 Jan 2016 21:59:43 -0800 (PST) Received: by mail-wm0-f66.google.com with SMTP id r129so891690wmr.0 for ; Fri, 29 Jan 2016 21:59:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ydZ9/cNocFPmMFpbSFhE3c61WSAGYIkPkvy8dDN79SQ=; b=hZLTq0dnadwJv9SlKRG2qxzl10pniGX2V8Co6IOTyHscHGic+dQQjzqcjx50NmbTO1 HaAg0UFAYqEgE6p+IQx5ES0i59/89hWBJTKz3afVg9L3MqkHNkdFWbYh85pDWpDQ31xf 8gbGWucXjkaa8Wh6qS0ED4H8CR906GTuT1hNmoPQNBzInnNXPE5Jud5zRcZCWR7ajABo EfTXZEfX6YEtlF3J1eLG5FH0pLrfULHJR+XKiFm/qwIT1artm7dlDra91tSH+vW7bz6X NFzMpsxhrvnXjXOBCwX4uXPsCgCddten0eaJmt7DB/JrkFwW45MCx0kCCtWNHEZKqN55 QzEQ== 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=ydZ9/cNocFPmMFpbSFhE3c61WSAGYIkPkvy8dDN79SQ=; b=BS4HssHSsVN5u2awuaEpG4ANkAlSCXtLdUZTHUGX9SGbNQrPGahNnlNBfYb/CtiO3Q Laf+orpPcClMLBQHuc4InN33RhfNsV1Tn6JXxcjSS5EufdQjVD/hMrehBmHdfJxIV90v zMnSEfvF9+kTxKIMM2kRwPeucp9nAreW28ilAzers69iCbphdu/ZBeKHB0s8ZXM7LMrm ORtZY4XYjfEVmHxIWPjpE6bMbaN30OaIbVlyfG6NwcuIP0j+OlqgMd8FBmQgIZ0qtcQI fpobVxuRdcAnguQQF09rJHNqk6Yhgu7Zl1ozEmSdA2ja6sejhi1KJ7al09VrWsfNHMXF 3iVA== X-Gm-Message-State: AG10YOR0SfIVInmWBZ1bM8X5vokExfZkotRWwO37Lk89LgPyErR38I69yPjHJRyJ2oYZQA== X-Received: by 10.194.133.10 with SMTP id oy10mr11712040wjb.93.1454133581883; Fri, 29 Jan 2016 21:59:41 -0800 (PST) Received: from odedg-tlv.redhat.com ([77.125.92.242]) by smtp.gmail.com with ESMTPSA id t199sm1034364wmt.23.2016.01.29.21.59.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jan 2016 21:59:40 -0800 (PST) From: Oded Gabbay To: dri-devel@lists.freedesktop.org, alexdeucher@gmail.com Subject: [PATCH 1/3] drm: add helper to check for wc memory support Date: Sat, 30 Jan 2016 07:59:32 +0200 Message-Id: <1454133574-20527-1-git-send-email-oded.gabbay@gmail.com> X-Mailer: git-send-email 2.5.0 Cc: Dave Airlie , michel.daenzer@amd.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 From: Dave Airlie Signed-off-by: Dave Airlie Signed-off-by: Oded Gabbay --- include/drm/drm_cache.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/drm/drm_cache.h b/include/drm/drm_cache.h index 7bfb063..461a055 100644 --- a/include/drm/drm_cache.h +++ b/include/drm/drm_cache.h @@ -35,4 +35,13 @@ void drm_clflush_pages(struct page *pages[], unsigned long num_pages); +static inline bool drm_arch_can_wc_memory(void) +{ +#if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE) + return false; +#else + return true; +#endif +} + #endif