All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Tvrtko Ursulin <tursulin@ursulin.net>, Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 04/14] drm/i915: Data driven register to forcewake domains lookup
Date: Mon, 03 Oct 2016 10:58:22 +0300	[thread overview]
Message-ID: <1475481502.3067.18.camel@linux.intel.com> (raw)
In-Reply-To: <1475257729-11283-5-git-send-email-tvrtko.ursulin@linux.intel.com>

On pe, 2016-09-30 at 18:48 +0100, Tvrtko Ursulin wrote:
> 
> +find_fw_domain(u32 offset, const struct intel_forcewake_range *ranges,
> +	       unsigned int num_ranges)

Gotta remind that generally "fw" is associated with firmware.
"forcewake" might be appropriate word in function names too.

> +{
> +	unsigned int i;
> +	struct intel_forcewake_range *entry =
> +		(struct intel_forcewake_range *)ranges;
> +
> +	for (i = 0; i < num_ranges; i++, entry++) {
> +		if (offset >= entry->start && offset <= entry->end)
> +			return entry->domains;
> +	}
> +
> +	return -1;
> +}
> 

This could be a binary search, too, with some sorting.

Already as is;

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-10-03  7:58 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-30 17:48 [PATCH v2 00/14] Forcewake binary search & code shrink Tvrtko Ursulin
2016-09-30 17:48 ` [PATCH 01/14] drm/i915: Remove redundant hsw_write* mmio functions Tvrtko Ursulin
2016-09-30 17:48 ` [PATCH 02/14] drm/i915: Keep track of active forcewake domains in a bitmask Tvrtko Ursulin
2016-09-30 17:48 ` [PATCH 03/14] drm/i915: Do not inline forcewake taking in mmio accessors Tvrtko Ursulin
2016-09-30 17:48 ` [PATCH 04/14] drm/i915: Data driven register to forcewake domains lookup Tvrtko Ursulin
2016-10-03  7:58   ` Joonas Lahtinen [this message]
2016-10-26  9:24     ` Mika Kuoppala
2016-09-30 17:48 ` [PATCH 05/14] drm/i915: Sort forcewake mapping tables Tvrtko Ursulin
2016-09-30 18:05   ` Chris Wilson
2016-10-03  8:37     ` Tvrtko Ursulin
2016-09-30 17:48 ` [PATCH 06/14] drm/i915: Use binary search when looking up forcewake domains Tvrtko Ursulin
2016-09-30 17:48 ` [PATCH 07/14] drm/i915: Eliminate Gen9 special case Tvrtko Ursulin
2016-09-30 17:48 ` [PATCH 08/14] drm/i915: Store the active forcewake range table pointer Tvrtko Ursulin
2016-10-03  8:39   ` Tvrtko Ursulin
2016-09-30 17:48 ` [PATCH 09/14] drm/i915: Remove identical macros Tvrtko Ursulin
2016-09-30 17:48 ` [PATCH 10/14] drm/i915: Remove identical mmio read functions Tvrtko Ursulin
2016-09-30 17:48 ` [PATCH 11/14] drm/i915: Remove identical write mmmio functions Tvrtko Ursulin
2016-09-30 17:48 ` [PATCH 12/14] drm/i915: Sort the shadow register table Tvrtko Ursulin
2016-10-03  8:40   ` Tvrtko Ursulin
2016-09-30 17:48 ` [PATCH 13/14] drm/i915: Use binary search when looking for shadowed registers Tvrtko Ursulin
2016-09-30 18:08   ` Chris Wilson
2016-10-03  8:05     ` Joonas Lahtinen
2016-10-03  8:33       ` Tvrtko Ursulin
2016-09-30 17:48 ` [PATCH 14/14] drm/i915: Inline binary search Tvrtko Ursulin
2016-09-30 18:09 ` [PATCH v2 00/14] Forcewake binary search & code shrink Chris Wilson
2016-09-30 18:49 ` ✗ Fi.CI.BAT: warning for Forcewake binary search & code shrink (rev3) Patchwork
2016-10-03  9:27 ` ✗ Fi.CI.BAT: warning for Forcewake binary search & code shrink (rev6) Patchwork
2016-10-04  8:46   ` Tvrtko Ursulin
2016-10-04  8:55     ` Chris Wilson
2016-10-04  9:18       ` Tvrtko Ursulin
2016-10-04  9:37         ` Joonas Lahtinen
2016-10-04 10:17           ` Tvrtko Ursulin

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=1475481502.3067.18.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=tursulin@ursulin.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.