From patchwork Wed Mar 21 10:32:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10299125 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 6016E60349 for ; Wed, 21 Mar 2018 10:32:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5110D29767 for ; Wed, 21 Mar 2018 10:32:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 45BFD2976F; Wed, 21 Mar 2018 10:32:42 +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 BA80829767 for ; Wed, 21 Mar 2018 10:32:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A2D816E8DD; Wed, 21 Mar 2018 10:32:40 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 68F0A6E8DD for ; Wed, 21 Mar 2018 10:32:39 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id t7so8721947wmh.5 for ; Wed, 21 Mar 2018 03:32:39 -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; bh=nlS7SpFarzgfyuxPEsQaSjGPe0vrW8aztTvMABsScyY=; b=j63qjAeiS03UJSQz7OPnSjSaI4JrpMV9J1sVC3WepsirUSvz3U86Yf/yeBgT5moIFX AwN4F77tIaME075KWJsW+ULpXfiUrZTpvWLuECq2nUZ8SRNZI9TegoG+X7iJSMEA66bp F50RBIDEkZtG4xpLL+Hg1MLcgefdK5/pR1YimL6BXqPbu68fo1q16lSD8dZT8HQqduLs JJ75JB/zLviDJ0WefL3iQRIBEbgY7h8+vI1yF2RyskiGqlwO7dpgIqkxVoH1XsjjYtpr VSAvWuvTqrGGsmpFyRlZ2y+XJ8OU2XRWnelWrRSzAUoh6QokhsD2LtnyEvrRJmfuHl8y aP+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=nlS7SpFarzgfyuxPEsQaSjGPe0vrW8aztTvMABsScyY=; b=tLNcp0HfODWEq10wiZDt0CnjQqFdJ2SJtndt+X8TtL9PdlvmAHN6+Lt0oLFDznS/XC H3wVOXldYDmnHz0aesl+WZUQJ0VjZbuXXDoKA9AnvxwLEXypTzhNvONPYlbj6mxZejlu uj+jYQn+3FdVtklESILSXlR1kxY73oaQ6A/3R7kMLT9KEvt/nN5Rd4CcfD2u2pVayACK CoMjG6bmsmImIy6WFvEa6qQDEkmmeDLhZE82eHwDrUqCHRmk184JkCpr+HGYLRCP9MxA aGaJDsighxrZ5BtBNNiPWmVSU/B3s6BSF34jjf9unbRF7/7Vi0QoUXl7QfQ3WyGSu0Mz tUqQ== X-Gm-Message-State: AElRT7F0PUQo8hLE14iAGsZhsF9tZcoM8m8+lltNzTX8SBlsKJNLppdu NKa7YcLSnk923J62wfCzBSVnKHd8 X-Google-Smtp-Source: AG47ELv+u7GY9MILPpgKgDiUCq+FBAqydyF6+i7TQRQoS0NEufdNVZU74UyXVJl4nSRNlxqvQLAGQQ== X-Received: by 10.28.26.73 with SMTP id a70mr869630wma.30.1521628357752; Wed, 21 Mar 2018 03:32:37 -0700 (PDT) Received: from localhost.localdomain ([95.146.144.186]) by smtp.gmail.com with ESMTPSA id 74sm4069069wmf.26.2018.03.21.03.32.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Mar 2018 03:32:37 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Wed, 21 Mar 2018 10:32:28 +0000 Message-Id: <20180321103228.32205-1-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.14.1 Subject: [Intel-gfx] [PATCH] drm/i915: Skip logging impossible slices X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 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 Log up to sseu->max_slices instead basing on ARRAY_SIZE since to avoid printing impossible and empty slices for a platform. Also compact slice total and slice mask into one log line. Signed-off-by: Tvrtko Ursulin Cc: Lionel Landwerlin Reviewed-by: Lionel Landwerlin --- drivers/gpu/drm/i915/intel_device_info.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c index 4babfc6ee45b..68aa9746d0e1 100644 --- a/drivers/gpu/drm/i915/intel_device_info.c +++ b/drivers/gpu/drm/i915/intel_device_info.c @@ -83,11 +83,11 @@ static void sseu_dump(const struct sseu_dev_info *sseu, struct drm_printer *p) { int s; - drm_printf(p, "slice mask: %04x\n", sseu->slice_mask); - drm_printf(p, "slice total: %u\n", hweight8(sseu->slice_mask)); + drm_printf(p, "slice total: %u, mask=%04x\n", + hweight8(sseu->slice_mask), sseu->slice_mask); drm_printf(p, "subslice total: %u\n", sseu_subslice_total(sseu)); - for (s = 0; s < ARRAY_SIZE(sseu->subslice_mask); s++) { - drm_printf(p, "slice%d %u subslices mask=%04x\n", + for (s = 0; s < sseu->max_slices; s++) { + drm_printf(p, "slice%d: %u subslices, mask=%04x\n", s, hweight8(sseu->subslice_mask[s]), sseu->subslice_mask[s]); }