Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1543173 > unrolled thread
| Started by | Nicholas Mc Guire <hofrat@osadl.org> |
|---|---|
| First post | 2016-12-16 03:00 +0100 |
| Last post | 2016-12-16 10:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH V2] drm/i915: relax uncritical udelay_range() Nicholas Mc Guire <hofrat@osadl.org> - 2016-12-16 03:00 +0100
Re: [PATCH V2] drm/i915: relax uncritical udelay_range() Jani Nikula <jani.nikula@linux.intel.com> - 2016-12-16 10:30 +0100
| From | Nicholas Mc Guire <hofrat@osadl.org> |
|---|---|
| Date | 2016-12-16 03:00 +0100 |
| Subject | [PATCH V2] drm/i915: relax uncritical udelay_range() |
| Message-ID | <sOPYt-574-5@gated-at.bofh.it> |
udelay_range(1, 2) is inefficient and as discussions with Jani Nikula
<jani.nikula@linux.intel.com> unnecessary here. This replaces this
tight setting with a relaxed delay of min=20 and max=50 which helps
the hrtimer subsystem optimize timer handling.
Fixes: commit be4fc046bed3 ("drm/i915: add VLV DSI PLL Calculations")
Link: http://lkml.org/lkml/2016/12/15/147
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---
V2: use relaxed uslee_range() rather than udelay
fix documentation of changed timings
Problem found by coccinelle:
Patch was compile tested with: x86_64_defconfig (implies CONFIG_DRM_I915)
Patch is against 4.9.0 (localversion-next is next-20161215)
drivers/gpu/drm/i915/intel_dsi_pll.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dsi_pll.c b/drivers/gpu/drm/i915/intel_dsi_pll.c
index 56eff60..d210bc4 100644
--- a/drivers/gpu/drm/i915/intel_dsi_pll.c
+++ b/drivers/gpu/drm/i915/intel_dsi_pll.c
@@ -156,8 +156,10 @@ static void vlv_enable_dsi_pll(struct intel_encoder *encoder,
vlv_cck_write(dev_priv, CCK_REG_DSI_PLL_CONTROL,
config->dsi_pll.ctrl & ~DSI_PLL_VCO_EN);
- /* wait at least 0.5 us after ungating before enabling VCO */
- usleep_range(1, 10);
+ /* wait at least 0.5 us after ungating before enabling VCO,
+ * allow hrtimer subsystem optimization by relaxing timing
+ */
+ usleep_range(10, 50);
vlv_cck_write(dev_priv, CCK_REG_DSI_PLL_CONTROL, config->dsi_pll.ctrl);
--
2.1.4
[toc] | [next] | [standalone]
| From | Jani Nikula <jani.nikula@linux.intel.com> |
|---|---|
| Date | 2016-12-16 10:30 +0100 |
| Message-ID | <sOWZY-1DO-19@gated-at.bofh.it> |
| In reply to | #1543173 |
On Fri, 16 Dec 2016, Nicholas Mc Guire <hofrat@osadl.org> wrote:
> udelay_range(1, 2) is inefficient and as discussions with Jani Nikula
> <jani.nikula@linux.intel.com> unnecessary here. This replaces this
> tight setting with a relaxed delay of min=20 and max=50 which helps
> the hrtimer subsystem optimize timer handling.
>
> Fixes: commit be4fc046bed3 ("drm/i915: add VLV DSI PLL Calculations")
> Link: http://lkml.org/lkml/2016/12/15/147
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Pushed to drm-intel-next-queued, thanks for the patch.
BR,
Jani.
> ---
>
> V2: use relaxed uslee_range() rather than udelay
> fix documentation of changed timings
>
> Problem found by coccinelle:
>
> Patch was compile tested with: x86_64_defconfig (implies CONFIG_DRM_I915)
>
> Patch is against 4.9.0 (localversion-next is next-20161215)
>
> drivers/gpu/drm/i915/intel_dsi_pll.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dsi_pll.c b/drivers/gpu/drm/i915/intel_dsi_pll.c
> index 56eff60..d210bc4 100644
> --- a/drivers/gpu/drm/i915/intel_dsi_pll.c
> +++ b/drivers/gpu/drm/i915/intel_dsi_pll.c
> @@ -156,8 +156,10 @@ static void vlv_enable_dsi_pll(struct intel_encoder *encoder,
> vlv_cck_write(dev_priv, CCK_REG_DSI_PLL_CONTROL,
> config->dsi_pll.ctrl & ~DSI_PLL_VCO_EN);
>
> - /* wait at least 0.5 us after ungating before enabling VCO */
> - usleep_range(1, 10);
> + /* wait at least 0.5 us after ungating before enabling VCO,
> + * allow hrtimer subsystem optimization by relaxing timing
> + */
> + usleep_range(10, 50);
>
> vlv_cck_write(dev_priv, CCK_REG_DSI_PLL_CONTROL, config->dsi_pll.ctrl);
--
Jani Nikula, Intel Open Source Technology Center
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web