public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Imre Deak <imre.deak@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 41/49] drm/i915/bxt: BXT clock divider calculation
Date: Thu, 19 Mar 2015 13:46:44 -0700	[thread overview]
Message-ID: <550B35B4.8040902@virtuousgeek.org> (raw)
In-Reply-To: <1426585215-8788-42-git-send-email-imre.deak@intel.com>

On 03/17/2015 02:40 AM, Imre Deak wrote:
> From: Satheeshakrishna M <satheeshakrishna.m@intel.com>
> 
> Calculate and cache clock parameters. Follow bspec algorithm for HDMI.
> Use precalculated values for DisplayPort linkrates.
> 
> v2: (imre)
> - rebase against upstream crtc_state change
> - use the existing CHV based helper instead of handrolling the same
> 
> Signed-off-by: Satheeshakrishna M <satheeshakrishna.m@intel.com> (v1)
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 129 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 129 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index bbc3da5..fa4f8f4 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -1204,6 +1204,132 @@ skl_ddi_pll_select(struct intel_crtc *intel_crtc,
>  	return true;
>  }
>  
> +/* bxt clock parameters */
> +struct bxt_clk_div {
> +	uint32_t p1;
> +	uint32_t p2;
> +	uint32_t m2_int;
> +	uint32_t m2_frac;
> +	bool m2_frac_en;
> +	uint32_t n;
> +	uint32_t prop_coef;
> +	uint32_t int_coef;
> +	uint32_t gain_ctl;
> +	uint32_t targ_cnt;
> +	uint32_t lanestagger;
> +};
> +
> +/* pre-calculated values for DP linkrates */
> +static struct bxt_clk_div bxt_dp_clk_val[7] = {
> +	/* 162 */ {4, 2, 32, 1677722, 1, 1, 5, 11, 2, 9, 0xd},
> +	/* 270 */ {4, 1, 27,       0, 0, 1, 3,  8, 1, 9, 0xd},
> +	/* 540 */ {2, 1, 27,       0, 0, 1, 3,  8, 1, 9, 0x18},
> +	/* 216 */ {3, 2, 32, 1677722, 1, 1, 5, 11, 2, 9, 0xd},
> +	/* 243 */ {4, 1, 24, 1258291, 1, 1, 5, 11, 2, 9, 0xd},
> +	/* 324 */ {4, 1, 32, 1677722, 1, 1, 5, 11, 2, 9, 0xd},
> +	/* 432 */ {3, 1, 32, 1677722, 1, 1, 5, 11, 2, 9, 0x18}
> +};
> +
> +static bool
> +bxt_ddi_pll_select(struct intel_crtc *intel_crtc,
> +		   struct intel_crtc_state *crtc_state,
> +		   struct intel_encoder *intel_encoder,
> +		   int clock)
> +{
> +	struct intel_shared_dpll *pll;
> +	struct bxt_clk_div clk_div = {0};
> +
> +	if (intel_encoder->type == INTEL_OUTPUT_HDMI) {
> +		intel_clock_t best_clock;
> +
> +		/* Calculate HDMI div */
> +		/*
> +		 * FIXME: tie the following calculation into
> +		 * i9xx_crtc_compute_clock
> +		 */
> +		if (!bxt_find_best_dpll(intel_crtc, clock, &best_clock)) {
> +			DRM_DEBUG_DRIVER("no PLL dividers found for clock %d pipe %c\n",
> +					 clock, pipe_name(intel_crtc->pipe));
> +			return false;
> +		}
> +
> +		clk_div.p1 = best_clock.p1;
> +		clk_div.p2 = best_clock.p2;
> +		WARN_ON(best_clock.m1 != 2);
> +		clk_div.n = best_clock.n;
> +		clk_div.m2_int = best_clock.m2 >> 22;
> +		clk_div.m2_frac = best_clock.m2 & ((1 << 22) - 1);
> +		clk_div.m2_frac_en = clk_div.m2_frac != 0;
> +
> +		/* FIXME: set coef, gain, targcnt based on freq band */
> +		clk_div.prop_coef = 5;
> +		clk_div.int_coef = 11;
> +		clk_div.gain_ctl = 2;
> +		clk_div.targ_cnt = 9;
> +		if (clock > 270000)
> +			clk_div.lanestagger = 0x18;
> +		else if (clock > 135000)
> +			clk_div.lanestagger = 0x0d;
> +		else if (clock > 67000)
> +			clk_div.lanestagger = 0x07;
> +		else if (clock > 33000)
> +			clk_div.lanestagger = 0x04;
> +		else
> +			clk_div.lanestagger = 0x02;
> +	} else if (intel_encoder->type == INTEL_OUTPUT_DISPLAYPORT ||
> +			intel_encoder->type == INTEL_OUTPUT_EDP) {
> +		struct drm_encoder *encoder = &intel_encoder->base;
> +		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
> +
> +		switch (intel_dp->link_bw) {
> +		case DP_LINK_BW_1_62:
> +			clk_div = bxt_dp_clk_val[0];
> +			break;
> +		case DP_LINK_BW_2_7:
> +			clk_div = bxt_dp_clk_val[1];
> +			break;
> +		case DP_LINK_BW_5_4:
> +			clk_div = bxt_dp_clk_val[2];
> +			break;
> +		default:
> +			clk_div = bxt_dp_clk_val[0];
> +			DRM_ERROR("Unknown link rate\n");
> +		}
> +	}
> +
> +	crtc_state->dpll_hw_state.ebb0 =
> +		PORT_PLL_P1(clk_div.p1) | PORT_PLL_P2(clk_div.p2);
> +	crtc_state->dpll_hw_state.pll0 = clk_div.m2_int;
> +	crtc_state->dpll_hw_state.pll1 = PORT_PLL_N(clk_div.n);
> +	crtc_state->dpll_hw_state.pll2 = clk_div.m2_frac;
> +
> +	if (clk_div.m2_frac_en)
> +		crtc_state->dpll_hw_state.pll3 =
> +			PORT_PLL_M2_FRAC_ENABLE;
> +
> +	crtc_state->dpll_hw_state.pll6 =
> +		clk_div.prop_coef | PORT_PLL_INT_COEFF(clk_div.int_coef);
> +	crtc_state->dpll_hw_state.pll6 |=
> +		PORT_PLL_GAIN_CTL(clk_div.gain_ctl);
> +
> +	crtc_state->dpll_hw_state.pll8 = clk_div.targ_cnt;
> +
> +	crtc_state->dpll_hw_state.pcsdw12 =
> +		LANESTAGGER_STRAP_OVRD | clk_div.lanestagger;
> +
> +	pll = intel_get_shared_dpll(intel_crtc, crtc_state);
> +	if (pll == NULL) {
> +		DRM_DEBUG_DRIVER("failed to find PLL for pipe %c\n",
> +			pipe_name(intel_crtc->pipe));
> +		return false;
> +	}
> +
> +	/* shared DPLL id 0 is DPLL A */
> +	crtc_state->ddi_pll_sel = pll->id;
> +
> +	return true;
> +}
> +
>  /*
>   * Tries to find a *shared* PLL for the CRTC and store it in
>   * intel_crtc->ddi_pll_sel.
> @@ -1222,6 +1348,9 @@ bool intel_ddi_pll_select(struct intel_crtc *intel_crtc,
>  	if (IS_SKYLAKE(dev))
>  		return skl_ddi_pll_select(intel_crtc, crtc_state,
>  					  intel_encoder, clock);
> +	else if (IS_BROXTON(dev))
> +		return bxt_ddi_pll_select(intel_crtc, crtc_state,
> +					  intel_encoder, clock);
>  	else
>  		return hsw_ddi_pll_select(intel_crtc, crtc_state,
>  					  intel_encoder, clock);
> 

Should probably have a JIRA on the proper coeff etc values as well.
They're in the bspec, we just have to add the code for the frequency bands.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-03-19 20:47 UTC|newest]

Thread overview: 191+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17  9:39 [PATCH 00/49] Basic Broxton enabling Imre Deak
2015-03-17  9:39 ` [PATCH 01/49] drm/i915/bxt: Add BXT PCI ids Imre Deak
2015-03-23  9:56   ` Antti Koskipää
2015-03-17  9:39 ` [PATCH 02/49] drm/i915/bxt: BXT FBC enablement Imre Deak
2015-03-17 17:49   ` Rodrigo Vivi
2015-03-25 20:46     ` Imre Deak
2015-03-26 15:35   ` [PATCH 02.1/49] drm/i915: use proper FBC base register on all new platforms Imre Deak
2015-03-30 10:05     ` Antti Koskipää
2015-03-30 10:04   ` [PATCH 02/49] drm/i915/bxt: BXT FBC enablement Antti Koskipää
2015-03-30 10:04   ` Antti Koskipää
2015-03-17  9:39 ` [PATCH 03/49] drm/i915/bxt: Add IS_BROXTON macro Imre Deak
2015-03-23  9:49   ` Sivakumar Thulasimani
2015-03-17  9:39 ` [PATCH 04/49] drm/i915/bxt: Broxton uses the same GMS values as Skylake Imre Deak
2015-03-23 10:23   ` Antti Koskipää
2015-03-17  9:39 ` [PATCH 05/49] drm/i915/bxt: Enable PTE encoding Imre Deak
2015-03-23 10:23   ` Antti Koskipää
2015-03-17  9:39 ` [PATCH 06/49] drm/i915/bxt: Broxton has 3 sprite planes on pipe A/B, 2 on pipe C Imre Deak
2015-03-23 10:29   ` Antti Koskipää
2015-03-31 11:18   ` Daniel Vetter
2015-03-17  9:39 ` [PATCH 07/49] drm/i915/bxt: Add the plane4 related interrupt definitions Imre Deak
2015-03-23 10:28   ` Antti Koskipää
2015-03-17  9:39 ` [PATCH 08/49] drm/i915/bxt: Broxton DDB is 512 blocks Imre Deak
2015-03-23 10:24   ` Antti Koskipää
2015-03-17  9:39 ` [PATCH 09/49] drm/i915/bxt: Broxton raises the maximum number of planes to 4 Imre Deak
2015-03-23 10:24   ` Antti Koskipää
2015-03-17  9:39 ` [PATCH 10/49] drm/i915/bxt: map GTT as uncached Imre Deak
2015-03-17 10:33   ` Daniel Vetter
2015-03-17 12:31     ` Imre Deak
2015-03-17 13:47       ` Daniel Vetter
2015-03-27 11:07   ` [PATCH v2] " Imre Deak
2015-03-30 10:02     ` Antti Koskipää
2015-03-17  9:39 ` [PATCH 11/49] drm/i915/gen9: fix PIPE_CONTROL flush for VS_INVALIDATE Imre Deak
2015-03-17 10:35   ` Daniel Vetter
2015-04-08 12:56   ` Nick Hoath
2015-03-17  9:39 ` [PATCH 12/49] drm/i915/bxt: HardWare WorkAround ring initialisation for Broxton Imre Deak
2015-03-19 16:47   ` Nick Hoath
2015-03-17  9:39 ` [PATCH 13/49] drm/i915/bxt: add bxt_init_clock_gating Imre Deak
2015-03-19 16:50   ` Nick Hoath
2015-03-20 10:17     ` Imre Deak
2015-03-27 12:00   ` [PATCH v2 " Imre Deak
2015-04-08  9:35     ` Nick Hoath
2015-03-17  9:39 ` [PATCH 14/49] drm/i915/bxt: add GEN8_SDEUNIT_CLOCK_GATE_DISABLE workaround Imre Deak
2015-03-17 10:35   ` Daniel Vetter
2015-03-17 13:06     ` Imre Deak
2015-03-20  9:08       ` Nick Hoath
2015-03-20 10:37         ` Imre Deak
2015-03-25 14:53           ` Nick Hoath
2015-03-17  9:39 ` [PATCH 15/49] drm/i915/bxt: add GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ workaround Imre Deak
2015-04-08 13:04   ` Nick Hoath
2015-04-08 13:10     ` Imre Deak
2015-04-08 13:38       ` Nick Hoath
2015-04-08 13:45         ` Imre Deak
2015-04-08 14:13         ` Nick Hoath
2015-03-17  9:39 ` [PATCH 16/49] drm/i915/bxt: add WaDisableMaskBasedCammingInRCC workaround Imre Deak
2015-03-20  9:05   ` Nick Hoath
2015-03-20 10:25     ` Imre Deak
2015-03-25 14:52       ` Nick Hoath
2015-03-17  9:39 ` [PATCH 17/49] drm/i915/skl: " Imre Deak
2015-03-20  9:07   ` Nick Hoath
2015-03-20 10:33     ` Imre Deak
2015-04-08 13:40       ` Nick Hoath
2015-03-17  9:39 ` [PATCH 18/49] drm/i915/bxt: add workaround to avoid PTE corruption Imre Deak
2015-03-17 10:36   ` Daniel Vetter
2015-03-17 13:30     ` Imre Deak
2015-04-08 13:11   ` Nick Hoath
2015-03-17  9:39 ` [PATCH 19/49] drm/i915/bxt: don't use unsupported port detection Imre Deak
2015-03-25 16:07   ` Jani Nikula
2015-03-17  9:39 ` [PATCH 20/49] drm/i915/bxt: Add change to support gmbus pin pair for BXT Imre Deak
2015-03-25 16:45   ` Jani Nikula
2015-03-17  9:39 ` [PATCH 21/49] drm/i915/bxt: WARN in case BXT unused gmbus ports are accessed Imre Deak
2015-03-25 16:49   ` Jani Nikula
2015-03-17  9:39 ` [PATCH 22/49] drm/i915/bxt: Avoid registering unused gmbus ports as i2c adapter Imre Deak
2015-03-26 17:14   ` Jani Nikula
2015-03-26 22:24     ` Jani Nikula
2015-03-17  9:39 ` [PATCH 23/49] drm/i915/bxt: Increase DDI buf idle timeout Imre Deak
2015-03-17 10:39   ` Daniel Vetter
2015-03-27 12:19   ` [PATCH v2 " Imre Deak
2015-04-08  9:20     ` Jani Nikula
2015-04-08 12:00       ` Daniel Vetter
2015-03-17  9:39 ` [PATCH 24/49] drm/i915/bxt: DDI Hotplug interrupt setup Imre Deak
2015-03-17 10:48   ` Daniel Vetter
2015-03-17 15:39     ` Imre Deak
2015-03-27 12:54   ` [PATCH v6 " Imre Deak
2015-04-08 10:32     ` Jani Nikula
2015-04-10 12:08     ` [PATCH v7 " Imre Deak
2015-04-13 13:41       ` Jani Nikula
2015-03-17  9:39 ` [PATCH 25/49] drm/i915/bxt: Add DDI hpd handler Imre Deak
2015-03-17 10:52   ` Daniel Vetter
2015-03-17 16:03     ` Imre Deak
2015-03-27 15:22   ` [PATCH 25.1/49] drm/i915/bxt: support for HPD long/short status decoding Imre Deak
2015-04-08 10:58     ` Jani Nikula
2015-04-08 11:18       ` Imre Deak
2015-04-08 11:22         ` Jani Nikula
2015-04-08 10:55   ` [PATCH 25/49] drm/i915/bxt: Add DDI hpd handler Jani Nikula
2015-04-10 12:08   ` [PATCH v2 " Imre Deak
2015-04-13 13:45     ` Jani Nikula
2015-03-17  9:39 ` [PATCH 26/49] drm/i915/bxt: Add BXT support in gen8_irq functions Imre Deak
2015-04-08 11:06   ` Jani Nikula
2015-04-10 12:08   ` [PATCH v2 " Imre Deak
2015-04-13 13:51     ` Jani Nikula
2015-04-13 13:58       ` Imre Deak
2015-04-13 14:48     ` [PATCH v3 " Imre Deak
2015-04-14  7:23       ` Jani Nikula
2015-03-17  9:39 ` [PATCH 27/49] drm/i915/bxt: Enable GMBUS IRQ Imre Deak
2015-04-08 11:11   ` Jani Nikula
2015-04-10 12:08   ` [PATCH v4 " Imre Deak
2015-04-13 13:52     ` Jani Nikula
2015-03-17  9:39 ` [PATCH 28/49] drm/i915/bxt: Define BXT power domains Imre Deak
2015-03-19 17:08   ` Ville Syrjälä
2015-03-17  9:39 ` [PATCH 29/49] drm/i915: Rename vlv_cdclk_freq to cdclk_freq Imre Deak
2015-03-17 10:54   ` Daniel Vetter
2015-03-17 13:20     ` Ville Syrjälä
2015-04-15 19:19   ` Ville Syrjälä
2015-03-17  9:39 ` [PATCH 30/49] drm/i915/bxt: add display initialize/uninitialize sequence Imre Deak
2015-03-19 19:55   ` Ville Syrjälä
2015-03-20 14:10   ` Ville Syrjälä
2015-03-20 17:15     ` Imre Deak
2015-04-02 16:32   ` Ville Syrjälä
2015-04-07 14:07     ` Imre Deak
2015-04-15 13:42   ` [PATCH v4 30/49] drm/i915/bxt: add display initialize/uninitialize sequence (CDCLK) Imre Deak
2015-04-15 14:14     ` Ville Syrjälä
2015-04-15 13:42   ` [PATCH 30.1/49] drm/i915/bxt: add display initialize/uninitialize sequence (PHY) Imre Deak
2015-04-15 14:31     ` Ville Syrjälä
2015-03-17  9:39 ` [PATCH 31/49] drm/i915/bxt: add description about the BXT PHYs Imre Deak
2015-03-19 17:30   ` Ville Syrjälä
2015-04-15 13:42   ` [PATCH v2 " Imre Deak
2015-04-15 13:54     ` Ville Syrjälä
2015-03-17  9:39 ` [PATCH 32/49] drm/i915/bxt: Implement enable/disable for Display C9 state Imre Deak
2015-04-12 10:32   ` sagar.a.kamble
2015-04-13 10:09     ` Imre Deak
2015-04-13 10:25       ` Sagar Arun Kamble
2015-04-16  7:19   ` Daniel Vetter
2015-03-17  9:39 ` [PATCH 33/49] drm/i915/bxt: Add DC9 Trigger sequence Imre Deak
2015-03-30 12:19   ` sagar.a.kamble
2015-04-15 14:13   ` [PATCH v4 " Imre Deak
2015-03-17  9:40 ` [PATCH 34/49] drm/i915/bxt: Restrict PORT_CLK_SEL programming below gen9 Imre Deak
2015-04-15 14:15   ` [PATCH v3 " Imre Deak
2015-04-15 18:55     ` Sagar Arun Kamble
2015-03-17  9:40 ` [PATCH 35/49] drm/i915/bxt: fix panel fitter setup in crtc disable/enable Imre Deak
2015-03-17 13:51   ` Daniel Vetter
2015-03-17 14:22     ` Imre Deak
2015-03-18  8:37       ` Daniel Vetter
2015-03-18 10:31         ` Imre Deak
2015-04-12 10:14   ` sagar.a.kamble
2015-04-12 10:19   ` sagar.a.kamble
2015-04-13  9:21     ` Daniel Vetter
2015-04-12 10:22   ` [PATCH 34/49] drm/i915/bxt: Restrict PORT_CLK_SEL programming below gen9 sagar.a.kamble
2015-04-13 13:21     ` Damien Lespiau
2015-04-13 13:30       ` Imre Deak
2015-04-15 14:18   ` [PATCH v2 35/49] drm/i915/bxt: fix panel fitter setup in crtc disable/enable Imre Deak
2015-03-17  9:40 ` [PATCH 36/49] drm/i915/bxt: Define bxt DDI PLLs and implement enable/disable sequence Imre Deak
2015-03-19 20:27   ` Jesse Barnes
2015-03-19 20:33     ` Imre Deak
2015-03-17  9:40 ` [PATCH 37/49] drm/i915: factor out vlv_PLL_is_optimal Imre Deak
2015-03-19 20:31   ` Jesse Barnes
2015-03-17  9:40 ` [PATCH 38/49] drm/i915: check for div-by-zero in vlv_PLL_is_optimal Imre Deak
2015-03-19 20:31   ` Jesse Barnes
2015-03-20 10:00     ` Daniel Vetter
2015-03-17  9:40 ` [PATCH 39/49] drm/i915/chv: use vlv_PLL_is_optimal in chv_find_best_dpll Imre Deak
2015-03-19 20:34   ` Jesse Barnes
2015-03-19 20:55     ` Imre Deak
2015-03-19 20:56       ` Jesse Barnes
2015-03-20 10:02     ` Daniel Vetter
2015-03-17  9:40 ` [PATCH 40/49] drm/i915/bxt: add bxt_find_best_dpll Imre Deak
2015-03-19 20:39   ` Jesse Barnes
2015-03-17  9:40 ` [PATCH 41/49] drm/i915/bxt: BXT clock divider calculation Imre Deak
2015-03-19 20:46   ` Jesse Barnes [this message]
2015-03-17  9:40 ` [PATCH 42/49] drm/i915/bxt: Assign PLL for pipe Imre Deak
2015-03-19 20:48   ` Jesse Barnes
2015-04-16  9:32   ` Daniel Vetter
2015-03-17  9:40 ` [PATCH 43/49] drm/i915/bxt: Determine PLL attached to pipe Imre Deak
2015-03-19 20:48   ` Jesse Barnes
2015-03-17  9:40 ` [PATCH 44/49] drm/i915/bxt: Determine programmed frequency Imre Deak
2015-03-19 20:51   ` Jesse Barnes
2015-03-17  9:40 ` [PATCH 45/49] drm/i915: suppress false PLL state warnings on non-GMCH platforms Imre Deak
2015-03-19 20:53   ` Jesse Barnes
2015-03-19 20:57     ` Imre Deak
2015-03-19 21:19       ` Jesse Barnes
2015-03-17  9:40 ` [PATCH 46/49] drm/i915: Iterate through the initialized DDIs to prepare their buffers Imre Deak
2015-03-23 10:51   ` Sivakumar Thulasimani
2015-03-25 15:04     ` Damien Lespiau
2015-04-24 12:47   ` Ander Conselvan De Oliveira
2015-04-24 15:22     ` Imre Deak
2015-03-17  9:40 ` [PATCH 47/49] drm/i915: Don't write the HDMI buffer translation entry when not needed Imre Deak
2015-03-23 10:57   ` Sivakumar Thulasimani
2015-03-17  9:40 ` [PATCH 48/49] drm/i915/bxt: VSwing programming sequence Imre Deak
2015-03-24  9:19   ` Sivakumar Thulasimani
2015-04-09 17:14     ` Imre Deak
2015-03-17  9:40 ` [PATCH 49/49] drm/i915/bxt: Update max level of vswing Imre Deak
2015-03-17 18:22   ` shuang.he
2015-03-24 10:26   ` Sivakumar Thulasimani

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=550B35B4.8040902@virtuousgeek.org \
    --to=jbarnes@virtuousgeek.org \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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