Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 4/8] drm/i915/dmc: fix i915_reg_t usage
Date: Fri, 18 Mar 2022 11:21:11 +0200	[thread overview]
Message-ID: <875yobmxa0.fsf@intel.com> (raw)
In-Reply-To: <20220317194334.ejfuyyzuwgpf545v@ldmartin-desk2>

On Thu, 17 Mar 2022, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> On Thu, Mar 17, 2022 at 08:36:16PM +0200, Jani Nikula wrote:
>>i915_reg_t is supposed to be a somewhat opaque data type, not to be
>>looked inside.
>>
>>Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
>
> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
>
> but maybe also already clean up the remaining one?
>
> $ git grep "i915_reg_t.*= *{ *}"
> drivers/gpu/drm/i915/display/intel_display_debugfs.c:   i915_reg_t dc5_reg, dc6_reg = {};

So that's the one being fixed here.

> drivers/gpu/drm/i915/gt/intel_ring_submission.c:                        i915_reg_t last_reg = {}; /* keep gcc quiet */

I'll send a separate fix for that, not part of this series.

Thanks,
Jani.

>
> 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));
>>
>>-- 
>>2.30.2
>>

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2022-03-18  9:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-17 18:36 [Intel-gfx] [PATCH 0/8] drm/i915/dmc: cleanups Jani Nikula
2022-03-17 18:36 ` [Intel-gfx] [PATCH 1/8] drm/i915/dmc: simplify intel_dmc_load_program() conditions Jani Nikula
2022-03-17 19:35   ` Lucas De Marchi
2022-03-17 18:36 ` [Intel-gfx] [PATCH 2/8] drm/i915/dmc: move assert_dmc_loaded() to intel_dmc.c Jani Nikula
2022-03-17 19:36   ` Lucas De Marchi
2022-03-18  9:19     ` Jani Nikula
2022-03-18 14:49       ` Lucas De Marchi
2022-03-17 18:36 ` [Intel-gfx] [PATCH 3/8] drm/i915/dmc: move dmc debugfs " Jani Nikula
2022-03-17 19:41   ` Lucas De Marchi
2022-03-17 18:36 ` [Intel-gfx] [PATCH 4/8] drm/i915/dmc: fix i915_reg_t usage Jani Nikula
2022-03-17 19:43   ` Lucas De Marchi
2022-03-18  9:21     ` Jani Nikula [this message]
2022-03-17 18:36 ` [Intel-gfx] [PATCH 5/8] drm/i915/dmc: don't register DMC debugfs file if there's no DMC Jani Nikula
2022-03-17 19:55   ` Lucas De Marchi
2022-03-18  9:22     ` Jani Nikula
2022-03-17 18:36 ` [Intel-gfx] [PATCH 6/8] drm/i915/dmc: abstract GPU error state dump Jani Nikula
2022-03-17 19:56   ` Lucas De Marchi
2022-03-17 18:36 ` [Intel-gfx] [PATCH 7/8] drm/i915/dmc: hide DMC version macros Jani Nikula
2022-03-17 19:57   ` Lucas De Marchi
2022-03-17 18:36 ` [Intel-gfx] [PATCH 8/8] drm/i915/dmc: split out dmc registers to a separate file Jani Nikula
2022-03-17 19:59   ` Lucas De Marchi
2022-03-17 20:36 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dmc: cleanups Patchwork
2022-03-17 20:37 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-03-17 21:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-03-18  1:15 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875yobmxa0.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox