From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47F54C433FE for ; Tue, 12 Oct 2021 16:43:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0E72160F21 for ; Tue, 12 Oct 2021 16:43:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0E72160F21 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B302F89CDF; Tue, 12 Oct 2021 16:43:51 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id EA75B89CDD; Tue, 12 Oct 2021 16:43:49 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10135"; a="214355397" X-IronPort-AV: E=Sophos;i="5.85,368,1624345200"; d="scan'208";a="214355397" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2021 09:43:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,368,1624345200"; d="scan'208";a="591835608" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by orsmga004.jf.intel.com with ESMTP; 12 Oct 2021 09:43:43 -0700 Received: from [10.252.61.52] (mwajdecz-MOBL.ger.corp.intel.com [10.252.61.52]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 19CGhfqs018221; Tue, 12 Oct 2021 17:43:41 +0100 Message-ID: <3ec1e43b-8697-4eb6-fe31-dc75c325c79f@intel.com> Date: Tue, 12 Oct 2021 18:43:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.2.0 Subject: Re: [Intel-gfx] [PATCH 1/4] drm/i915/huc: Use i915_probe_error to report early CTB failures Content-Language: en-US To: Jani Nikula , Matthew Brost , Thanneeru Srinivasulu Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Joonas Lahtinen References: <20211011152106.3424810-1-thanneeru.srinivasulu@intel.com> <20211011152106.3424810-2-thanneeru.srinivasulu@intel.com> <20211011181056.GA6310@jons-linux-dev-box> <874k9mz0a6.fsf@intel.com> From: Michal Wajdeczko In-Reply-To: <874k9mz0a6.fsf@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 12.10.2021 18:16, Jani Nikula wrote: > On Mon, 11 Oct 2021, Matthew Brost wrote: >> On Mon, Oct 11, 2021 at 08:51:03PM +0530, Thanneeru Srinivasulu wrote: >>> Replace DRM_ERROR with CT_PROBE_ERROR to report early CTB failures. >>> >>> Signed-off-by: Thanneeru Srinivasulu >> >> Reviewed-by: Matthew Brost >> >>> --- >>> drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c >>> index 0a3504bc0b61..83764db0fd6d 100644 >>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c >>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c >>> @@ -191,8 +191,8 @@ static int ct_register_buffer(struct intel_guc_ct *ct, u32 type, >>> err = guc_action_register_ct_buffer(ct_to_guc(ct), type, >>> desc_addr, buff_addr, size); >>> if (unlikely(err)) >>> - CT_ERROR(ct, "Failed to register %s buffer (%pe)\n", >>> - guc_ct_buffer_type_to_str(type), ERR_PTR(err)); >>> + CT_PROBE_ERROR(ct, "Failed to register %s buffer (%pe)\n", >>> + guc_ct_buffer_type_to_str(type), ERR_PTR(err)); > > Please tell me why we are adding not just i915-specific logging helpers, > but file specific ones? > > To be honest I'd like to see all of the CT_ERROR, CT_DEBUG, > CT_PROBE_ERROR macros just gone. the reason for CT_DEBUG is that it can be quite noisy so we must have an easy option to compile it out on non-debug configs, can't just replace that helper with drm_dbg or i915_dbg (that we don't have) as it will be available likely on I915_DEBUG config, while we want more fine control. use of file (or component) level helpers allows us to simplify the code (no need to repeat long i915->drm lookup from component pointer) and we may provide common prefix and/or classification of the messages. extra bonus, especially useful after introduction of multi-gt support, will be possibility of augmenting message to include gt identifier, without the need to update all existing places if they were using i915- or drm- level functions directly. for this last feature, likely "gt" specific intel_gt_err|probe_err|dbg helpers will do the job as well, so if someone introduce them, I'm happy to convert CT_ERROR calls to these new helpers if really really needed. -Michal > > > BR, > Jani. > > >>> return err; >>> } >>> >>> -- >>> 2.25.1 >>> >