From: "Lisovskiy, Stanislav" <stanislav.lisovskiy@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH v19 3/8] drm/i915: Add intel_bw_get_*_state helpers
Date: Fri, 13 Mar 2020 08:49:30 +0000 [thread overview]
Message-ID: <9ffa74c26bc349aab1bd2fe8f427f451@intel.com> (raw)
In-Reply-To: <20200311160854.GB13686@intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 4236 bytes --]
>> Add correspondent helpers to be able to get old/new bandwidth
>> global state object.
>>
>> v2: - Fixed typo in function call
>> v3: - Changed new functions naming to use convention proposed
>> by Jani Nikula, i.e intel_bw_* in intel_bw.c file.
>Still nak on the rename.
Cool. Discuss it with Jani Nikula then, to have at least some common strategy on how to be picky on me.
Best Regards,
Lisovskiy Stanislav
________________________________
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Sent: Wednesday, March 11, 2020 6:08:54 PM
To: Lisovskiy, Stanislav
Cc: intel-gfx@lists.freedesktop.org; Ausmus, James; Saarinen, Jani; Roper, Matthew D
Subject: Re: [PATCH v19 3/8] drm/i915: Add intel_bw_get_*_state helpers
On Mon, Mar 09, 2020 at 06:11:59PM +0200, Stanislav Lisovskiy wrote:
> Add correspondent helpers to be able to get old/new bandwidth
> global state object.
>
> v2: - Fixed typo in function call
> v3: - Changed new functions naming to use convention proposed
> by Jani Nikula, i.e intel_bw_* in intel_bw.c file.
Still nak on the rename.
>
> Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_bw.c | 33 ++++++++++++++++++++++---
> drivers/gpu/drm/i915/display/intel_bw.h | 9 +++++++
> 2 files changed, 39 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gpu/drm/i915/display/intel_bw.c
> index 58b264bc318d..bdad7476dc7b 100644
> --- a/drivers/gpu/drm/i915/display/intel_bw.c
> +++ b/drivers/gpu/drm/i915/display/intel_bw.c
> @@ -374,8 +374,35 @@ static unsigned int intel_bw_data_rate(struct drm_i915_private *dev_priv,
> return data_rate;
> }
>
> -static struct intel_bw_state *
> -intel_atomic_get_bw_state(struct intel_atomic_state *state)
> +struct intel_bw_state *
> +intel_bw_get_old_state(struct intel_atomic_state *state)
> +{
> + struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> + struct intel_global_state *bw_state;
> +
> + bw_state = intel_atomic_get_old_global_obj_state(state, &dev_priv->bw_obj);
> + if (IS_ERR(bw_state))
> + return ERR_CAST(bw_state);
> +
> + return to_intel_bw_state(bw_state);
> +}
> +
> +struct intel_bw_state *
> +intel_bw_get_new_state(struct intel_atomic_state *state)
> +{
> + struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> + struct intel_global_state *bw_state;
> +
> + bw_state = intel_atomic_get_new_global_obj_state(state, &dev_priv->bw_obj);
> +
> + if (IS_ERR(bw_state))
> + return ERR_CAST(bw_state);
> +
> + return to_intel_bw_state(bw_state);
> +}
> +
> +struct intel_bw_state *
> +intel_bw_get_state(struct intel_atomic_state *state)
> {
> struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> struct intel_global_state *bw_state;
> @@ -420,7 +447,7 @@ int intel_bw_atomic_check(struct intel_atomic_state *state)
> old_active_planes == new_active_planes)
> continue;
>
> - bw_state = intel_atomic_get_bw_state(state);
> + bw_state = intel_bw_get_state(state);
> if (IS_ERR(bw_state))
> return PTR_ERR(bw_state);
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bw.h b/drivers/gpu/drm/i915/display/intel_bw.h
> index a8aa7624c5aa..b5f61463922f 100644
> --- a/drivers/gpu/drm/i915/display/intel_bw.h
> +++ b/drivers/gpu/drm/i915/display/intel_bw.h
> @@ -24,6 +24,15 @@ struct intel_bw_state {
>
> #define to_intel_bw_state(x) container_of((x), struct intel_bw_state, base)
>
> +struct intel_bw_state *
> +intel_bw_get_old_state(struct intel_atomic_state *state);
> +
> +struct intel_bw_state *
> +intel_bw_get_new_state(struct intel_atomic_state *state);
> +
> +struct intel_bw_state *
> +intel_bw_get_state(struct intel_atomic_state *state);
> +
> void intel_bw_init_hw(struct drm_i915_private *dev_priv);
> int intel_bw_init(struct drm_i915_private *dev_priv);
> int intel_bw_atomic_check(struct intel_atomic_state *state);
> --
> 2.24.1.485.gad05a3d8e5
--
Ville Syrjälä
Intel
[-- Attachment #1.2: Type: text/html, Size: 8827 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-03-13 8:49 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-09 16:11 [Intel-gfx] [PATCH v19 0/8] Refactor Gen11+ SAGV support Stanislav Lisovskiy
2020-03-09 16:11 ` [Intel-gfx] [PATCH v19 1/8] drm/i915: Start passing latency as parameter Stanislav Lisovskiy
2020-03-10 14:32 ` Ville Syrjälä
2020-03-10 14:54 ` Lisovskiy, Stanislav
2020-03-10 20:44 ` Ville Syrjälä
2020-03-11 9:16 ` Stanislav Lisovskiy
2020-03-09 16:11 ` [Intel-gfx] [PATCH v19 2/8] drm/i915: Introduce skl_plane_wm_level accessor Stanislav Lisovskiy
[not found] ` <20200311160727.GA13686@intel.com>
2020-03-13 8:42 ` Lisovskiy, Stanislav
2020-03-09 16:11 ` [Intel-gfx] [PATCH v19 3/8] drm/i915: Add intel_bw_get_*_state helpers Stanislav Lisovskiy
[not found] ` <20200311160854.GB13686@intel.com>
2020-03-13 8:49 ` Lisovskiy, Stanislav [this message]
2020-03-13 13:26 ` Ville Syrjälä
2020-03-13 13:57 ` Lisovskiy, Stanislav
2020-03-13 14:14 ` Ville Syrjälä
2020-03-09 16:12 ` [Intel-gfx] [PATCH v19 4/8] drm/i915: Refactor intel_can_enable_sagv Stanislav Lisovskiy
2020-03-11 9:13 ` Stanislav Lisovskiy
[not found] ` <20200311163130.GC13686@intel.com>
2020-03-18 11:52 ` Lisovskiy, Stanislav
2020-03-18 12:50 ` Ville Syrjälä
2020-03-19 13:09 ` Lisovskiy, Stanislav
2020-03-20 12:51 ` Lisovskiy, Stanislav
2020-03-23 14:18 ` Ville Syrjälä
2020-03-23 14:36 ` Lisovskiy, Stanislav
2020-03-23 14:50 ` Ville Syrjälä
2020-03-23 14:58 ` Lisovskiy, Stanislav
2020-03-09 16:12 ` [Intel-gfx] [PATCH v19 5/8] drm/i915: Added required new PCode commands Stanislav Lisovskiy
2020-03-09 16:12 ` [Intel-gfx] [PATCH v19 6/8] drm/i915: Rename bw_state to new_bw_state Stanislav Lisovskiy
2020-03-09 16:12 ` [Intel-gfx] [PATCH v19 7/8] drm/i915: Restrict qgv points which don't have enough bandwidth Stanislav Lisovskiy
2020-03-09 16:12 ` [Intel-gfx] [PATCH v19 8/8] drm/i915: Enable SAGV support for Gen12 Stanislav Lisovskiy
2020-03-09 16:42 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Refactor Gen11+ SAGV support Patchwork
2020-03-10 13:58 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2020-03-11 12:54 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for Refactor Gen11+ SAGV support (rev3) Patchwork
2020-03-11 14:20 ` Lisovskiy, Stanislav
2020-03-11 19:36 ` [Intel-gfx] ✓ Fi.CI.BAT: success for Refactor Gen11+ SAGV support (rev4) 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=9ffa74c26bc349aab1bd2fe8f427f451@intel.com \
--to=stanislav.lisovskiy@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