From patchwork Mon Mar 21 13:50:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 12787253 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 18327C433EF for ; Mon, 21 Mar 2022 13:51:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 923EF10E266; Mon, 21 Mar 2022 13:51:18 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id D93EE10E266 for ; Mon, 21 Mar 2022 13:51:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647870677; x=1679406677; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uYe+MthyLIiuPHh3EH/9E/9qT504nDLaD493FghwHKI=; b=Q+O80W1IicwDBim0sjVUcAfNQKyNIyRfakuVsZVvRJqY5nrua/FHLQnS jhTrw+HqSJ9r+twdW8lWRPzG2k5eB92Gnke9lK/c/kgumLwxfLNzBD4Ng T2/KwwR1a1YEKHpgg7pV/TLzGiGmORw9i4X99zNQJrKL9IO5eB/kkB5JL w+CbB3mIcUaSuMwJwdtZ7DerLnPhklM2Lx2nElcO1rKEh0xJUeO4+pbdK ahkksMc5T0uJuDHpQicLn38KwIrhfiCr9Og54S9+Tn6mjkmsspf5ePvw8 hJECCy89Kf0RPeyDhmQsnGL5PUgqeqd0nBABxmTVaH82Diz0pbdYLWS+j g==; X-IronPort-AV: E=McAfee;i="6200,9189,10292"; a="282382378" X-IronPort-AV: E=Sophos;i="5.90,198,1643702400"; d="scan'208";a="282382378" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2022 06:51:17 -0700 X-IronPort-AV: E=Sophos;i="5.90,198,1643702400"; d="scan'208";a="648570600" Received: from abhijitc-mobl.gar.corp.intel.com (HELO localhost) ([10.252.34.12]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2022 06:51:06 -0700 From: Jani Nikula To: intel-gfx@lists.freedesktop.org Date: Mon, 21 Mar 2022 15:50:32 +0200 Message-Id: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [PATCH v2 4/7] drm/i915/dmc: fix i915_reg_t usage X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jani.nikula@intel.com, Lucas De Marchi Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" i915_reg_t is supposed to be a somewhat opaque data type, not to be looked inside. Signed-off-by: Jani Nikula Reviewed-by: Lucas De Marchi --- drivers/gpu/drm/i915/display/intel_dmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c index 2e11725a0828..5de13f978e57 100644 --- a/drivers/gpu/drm/i915/display/intel_dmc.c +++ b/drivers/gpu/drm/i915/display/intel_dmc.c @@ -816,7 +816,7 @@ static int intel_dmc_debugfs_status_show(struct seq_file *m, void *unused) struct drm_i915_private *i915 = m->private; intel_wakeref_t wakeref; struct intel_dmc *dmc; - i915_reg_t dc5_reg, dc6_reg = {}; + i915_reg_t dc5_reg, dc6_reg = INVALID_MMIO_REG; if (!HAS_DMC(i915)) return -ENODEV; @@ -868,7 +868,7 @@ static int intel_dmc_debugfs_status_show(struct seq_file *m, void *unused) } seq_printf(m, "DC3 -> DC5 count: %d\n", intel_de_read(i915, dc5_reg)); - if (dc6_reg.reg) + if (i915_mmio_reg_valid(dc6_reg)) seq_printf(m, "DC5 -> DC6 count: %d\n", intel_de_read(i915, dc6_reg));