From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Mika Kahola <mika.kahola@intel.com>
Cc: intel-gfx@lists.freedesktop.org, Kahola@freedesktop.org
Subject: Re: [PATCH 2/5] drm/i915: Remove I915_MAX_PIPES dependency for DDB allocation
Date: Tue, 10 Oct 2017 12:15:47 +0300 [thread overview]
Message-ID: <20171010091547.GL10981@intel.com> (raw)
In-Reply-To: <1505375586-23015-3-git-send-email-mika.kahola@intel.com>
On Thu, Sep 14, 2017 at 10:53:03AM +0300, Mika Kahola wrote:
> From: "Kahola, Mika" <mika.kahola@intel.com>
>
> Remove dependency for I915_MAX_PIPES by replacing it with
> for_each_pipe() macro.
>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> Signed-off-by: Kahola, Mika <mika.kahola@intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 5 ++++-
> drivers/gpu/drm/i915/intel_drv.h | 3 ++-
> drivers/gpu/drm/i915/intel_pm.c | 6 ++++--
> 3 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 8599e42..7811b65 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -12220,7 +12220,10 @@ static void skl_update_crtcs(struct drm_atomic_state *state)
> if (updated & cmask || !cstate->base.active)
> continue;
>
> - if (skl_ddb_allocation_overlaps(entries, &cstate->wm.skl.ddb, i))
> + if (skl_ddb_allocation_overlaps(dev_priv,
> + entries,
> + &cstate->wm.skl.ddb,
> + i))
> continue;
>
> updated |= cmask;
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 3078076..bb61fd7 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1891,7 +1891,8 @@ int intel_enable_sagv(struct drm_i915_private *dev_priv);
> int intel_disable_sagv(struct drm_i915_private *dev_priv);
> bool skl_wm_level_equals(const struct skl_wm_level *l1,
> const struct skl_wm_level *l2);
> -bool skl_ddb_allocation_overlaps(const struct skl_ddb_entry **entries,
> +bool skl_ddb_allocation_overlaps(struct drm_i915_private *dev_priv,
> + const struct skl_ddb_entry **entries,
> const struct skl_ddb_entry *ddb,
> int ignore);
> bool ilk_disable_lp_wm(struct drm_device *dev);
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index fa9055a..7e66141 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4821,16 +4821,18 @@ static inline bool skl_ddb_entries_overlap(const struct skl_ddb_entry *a,
> return a->start < b->end && b->start < a->end;
> }
>
> -bool skl_ddb_allocation_overlaps(const struct skl_ddb_entry **entries,
> +bool skl_ddb_allocation_overlaps(struct drm_i915_private *dev_priv,
> + const struct skl_ddb_entry **entries,
> const struct skl_ddb_entry *ddb,
> int ignore)
> {
> int i;
I would change this to 'enum pipe pipe' for a bit of extra clarity.
>
> - for (i = 0; i < I915_MAX_PIPES; i++)
> + for_each_pipe(dev_priv, i) {
> if (i != ignore && entries[i] &&
> skl_ddb_entries_overlap(ddb, entries[i]))
> return true;
> + }
>
> return false;
> }
> --
> 2.7.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-10 9:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-14 7:53 [PATCH 0/5] drm/i915: Miscellaneous fixes to reduce dependency for I915_MAX_PIPES Mika Kahola
2017-09-14 7:53 ` [PATCH 1/5] drm/i915: Don't relay on I915_MAX_PIPES Mika Kahola
2017-09-14 7:53 ` [PATCH 2/5] drm/i915: Remove I915_MAX_PIPES dependency for DDB allocation Mika Kahola
2017-10-10 9:15 ` Ville Syrjälä [this message]
2017-09-14 7:53 ` [PATCH 3/5] drm/i915: Fold IRQ pipe masks Mika Kahola
2017-09-14 7:53 ` [PATCH 4/5] drm/i915: Favor for_each_pipe() macro Mika Kahola
2017-10-10 9:17 ` Ville Syrjälä
2017-09-14 7:53 ` [PATCH 5/5] drm/i915: Cleanup South Error Interrupts Mika Kahola
2017-09-14 8:10 ` ✓ Fi.CI.BAT: success for drm/i915: Miscellaneous fixes to reduce dependency for I915_MAX_PIPES Patchwork
2017-09-14 9:12 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-09-15 17:58 ` Rodrigo Vivi
2017-09-18 12:06 ` Mika Kahola
2017-09-21 10:26 ` Mika Kahola
2017-09-18 15:12 ` ✗ Fi.CI.BAT: failure " Patchwork
2017-09-19 16:05 ` Patchwork
2017-09-27 11:02 ` ✓ Fi.CI.BAT: success " Patchwork
2017-10-05 8:29 ` Patchwork
2017-10-10 8:34 ` Patchwork
2017-10-10 9:19 ` [PATCH 0/5] " Ville Syrjälä
2017-10-10 9:24 ` Mika Kahola
2017-10-10 9:20 ` Kenneth Graunke
2017-10-10 9:59 ` Mika Kahola
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=20171010091547.GL10981@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=Kahola@freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kahola@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