Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp353414ybl; Tue, 7 Jan 2020 07:15:37 -0800 (PST) X-Google-Smtp-Source: APXvYqzpt0zJBGcqZaslfgIMSyJKoCEfy3ntbokrOExVgYV4i0iNaaTVNADFO2h6uA55ySo6z1l+ X-Received: by 2002:a9d:600e:: with SMTP id h14mr207331otj.113.1578410136965; Tue, 07 Jan 2020 07:15:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578410136; cv=none; d=google.com; s=arc-20160816; b=pc54mmNMsG0IMm8uVdGjbc/rk2GqIc3HmUfsVscGoI6E3FVFFcZX+YzfYNlnAGhvOL 9o0oc3ZibUEQFgJCqnVyIOHsF9MzOf/kTnAF89LSRufKlaw0ZwZiYv3I9BSWzT8USZdW PiTzyeU6l5XVFpsh2T+uYjqlYGwV8789dkerBWBrWzWBeBRY+v2VmuvnYdWaSAFTpBO/ j/DPTWqwB7ifPlwmv6yeWyPHWXMxBAoX++IpWw+znbcKdM6xGHRmDezN1q4eTlCey3GO VAZncxMrlWkl8woKSWgeqzZytQxK6MCcHOpaXv5ltIIeSoZP2OvyLNA9TuXk+nTKqm4Y nqIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0AsRjqmSddZiXaJNHfNW43Wmc9oWEosMDJEk7wL2FDo=; b=DSpMtzT8WKUL+s1JoaBBygD5xSjv2EZMwoo216/KlTpqIhCegL/O2zb7Eg46xRpfWG 4zgYtlg+XaDEtGzriJNCmiGR6cU8v0P7TfsaNi4PPPfgPNmMPayz+HfnjhE0rCkJIDzG Vw8paChiBLIfIrd2vrVt2ylD53qGHh4W4jOmvi/M6Ldis5LwV3i5X+16esnqvDUOdfL/ WUsiNTy/uNzJJ+mD4kyCFqvIdxp9J671H4ZYo9p5uLhNBGk7lAqww37lrY0VUFTnMhtO 4ZNmFDTj1LrEH4Ara/wAiBQH4xfDn6v4pcCFwZ5m5pBa1u8v+O9+LApDnpiN9uyoL9B8 YF+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YG9RW5e5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h22si16624otk.18.2020.01.07.07.15.23; Tue, 07 Jan 2020 07:15:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YG9RW5e5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728357AbgAGPNy (ORCPT + 99 others); Tue, 7 Jan 2020 10:13:54 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:34316 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728321AbgAGPNv (ORCPT ); Tue, 7 Jan 2020 10:13:51 -0500 Received: by mail-wr1-f65.google.com with SMTP id t2so54355852wrr.1 for ; Tue, 07 Jan 2020 07:13:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0AsRjqmSddZiXaJNHfNW43Wmc9oWEosMDJEk7wL2FDo=; b=YG9RW5e5joOPxoDvG6pcPCuwA5GGyBjDMtnNvp5f/ELEqUTKtwEnKSr1KC+XJFYnOz eT7E63bexxp0XZrUJ7aiQmVw4+tESSdP8UGAtPPdMAd8MIsxcnj7Jpfa84Ylv2YVUfyI c4TWnoRmaxbmfDYTVMg9WesEKPmYIj/cGE2Te8+GVnCh65PxuyOpD2RB5Br2kaIp/7WR niPNBhOheVKA5BYpw6IgR3f7mEX3tQ0SA5enxIkkxMlPPLqDXeFFzfw9UBEKMlGYJxNE rEaYaJ03vbvyNC9QVg1X5uyeULhRyfa3dIYEu1t5jQx8ZsDRySrovW7EtZ03T6je8LH8 aEwg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=0AsRjqmSddZiXaJNHfNW43Wmc9oWEosMDJEk7wL2FDo=; b=mo8h6e5oTxub5jkUkDSwb6QkRNFo82xGkUiq91gB8rcMpAEKftRL4RiF0pQVV/toDN yDvalGMWk8xS7pEdEMU38Ld6P/xMstG2F6elwTXShF1bHU2PoxvAbnTjGOwM1JK6qMIA 5oCD3VBsViUMYCYr67IuVDM9j39WNvMFn7+NWag3hKt2+yNLub5B41c8jYh/YyrxHn3H B5HeGdDPmVQCg6OqPCADJxylIOCX+hYJU4UOxVI1qV38/4kbCj2x3ijdMjgTGRfPvCGI Qt+jRqfnD5JoEbgRyylk4+BFWpv5KpYcoVTt6h7iJ5djCuDTxFSrdofXx5qdonLMfily yBCA== X-Gm-Message-State: APjAAAVKHjZjiLUMreylvGVUVm7c2Anwj4YjFFAT4i4c6AewGL8rbuQT m8XK/WsdK6HYTE3Bxi6ldiI= X-Received: by 2002:adf:e984:: with SMTP id h4mr107119108wrm.275.1578410030242; Tue, 07 Jan 2020 07:13:50 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id c4sm27076664wml.7.2020.01.07.07.13.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2020 07:13:49 -0800 (PST) From: Wambui Karuga To: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, airlied@linux.ie, daniel@ffwll.ch Cc: seanpaul@chromium.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] drm/i915: convert to using new struct drm_device logging macros Date: Tue, 7 Jan 2020 18:13:32 +0300 Message-Id: X-Mailer: git-send-email 2.24.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace the use of printk based debugging macros with the struct drm_device based logging macros in i915/intel_sideband.c. Signed-off-by: Wambui Karuga --- drivers/gpu/drm/i915/intel_sideband.c | 29 ++++++++++++++++----------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_sideband.c b/drivers/gpu/drm/i915/intel_sideband.c index e06b35b844a0..cbfb7171d62d 100644 --- a/drivers/gpu/drm/i915/intel_sideband.c +++ b/drivers/gpu/drm/i915/intel_sideband.c @@ -105,8 +105,8 @@ static int vlv_sideband_rw(struct drm_i915_private *i915, if (intel_wait_for_register(uncore, VLV_IOSF_DOORBELL_REQ, IOSF_SB_BUSY, 0, 5)) { - DRM_DEBUG_DRIVER("IOSF sideband idle wait (%s) timed out\n", - is_read ? "read" : "write"); + drm_dbg(&i915->drm, "IOSF sideband idle wait (%s) timed out\n", + is_read ? "read" : "write"); return -EAGAIN; } @@ -129,8 +129,8 @@ static int vlv_sideband_rw(struct drm_i915_private *i915, *val = intel_uncore_read_fw(uncore, VLV_IOSF_DATA); err = 0; } else { - DRM_DEBUG_DRIVER("IOSF sideband finish wait (%s) timed out\n", - is_read ? "read" : "write"); + drm_dbg(&i915->drm, "IOSF sideband finish wait (%s) timed out\n", + is_read ? "read" : "write"); err = -ETIMEDOUT; } @@ -283,7 +283,8 @@ static int intel_sbi_rw(struct drm_i915_private *i915, u16 reg, if (intel_wait_for_register_fw(uncore, SBI_CTL_STAT, SBI_BUSY, 0, 100)) { - DRM_ERROR("timeout waiting for SBI to become ready\n"); + drm_err(&i915->drm, + "timeout waiting for SBI to become ready\n"); return -EBUSY; } @@ -301,12 +302,13 @@ static int intel_sbi_rw(struct drm_i915_private *i915, u16 reg, if (__intel_wait_for_register_fw(uncore, SBI_CTL_STAT, SBI_BUSY, 0, 100, 100, &cmd)) { - DRM_ERROR("timeout waiting for SBI to complete read\n"); + drm_err(&i915->drm, + "timeout waiting for SBI to complete read\n"); return -ETIMEDOUT; } if (cmd & SBI_RESPONSE_FAIL) { - DRM_ERROR("error during SBI read of reg %x\n", reg); + drm_err(&i915->drm, "error during SBI read of reg %x\n", reg); return -ENXIO; } @@ -426,8 +428,9 @@ int sandybridge_pcode_read(struct drm_i915_private *i915, u32 mbox, mutex_unlock(&i915->sb_lock); if (err) { - DRM_DEBUG_DRIVER("warning: pcode (read from mbox %x) mailbox access failed for %ps: %d\n", - mbox, __builtin_return_address(0), err); + drm_dbg(&i915->drm, + "warning: pcode (read from mbox %x) mailbox access failed for %ps: %d\n", + mbox, __builtin_return_address(0), err); } return err; @@ -447,8 +450,9 @@ int sandybridge_pcode_write_timeout(struct drm_i915_private *i915, mutex_unlock(&i915->sb_lock); if (err) { - DRM_DEBUG_DRIVER("warning: pcode (write of 0x%08x to mbox %x) mailbox access failed for %ps: %d\n", - val, mbox, __builtin_return_address(0), err); + drm_dbg(&i915->drm, + "warning: pcode (write of 0x%08x to mbox %x) mailbox access failed for %ps: %d\n", + val, mbox, __builtin_return_address(0), err); } return err; @@ -519,7 +523,8 @@ int skl_pcode_request(struct drm_i915_private *i915, u32 mbox, u32 request, * requests, and for any quirks of the PCODE firmware that delays * the request completion. */ - DRM_DEBUG_KMS("PCODE timeout, retrying with preemption disabled\n"); + drm_dbg_kms(&i915->drm, + "PCODE timeout, retrying with preemption disabled\n"); WARN_ON_ONCE(timeout_base_ms > 3); preempt_disable(); ret = wait_for_atomic(COND, 50); -- 2.24.1