From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 6/6] drm/i915/icl: program mbus during pipe enable
Date: Mon, 5 Feb 2018 18:03:05 +0200 [thread overview]
Message-ID: <20180205160305.GJ5453@intel.com> (raw)
In-Reply-To: <20180205154046.11485-7-paulo.r.zanoni@intel.com>
On Mon, Feb 05, 2018 at 01:40:46PM -0200, Paulo Zanoni wrote:
> From: Mahesh Kumar <mahesh1.kumar@intel.com>
>
> This patch program default values of MBus credit during pipe enable.
>
> Changes since V2:
> - We don't need to do anything when disabling the pipe
> Changes Since V1:
> - Add WARN_ON (Paulo)
> - Remove TODO comment
> - Program 0 during pipe disable
> - Rebase
>
> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Reviewed-by: James Ausmus <james.ausmus@intel.com>
> Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index ad8d9c6c40e4..c5de5fe4e0dd 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -5418,6 +5418,23 @@ static void glk_pipe_scaler_clock_gating_wa(struct drm_i915_private *dev_priv,
> I915_WRITE(CLKGATE_DIS_PSL(pipe), val);
> }
>
> +static void icl_pipe_mbus_enable(struct intel_crtc *crtc)
> +{
> + struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
> + enum pipe pipe = crtc->pipe;
> + uint32_t val;
> +
> + if (WARN_ON(INTEL_INFO(dev_priv)->num_pipes == 0))
> + return;
That's clearly impossible. IMO these sort of super paranoid checks
are just adding noise to the code, making it harder to follow as you
may start to question your own sanity on account of not being able
to figure out how it could ever happen.
> +
> + val = MBUS_DBOX_BW_CREDIT(1) | MBUS_DBOX_A_CREDIT(2);
> +
> + /* Program B credit equally to all pipes */
> + val |= MBUS_DBOX_B_CREDIT(24 / INTEL_INFO(dev_priv)->num_pipes);
> +
> + I915_WRITE(PIPE_MBUS_DBOX_CTL(pipe), val);
> +}
> +
> static void haswell_crtc_enable(struct intel_crtc_state *pipe_config,
> struct drm_atomic_state *old_state)
> {
> @@ -5495,6 +5512,9 @@ static void haswell_crtc_enable(struct intel_crtc_state *pipe_config,
> if (dev_priv->display.initial_watermarks != NULL)
> dev_priv->display.initial_watermarks(old_intel_state, pipe_config);
>
> + if (INTEL_GEN(dev_priv) >= 11)
> + icl_pipe_mbus_enable(intel_crtc);
> +
> /* XXX: Do the pipe assertions at the right place for BXT DSI. */
> if (!transcoder_is_dsi(cpu_transcoder))
> intel_enable_pipe(pipe_config);
> --
> 2.14.3
>
> _______________________________________________
> 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:[~2018-02-05 16:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-05 15:40 [PATCH 0/6] ICL display initialization, selected patches Paulo Zanoni
2018-02-05 15:40 ` [PATCH 1/6] drm/i915/icl: add ICL support to cnl_set_procmon_ref_values Paulo Zanoni
2018-02-05 15:40 ` [PATCH 2/6] drm/i915/icl: add the main CDCLK functions Paulo Zanoni
2018-02-05 23:13 ` Ausmus, James
2018-02-06 15:29 ` Paulo Zanoni
2018-02-06 19:33 ` Paulo Zanoni
2018-02-09 17:57 ` James Ausmus
2018-02-05 15:40 ` [PATCH 3/6] drm/i915/icl: implement the display init/uninit sequences Paulo Zanoni
2018-02-05 15:40 ` [PATCH 4/6] drm/i915/icl: Enable both DBuf slices during init Paulo Zanoni
2018-02-05 15:40 ` [PATCH 5/6] drm/i915/icl: initialize MBus during display init Paulo Zanoni
2018-02-05 15:40 ` [PATCH 6/6] drm/i915/icl: program mbus during pipe enable Paulo Zanoni
2018-02-05 16:03 ` Ville Syrjälä [this message]
2018-02-05 17:21 ` Paulo Zanoni
2018-02-05 16:02 ` ✗ Fi.CI.BAT: warning for ICL display initialization, selected patches Patchwork
2018-02-05 18:01 ` ✗ Fi.CI.BAT: failure for ICL display initialization, selected patches (rev2) Patchwork
2018-02-06 19:54 ` ✗ Fi.CI.BAT: warning for ICL display initialization, selected patches (rev3) Patchwork
2018-02-08 13:34 ` Paulo Zanoni
2018-02-09 9:31 ` Tomi Sarvela
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=20180205160305.GJ5453@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@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 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.