From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
dri-devel@lists.freedesktop.org,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 3/4] drm/i915/dsi: Move vlv/icl_dphy_param_init call out of intel_dsi_vbt_init
Date: Tue, 4 Jun 2019 20:35:33 +0300 [thread overview]
Message-ID: <20190604173533.GI5942@intel.com> (raw)
In-Reply-To: <20190524163020.17099-4-hdegoede@redhat.com>
On Fri, May 24, 2019 at 06:30:19PM +0200, Hans de Goede wrote:
> The vlv/icl_dphy_param_init calls do various calculations to set dphy
> parameters based on the pclk.
>
> Move the calling of vlv/icl_dphy_param_init to vlv_dsi_init to give
> vlv_dsi_init a chance to tweak the pclk before these calculations are done.
>
> This also removes the single "if (IS_ICELAKE(dev_priv))" check from
> intel_dsi_vbt_init making it fully platform agnostic.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> drivers/gpu/drm/i915/icl_dsi.c | 1 +
> drivers/gpu/drm/i915/intel_dsi.h | 2 ++
> drivers/gpu/drm/i915/intel_dsi_vbt.c | 9 ++-------
> drivers/gpu/drm/i915/vlv_dsi.c | 2 ++
> 4 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/icl_dsi.c b/drivers/gpu/drm/i915/icl_dsi.c
> index 9d962ea1e635..0f43ef07efec 100644
> --- a/drivers/gpu/drm/i915/icl_dsi.c
> +++ b/drivers/gpu/drm/i915/icl_dsi.c
> @@ -1455,6 +1455,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)
> goto err;
> }
>
> + icl_dphy_param_init(intel_dsi);
I think we should move the entire function into this file.
> return;
>
> err:
> diff --git a/drivers/gpu/drm/i915/intel_dsi.h b/drivers/gpu/drm/i915/intel_dsi.h
> index 705a609050c0..a58d3d988d9f 100644
> --- a/drivers/gpu/drm/i915/intel_dsi.h
> +++ b/drivers/gpu/drm/i915/intel_dsi.h
> @@ -192,5 +192,7 @@ bool intel_dsi_vbt_init(struct intel_dsi *intel_dsi, u16 panel_id);
> void intel_dsi_vbt_exec_sequence(struct intel_dsi *intel_dsi,
> enum mipi_seq seq_id);
> void intel_dsi_msleep(struct intel_dsi *intel_dsi, int msec);
> +void icl_dphy_param_init(struct intel_dsi *intel_dsi);
> +void vlv_dphy_param_init(struct intel_dsi *intel_dsi);
>
> #endif /* _INTEL_DSI_H */
> diff --git a/drivers/gpu/drm/i915/intel_dsi_vbt.c b/drivers/gpu/drm/i915/intel_dsi_vbt.c
> index 3448e8d51057..022bf59418df 100644
> --- a/drivers/gpu/drm/i915/intel_dsi_vbt.c
> +++ b/drivers/gpu/drm/i915/intel_dsi_vbt.c
> @@ -578,7 +578,7 @@ static void intel_dsi_log_params(struct intel_dsi *intel_dsi)
> #define ICL_HS_ZERO_CNT_MAX 0xf
> #define ICL_EXIT_ZERO_CNT_MAX 0x7
>
> -static void icl_dphy_param_init(struct intel_dsi *intel_dsi)
> +void icl_dphy_param_init(struct intel_dsi *intel_dsi)
> {
> struct drm_device *dev = intel_dsi->base.base.dev;
> struct drm_i915_private *dev_priv = to_i915(dev);
> @@ -677,7 +677,7 @@ static void icl_dphy_param_init(struct intel_dsi *intel_dsi)
> intel_dsi_log_params(intel_dsi);
> }
>
> -static void vlv_dphy_param_init(struct intel_dsi *intel_dsi)
> +void vlv_dphy_param_init(struct intel_dsi *intel_dsi)
> {
> struct drm_device *dev = intel_dsi->base.base.dev;
> struct drm_i915_private *dev_priv = to_i915(dev);
> @@ -914,11 +914,6 @@ bool intel_dsi_vbt_init(struct intel_dsi *intel_dsi, u16 panel_id)
>
> intel_dsi->burst_mode_ratio = burst_mode_ratio;
>
> - if (INTEL_GEN(dev_priv) >= 11)
> - icl_dphy_param_init(intel_dsi);
> - else
> - vlv_dphy_param_init(intel_dsi);
> -
> /* delays in VBT are in unit of 100us, so need to convert
> * here in ms
> * Delay (100us) * 100 /1000 = Delay / 10 (ms) */
> diff --git a/drivers/gpu/drm/i915/vlv_dsi.c b/drivers/gpu/drm/i915/vlv_dsi.c
> index fce8b58f7f93..3329ccf3b346 100644
> --- a/drivers/gpu/drm/i915/vlv_dsi.c
> +++ b/drivers/gpu/drm/i915/vlv_dsi.c
> @@ -1782,6 +1782,8 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)
> goto err;
> }
>
> + vlv_dphy_param_init(intel_dsi);
ditto
> +
> /*
> * In case of BYT with CRC PMIC, we need to use GPIO for
> * Panel control.
> --
> 2.21.0
--
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-06-04 17:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 16:30 [[PATCH 0/4] drm/i915/dsi: Read back pclk set by GOP and use that as pclk (version 3) Hans de Goede
2019-05-24 16:30 ` [PATCH 1/4] drm/i915: Make intel_fuzzy_clock_check available outside of intel_display.c Hans de Goede
2019-05-24 16:30 ` [PATCH 2/4] drm/i915/dsi: Move logging of DSI VBT parameters to a helper function Hans de Goede
2019-06-04 17:36 ` Ville Syrjälä
2019-05-24 16:30 ` [PATCH 3/4] drm/i915/dsi: Move vlv/icl_dphy_param_init call out of intel_dsi_vbt_init Hans de Goede
2019-06-04 17:35 ` Ville Syrjälä [this message]
2019-06-05 18:13 ` Hans de Goede
2019-05-24 16:30 ` [PATCH 4/4] drm/i915/dsi: Read back pclk set by GOP and use that as pclk (v3) Hans de Goede
2019-06-04 17:45 ` Ville Syrjälä
2019-05-26 12:32 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dsi: Read back pclk set by GOP and use that as pclk (version 3) Patchwork
2019-05-26 13:01 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-27 2:38 ` ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2018-12-01 11:30 [PATCH 1/4] drm/i915: Make intel_fuzzy_clock_check available outside of intel_display.c Hans de Goede
2018-12-01 11:30 ` [PATCH 3/4] drm/i915/dsi: Move vlv/icl_dphy_param_init call out of intel_dsi_vbt_init Hans de Goede
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=20190604173533.GI5942@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hdegoede@redhat.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@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;
as well as URLs for NNTP newsgroup(s).