From patchwork Wed Oct 5 12:33:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 9362857 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3FA296075E for ; Wed, 5 Oct 2016 12:34:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 313CA287FD for ; Wed, 5 Oct 2016 12:34:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25D442893E; Wed, 5 Oct 2016 12:34:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C7FCC287FD for ; Wed, 5 Oct 2016 12:34:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1EE866E841; Wed, 5 Oct 2016 12:34:20 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id AD8256E830 for ; Wed, 5 Oct 2016 12:34:15 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id b184so24370865wma.3 for ; Wed, 05 Oct 2016 05:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ursulin-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=r9CoOCL+hVSatorQ46wfCp/QbQtHKTCL+ha/kROwl+s=; b=jVdlIAsxZNmLikGYRQsDDktwjJuuDC8TmkyhkCoDhhY+p1EFOksc3quL0cdlW1INuY GRTbtAD9T5NQoyzzocQZ3cSe3zTsFbIwbkz1BJpmLLau3GQNvwz0uKvLPcbM4OVmZJ+8 mcv6cuOOdg5PGzFqRyxYL7ag5VXOBX/BFpDOguVKQ15Q3CKVd32nMWjoaQan+k/8/Ht0 Sj3mVvC6DXwr8Ysxj6ZUY/NqTbOwMHgcIojOqoXN2MnWmxCinZR/PJNpHej2bWS01UYs Jqiy5kJ2vSMh0MFsAe79ACaEU2hjp2JClY3mh5iSW/9EZx8l8AmRlEuZDGkyWK0h6ATl n8sQ== 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:in-reply-to :references; bh=r9CoOCL+hVSatorQ46wfCp/QbQtHKTCL+ha/kROwl+s=; b=TNtIpY7hTeWsfc+0amgzrQ6NQy57DklDXzWz+ppSUYPIY/x9ka6xVjqg+mDobOXDHD M1r7hyVcb61Wlf1FQRCshJVx2iK8QSYAhFrR6EzAbhfAue5BRj6rpMwMKm2aFHZTb8+q cVtQi9O0V3u6l1Na2w0T5cX8lc8+5iXsR+ANXuvnAS4uqz4DU11ejmd+lZzLLjCNP8Cg 4pIs4SEMg3Q1CYlUjUOjw26nxmv+59swCXpRHYEimDbbnnfgBXWnBsHtQVxOiJL7EIS0 QKquE+TMbICjZ4GtynBzBcG4LnD8LK6dHeGJFvk1l7X7sX93g1PTut2iWEWr1hSkbzbn +dwg== X-Gm-Message-State: AA6/9Rm+EK8/kRA3kIgR4rmfI5fALeLKu2+cnWbfR1eKKm0DZnY8LMfwMrag+SRf+hll7Q== X-Received: by 10.194.85.106 with SMTP id g10mr7587116wjz.229.1475670853710; Wed, 05 Oct 2016 05:34:13 -0700 (PDT) Received: from e31.Home ([2a02:c7d:9b6d:e300:916a:6cab:ac67:71c2]) by smtp.gmail.com with ESMTPSA id t138sm29428317wmt.5.2016.10.05.05.34.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Oct 2016 05:34:13 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Wed, 5 Oct 2016 13:33:42 +0100 Message-Id: <1475670829-14025-16-git-send-email-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475670829-14025-1-git-send-email-tvrtko.ursulin@linux.intel.com> References: <1475670829-14025-1-git-send-email-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH 15/22] drm/i915: Make IS_SKYLAKE only take dev_priv X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 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-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin Saves 1016 bytes of .rodata strings and couple hundred of .text. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- drivers/gpu/drm/i915/intel_guc_loader.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 94651674e442..0aeed1e31c17 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -2665,7 +2665,7 @@ struct drm_i915_cmd_table { #define IS_CHERRYVIEW(dev) (INTEL_INFO(dev)->is_cherryview) #define IS_HASWELL(dev_priv) (dev_priv->info.is_haswell) #define IS_BROADWELL(dev_priv) (dev_priv->info.is_broadwell) -#define IS_SKYLAKE(dev) (INTEL_INFO(dev)->is_skylake) +#define IS_SKYLAKE(dev_priv) (dev_priv->info.is_skylake) #define IS_BROXTON(dev) (INTEL_INFO(dev)->is_broxton) #define IS_KABYLAKE(dev_priv) (dev_priv->info.is_kabylake) #define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 3246d51c7b8e..cf43a5632961 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -2133,7 +2133,7 @@ static void gtt_write_workarounds(struct drm_device *dev) I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN8_L3_LRA_1_GPGPU_DEFAULT_VALUE_BDW); else if (IS_CHERRYVIEW(dev)) I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN8_L3_LRA_1_GPGPU_DEFAULT_VALUE_CHV); - else if (IS_SKYLAKE(dev)) + else if (IS_SKYLAKE(dev_priv)) I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN9_L3_LRA_1_GPGPU_DEFAULT_VALUE_SKL); else if (IS_BROXTON(dev)) I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN9_L3_LRA_1_GPGPU_DEFAULT_VALUE_BXT); diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c index 3c46605b58e7..182204373931 100644 --- a/drivers/gpu/drm/i915/intel_guc_loader.c +++ b/drivers/gpu/drm/i915/intel_guc_loader.c @@ -726,7 +726,7 @@ void intel_guc_init(struct drm_device *dev) if (!HAS_GUC_UCODE(dev)) { fw_path = NULL; - } else if (IS_SKYLAKE(dev)) { + } else if (IS_SKYLAKE(dev_priv)) { fw_path = I915_SKL_GUC_UCODE; guc_fw->guc_fw_major_wanted = SKL_FW_MAJOR; guc_fw->guc_fw_minor_wanted = SKL_FW_MINOR;