Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1229907ybv; Thu, 6 Feb 2020 00:02:27 -0800 (PST) X-Google-Smtp-Source: APXvYqyc7z5/Zjyg47OWJaCitbmYJz+KwRx0GFdwlEXVq1O69NM0o5GIs3YYPBDHPHOquHcqvc3G X-Received: by 2002:aca:4309:: with SMTP id q9mr6141517oia.158.1580976147354; Thu, 06 Feb 2020 00:02:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580976147; cv=none; d=google.com; s=arc-20160816; b=wEc4Y6Ea2yUgY4lK73B2Bml+IAxxVXq95Odeny+/Y1G5lU1Z4+1AHSOMimmgU4cviq MUZKPZ+V4D2AZ2Od6HHlab8Go7oEAjk7SL/TrqD95+/4ZesuUoiMUkNxh4jUHJDnWUVe 7S2NdXsDeohZtrcmeXavq/cdYlwdBrxXKwAcbBx9/bo/om3sdJqInKJZRrqF++cYQjzl ClH3BJH8QAwryXpc7tGDs26x+oTaj1d2TD2GWMQDkc3Ek+jhPRji7jwdMF6k2tgpNq1a t8W1/ZqyXT9zNLU5N45JMXtsQJQWbGjVIC9sipyMPRR7wv7u6gOVk/2W+e0IXOk2E5Tw enNQ== 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=wjYTnVG7+ACFqI6Svg5/K0RXWs6QPB8w7ppawHLSitc=; b=r3JwCSDndeLTI5mWVwerj/W029CYT4aRGaAMO7J/Wbz0rKPtSV2Tnx7Kl+eNu7nL55 H1kHuusUIl3e3e7BlinXqUix7wZpTKfEmTE39CfST9sXnPProKs0XtpP3qbexqtmC7FN RHpM1ZILhDLlD/UbHdGKvQo6iroapWQ+kZm1JdHf8EKuLRWEuFgl6xG6NdFF9sIfYAn0 yzsGk1hyJt7jM47QfTvYfvS6m4r0o3KfHnXtIBM+TkpDGFOGUDTsA2sEHcgWrFi62L7x eKOrCOfxWWjGZbRzr9I1KmlNwv6ziURGCGEtNkGdAobFQgDy1a5zMu5srapxcsUP5Q4l 4ENg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=P4yfRQtA; 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 k20si1563745oiw.273.2020.02.06.00.02.14; Thu, 06 Feb 2020 00:02:27 -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=P4yfRQtA; 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 S1728401AbgBFIBC (ORCPT + 99 others); Thu, 6 Feb 2020 03:01:02 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:53146 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728386AbgBFIA7 (ORCPT ); Thu, 6 Feb 2020 03:00:59 -0500 Received: by mail-wm1-f66.google.com with SMTP id p9so5181923wmc.2 for ; Thu, 06 Feb 2020 00:00:57 -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=wjYTnVG7+ACFqI6Svg5/K0RXWs6QPB8w7ppawHLSitc=; b=P4yfRQtAB4VabCdxENb0Uuh8NGyU7hCdvSuzBRSnhUl2oapF/b4yecb4bpoNC031az 5zJMosZmH6+xKQpUd/M5/b1fzvp62tCe7is56i1ITXbZdrcy+lx8x45rcliQKpPQlnl/ nFZntTVdS2L2FcMeOGzGpvz8aQOayO0Of1ZFB9s+FSxcaVR4cXKeDO2C5me3G65KxJeB mr4rjQMRKY2Ka2tVBF8V+8nediKPrIEWkCAZSJynA5NrQ4fVPM2KtAkSXuGwmHvLkcsn F1jDWPV9R0C5RgqAalhxKcJeddI1/g1vaxzyp65ui7sPrc3s+HcHTd/AdEcnPiZqi7qF /QRA== 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=wjYTnVG7+ACFqI6Svg5/K0RXWs6QPB8w7ppawHLSitc=; b=eg3oUhtYEDlfRx6rgJUyovn6vX1o3RAuQISFxYaWtiMfjJsC8T6iv5t+G3EG2VAKK2 YkBCaJ/uVd41jIqYrbqXKkt9ee//kFFy9QVUtGIrbo150G56fXA00ZqOoJ+HjQobIwNz /xflUokRT2aeIuOvqGWlDegG3FWh/Mm4l+3gWaBqjLrQIRWPPdx57kRkHHzruJnOkWcz 3/qlBRMPH0ShQgHuSCpDuBz2CW3dwl/2BMX4zdZxmPlMyCfBLw89Oua5XaxL6fa/qnc4 l79XDa6VB15cc+OSlXn1AtcSmBz/DLF1h9OpZQHp0bVr7X+oulUeG/pyHC2KXgiuOX7e SS4w== X-Gm-Message-State: APjAAAUYTNXdoiVWQZjopJbT3ttpFXsn7fL0LKUZvmr+207+hlwOX3/T ckIqoBVXobYTl/Zqc9nLXlE= X-Received: by 2002:a7b:c3d1:: with SMTP id t17mr2879567wmj.27.1580976056631; Thu, 06 Feb 2020 00:00:56 -0800 (PST) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id u8sm2635132wmm.15.2020.02.06.00.00.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2020 00:00:56 -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: sean@poorly.run, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 09/12] drm/i915/dp_mst: convert to drm_device based logging macros. Date: Thu, 6 Feb 2020 11:00:10 +0300 Message-Id: <20200206080014.13759-10-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200206080014.13759-1-wambui.karugax@gmail.com> References: <20200206080014.13759-1-wambui.karugax@gmail.com> 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 Conversion of instances of the printk based drm logging macros to the struct drm_device based logging macros in i915/display/intel_dp_mst.c. This also involves extracting the drm_i915_private device pointer from various intel types to use in the macros. Signed-off-by: Wambui Karuga --- drivers/gpu/drm/i915/display/intel_dp_mst.c | 30 ++++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c index b8aee506d595..45028faa4409 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c @@ -42,6 +42,7 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder, struct drm_connector_state *conn_state, struct link_config_limits *limits) { + struct drm_i915_private *i915 = to_i915(encoder->base.dev); struct drm_atomic_state *state = crtc_state->uapi.state; struct intel_dp_mst_encoder *intel_mst = enc_to_mst(encoder); struct intel_dp *intel_dp = &intel_mst->primary->dp; @@ -73,7 +74,8 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder, } if (slots < 0) { - DRM_DEBUG_KMS("failed finding vcpi slots:%d\n", slots); + drm_dbg_kms(&i915->drm, + "failed finding vcpi slots:%d\n", slots); return slots; } @@ -322,15 +324,18 @@ static void intel_mst_disable_dp(struct intel_encoder *encoder, struct intel_dp *intel_dp = &intel_dig_port->dp; struct intel_connector *connector = to_intel_connector(old_conn_state->connector); + struct drm_i915_private *i915 = to_i915(encoder->base.dev); int ret; - DRM_DEBUG_KMS("active links %d\n", intel_dp->active_mst_links); + drm_dbg_kms(&i915->drm, + "active links %d\n", intel_dp->active_mst_links); drm_dp_mst_reset_vcpi_slots(&intel_dp->mst_mgr, connector->port); ret = drm_dp_update_payload_part1(&intel_dp->mst_mgr); if (ret) { - DRM_DEBUG_KMS("failed to update payload %d\n", ret); + drm_dbg_kms(&i915->drm, + "failed to update payload %d\n", ret); } if (old_crtc_state->has_audio) intel_audio_codec_disable(encoder, @@ -371,7 +376,8 @@ static void intel_mst_post_disable_dp(struct intel_encoder *encoder, if (intel_de_wait_for_set(dev_priv, intel_dp->regs.dp_tp_status, DP_TP_STATUS_ACT_SENT, 1)) - DRM_ERROR("Timed out waiting for ACT sent when disabling\n"); + drm_err(&dev_priv->drm, + "Timed out waiting for ACT sent when disabling\n"); drm_dp_check_act_status(&intel_dp->mst_mgr); drm_dp_mst_deallocate_vcpi(&intel_dp->mst_mgr, connector->port); @@ -405,7 +411,8 @@ static void intel_mst_post_disable_dp(struct intel_encoder *encoder, intel_dig_port->base.post_disable(&intel_dig_port->base, old_crtc_state, NULL); - DRM_DEBUG_KMS("active links %d\n", intel_dp->active_mst_links); + drm_dbg_kms(&dev_priv->drm, "active links %d\n", + intel_dp->active_mst_links); } static void intel_mst_pre_pll_enable_dp(struct intel_encoder *encoder, @@ -445,7 +452,8 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder, INTEL_GEN(dev_priv) >= 12 && first_mst_stream && !intel_dp_mst_is_master_trans(pipe_config)); - DRM_DEBUG_KMS("active links %d\n", intel_dp->active_mst_links); + drm_dbg_kms(&dev_priv->drm, "active links %d\n", + intel_dp->active_mst_links); if (first_mst_stream) intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON); @@ -461,7 +469,7 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder, pipe_config->pbn, pipe_config->dp_m_n.tu); if (!ret) - DRM_ERROR("failed to allocate vcpi\n"); + drm_err(&dev_priv->drm, "failed to allocate vcpi\n"); intel_dp->active_mst_links++; temp = intel_de_read(dev_priv, intel_dp->regs.dp_tp_status); @@ -491,11 +499,12 @@ static void intel_mst_enable_dp(struct intel_encoder *encoder, struct intel_dp *intel_dp = &intel_dig_port->dp; struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); - DRM_DEBUG_KMS("active links %d\n", intel_dp->active_mst_links); + drm_dbg_kms(&dev_priv->drm, "active links %d\n", + intel_dp->active_mst_links); if (intel_de_wait_for_set(dev_priv, intel_dp->regs.dp_tp_status, DP_TP_STATUS_ACT_SENT, 1)) - DRM_ERROR("Timed out waiting for ACT sent\n"); + drm_err(&dev_priv->drm, "Timed out waiting for ACT sent\n"); drm_dp_check_act_status(&intel_dp->mst_mgr); @@ -727,7 +736,8 @@ static void intel_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr, { struct drm_i915_private *dev_priv = to_i915(connector->dev); - DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id, connector->name); + drm_dbg_kms(&dev_priv->drm, "[CONNECTOR:%d:%s]\n", connector->base.id, + connector->name); drm_connector_unregister(connector); if (dev_priv->fbdev) -- 2.25.0