Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915/uncore: hide uncore forcewake iterators
Date: Thu, 26 Nov 2026 10:19:43 +0200	[thread overview]
Message-ID: <4e57a575d6cace44edf6cdd2e11b0bd8ec09c428@intel.com> (raw)
In-Reply-To: <awbpx5Rcrc677txa@intel.com>

On Wed, 25 Nov 2026, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Wed, Nov 25, 2026 at 11:12:11AM +0200, Jani Nikula wrote:
>> On Tue, 24 Nov 2026, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
>> > On Tue, Nov 24, 2026 at 08:14:05PM +0200, Jani Nikula wrote:
>> >> There are no users of for_each_fw_domain_masked() and
>> >> for_each_fw_domain() left outside of intel_uncore.c. Hide them from the
>> >> rest of the driver.
>> >> 
>> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> >> ---
>> >>  drivers/gpu/drm/i915/intel_uncore.c | 8 ++++++++
>> >>  drivers/gpu/drm/i915/intel_uncore.h | 8 --------
>> >>  2 files changed, 8 insertions(+), 8 deletions(-)
>> >> 
>> >> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
>> >> index 02f6000b203e..cefcec468963 100644
>> >> --- a/drivers/gpu/drm/i915/intel_uncore.c
>> >> +++ b/drivers/gpu/drm/i915/intel_uncore.c
>> >> @@ -42,6 +42,14 @@
>> >>  #define FORCEWAKE_ACK_TIMEOUT_MS 50
>> >>  #define GT_FIFO_TIMEOUT_MS	 10
>> >>  
>> >> +/* Iterate over initialised fw domains */
>> >> +#define for_each_fw_domain_masked(domain__, mask__, uncore__, tmp__) \
>> >> +	for (tmp__ = (mask__); tmp__ ;) \
>> >> +		for_each_if(domain__ = (uncore__)->fw_domain[__mask_next_bit(tmp__)])
>> >> +
>> >> +#define for_each_fw_domain(domain__, uncore__, tmp__) \
>> >> +	for_each_fw_domain_masked(domain__, (uncore__)->fw_domains, uncore__, tmp__)
>> >> +
>> >
>> > Selftests use these. Do they include the whole .c file or something?
>> 
>> Yes. I hate it, but I'm dodging that battle.
>
> Hmm, yeah looks like the normal file includes the selftest file
> at the end. I was first looking for the opposite and was confused 
> when I didn't find it.
>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Thanks, both pushed to din.

>
>> 
>> >
>> >>  struct intel_uncore *to_intel_uncore(struct drm_device *drm)
>> >>  {
>> >>  	return &to_i915(drm)->uncore;
>> >> diff --git a/drivers/gpu/drm/i915/intel_uncore.h b/drivers/gpu/drm/i915/intel_uncore.h
>> >> index d5de6a172ff3..1819c9430181 100644
>> >> --- a/drivers/gpu/drm/i915/intel_uncore.h
>> >> +++ b/drivers/gpu/drm/i915/intel_uncore.h
>> >> @@ -175,14 +175,6 @@ struct intel_uncore {
>> >>  	unsigned int user_forcewake_count;
>> >>  };
>> >>  
>> >> -/* Iterate over initialised fw domains */
>> >> -#define for_each_fw_domain_masked(domain__, mask__, uncore__, tmp__) \
>> >> -	for (tmp__ = (mask__); tmp__ ;) \
>> >> -		for_each_if(domain__ = (uncore__)->fw_domain[__mask_next_bit(tmp__)])
>> >> -
>> >> -#define for_each_fw_domain(domain__, uncore__, tmp__) \
>> >> -	for_each_fw_domain_masked(domain__, (uncore__)->fw_domains, uncore__, tmp__)
>> >> -
>> >>  static inline bool
>> >>  intel_uncore_has_forcewake(const struct intel_uncore *uncore)
>> >>  {
>> >> -- 
>> >> 2.47.3
>> 
>> -- 
>> Jani Nikula, Intel

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-11-26  8:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 18:14 [PATCH 1/2] drm/i915/uncore: abstract intel_uncore_fw_domains_show() Jani Nikula
2026-11-24 18:14 ` [PATCH 2/2] drm/i915/uncore: hide uncore forcewake iterators Jani Nikula
2026-11-24 19:59   ` Ville Syrjälä
2026-11-25  9:12     ` Jani Nikula
2026-11-25 13:59       ` Ville Syrjälä
2026-11-26  8:19         ` Jani Nikula [this message]
2026-11-24 19:56 ` [PATCH 1/2] drm/i915/uncore: abstract intel_uncore_fw_domains_show() Ville Syrjälä
2026-11-25  5:29 ` ✓ i915.CI.BAT: success for series starting with [1/2] " Patchwork
2026-11-25  5:30 ` Patchwork
2026-11-25  5:31 ` Patchwork
2026-11-25  5:32 ` Patchwork
2026-11-26  1:22 ` ✓ i915.CI.Full: " 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=4e57a575d6cace44edf6cdd2e11b0bd8ec09c428@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.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