All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Madhav Chauhan <madhav.chauhan@intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: paulo.r.zanoni@intel.com, rodrigo.vivi@intel.com
Subject: Re: [PATCH v5 06/13] drm/i915/icl: Define data/clock lanes dphy timing registers
Date: Tue, 11 Sep 2018 22:14:29 +0300	[thread overview]
Message-ID: <875zzbetii.fsf@intel.com> (raw)
In-Reply-To: <1531215614-6828-7-git-send-email-madhav.chauhan@intel.com>

On Tue, 10 Jul 2018, Madhav Chauhan <madhav.chauhan@intel.com> wrote:
> This patch defines DSI_CLK_TIMING_PARAM, DPHY_CLK_TIMING_PARAM,
> DSI_DATA_TIMING_PARAM, DPHY_DATA_TIMING_PARAM register used in
> dphy programming.
>
> Signed-off-by: Madhav Chauhan <madhav.chauhan@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_reg.h | 40 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 40 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 6129372..0dbdd57 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -10075,6 +10075,46 @@ enum skl_power_gate {
>  						   _ICL_DSI_T_INIT_MASTER_0,\
>  						   _ICL_DSI_T_INIT_MASTER_1)
>  
> +#define _DPHY_CLK_TIMING_PARAM_0	0x162180
> +#define _DPHY_CLK_TIMING_PARAM_1	0x6c180
> +#define DPHY_CLK_TIMING_PARAM(port)	_MMIO_PORT(port,	\
> +						   _DPHY_CLK_TIMING_PARAM_0,\
> +						   _DPHY_CLK_TIMING_PARAM_1)
> +#define _DSI_CLK_TIMING_PARAM_0		0x6b080
> +#define _DSI_CLK_TIMING_PARAM_1		0x6b880
> +#define DSI_CLK_TIMING_PARAM(port)	_MMIO_PORT(port,	\
> +						   _DSI_CLK_TIMING_PARAM_0,\
> +						   _DSI_CLK_TIMING_PARAM_1)
> +#define  CLK_PREP_OVERRIDE		(1 << 31)
> +#define  CLK_PREP_TIME(x)		(x << 28)
> +#define  CLK_ZERO_OVERRIDE		(1 << 27)
> +#define  CLK_ZERO_TIME(x)		(x << 20)
> +#define  CLK_PRE_OVERRIDE		(1 << 19)
> +#define  CLK_PRE_TIME(x)		(x << 16)
> +#define  CLK_POST_OVERRIDE		(1 << 15)
> +#define  CLK_POST_TIME(x)		(x << 8)
> +#define  CLK_TRAIL_OVERRIDE		(1 << 7)
> +#define  CLK_TRAIL_TIME(x)		(x << 0)

I would prefer we stuck to the convention of defining _SHIFT and _MASK
macros for the bitfields. Even if the above style has started to creep
in without proper discussion. (I approve of the function-like macros for
things that aren't straight shifts; stuff with split bitfields or
calculations.)

No matter what, you need to wrap the macro arguments in parens!

Also, please don't do your own abbreviations or renames of the field
names when the bspec name is short/good enough.

> +
> +#define _DPHY_DATA_TIMING_PARAM_0	0x162184
> +#define _DPHY_DATA_TIMING_PARAM_1	0x6c184
> +#define DPHY_DATA_TIMING_PARAM(port)	_MMIO_PORT(port,	\
> +						   _DPHY_DATA_TIMING_PARAM_0,\
> +						   _DPHY_DATA_TIMING_PARAM_1)
> +#define _DSI_DATA_TIMING_PARAM_0	0x6B084
> +#define _DSI_DATA_TIMING_PARAM_1	0x6B884
> +#define DSI_DATA_TIMING_PARAM(port)	_MMIO_PORT(port,	\
> +						   _DSI_DATA_TIMING_PARAM_0,\
> +						   _DSI_DATA_TIMING_PARAM_1)
> +#define  HS_PREP_OVERRIDE		(1 << 31)
> +#define  HS_PREP_TIME(x)		(x << 24)
> +#define  HS_ZERO_OVERRIDE		(1 << 23)
> +#define  HS_ZERO_TIME(x)		(x << 16)
> +#define  HS_TRAIL_OVERRIDE		(1 << 15)
> +#define  HS_TRAIL_TIME(x)		(x << 8)
> +#define  HS_EXIT_OVERRIDE		(1 << 7)
> +#define  HS_EXIT_TIME(x)		(x << 0)

Same as above.

The register offsets and shifts etc. look ok.

BR,
Jani.

> +
>  /* bits 31:0 */
>  #define _MIPIA_DBI_BW_CTRL		(dev_priv->mipi_mmio_base + 0xb084)
>  #define _MIPIC_DBI_BW_CTRL		(dev_priv->mipi_mmio_base + 0xb884)

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-09-11 19:14 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-10  9:40 [PATCH v5 00/13] ICELAKE DSI DRIVER Madhav Chauhan
2018-07-10  9:40 ` [PATCH v5 01/13] drm/i915/icl: Configure lane sequencing of combo phy transmitter Madhav Chauhan
2018-07-19 16:11   ` Ville Syrjälä
2018-07-19 18:35     ` Chauhan, Madhav
2018-07-27 11:57       ` Chauhan, Madhav
2018-09-11 17:46         ` Jani Nikula
2018-09-12  6:32           ` Madhav Chauhan
2018-09-10 12:20   ` Lisovskiy, Stanislav
2018-09-10 15:27     ` Madhav Chauhan
2018-09-11  8:08       ` Lisovskiy, Stanislav
2018-07-10  9:40 ` [PATCH v5 02/13] drm/i915/icl: DSI vswing programming sequence Madhav Chauhan
2018-09-06 14:01   ` [v5, " Kulkarni, Vandita
2018-09-10  7:43     ` Madhav Chauhan
2018-09-11 18:16       ` Jani Nikula
2018-09-12  6:34         ` Madhav Chauhan
2018-09-11 18:50   ` [PATCH v5 " Jani Nikula
2018-09-12  9:03     ` Madhav Chauhan
2018-09-12  9:10       ` Jani Nikula
2018-07-10  9:40 ` [PATCH v5 03/13] drm/i915/icl: Enable DDI Buffer Madhav Chauhan
2018-09-11 18:54   ` Jani Nikula
2018-09-12  9:06     ` Madhav Chauhan
2018-09-12  9:10       ` Jani Nikula
2018-07-10  9:40 ` [PATCH v5 04/13] drm/i915/icl: Define T_INIT_MASTER registers Madhav Chauhan
2018-09-11 19:18   ` Jani Nikula
2018-07-10  9:40 ` [PATCH v5 05/13] drm/i915/icl: Program " Madhav Chauhan
2018-09-11 19:17   ` Jani Nikula
2018-07-10  9:40 ` [PATCH v5 06/13] drm/i915/icl: Define data/clock lanes dphy timing registers Madhav Chauhan
2018-09-11 19:14   ` Jani Nikula [this message]
2018-09-12  9:11     ` Madhav Chauhan
2018-07-10  9:40 ` [PATCH v5 07/13] drm/i915/icl: Program DSI clock and data lane timing params Madhav Chauhan
2018-07-19 16:17   ` Ville Syrjälä
2018-07-10  9:40 ` [PATCH v5 08/13] drm/i915/icl: Define TA_TIMING_PARAM registers Madhav Chauhan
2018-09-11 19:23   ` Jani Nikula
2018-09-12  9:13     ` Madhav Chauhan
2018-07-10  9:40 ` [PATCH v5 09/13] drm/i915/icl: Program " Madhav Chauhan
2018-07-19 16:21   ` Ville Syrjälä
2018-07-20  8:08     ` Chauhan, Madhav
2018-09-11 19:26       ` Jani Nikula
2018-09-12  9:25         ` Madhav Chauhan
2018-09-12  9:39           ` Jani Nikula
2018-07-10  9:40 ` [PATCH v5 10/13] drm/i915/icl: Get DSI transcoder for a given port Madhav Chauhan
2018-07-10  9:40 ` [PATCH v5 11/13] drm/i915/icl: Add macros for MMIO of DSI transcoder registers Madhav Chauhan
2018-07-19 16:22   ` Ville Syrjälä
2018-07-20  8:55     ` Chauhan, Madhav
2018-09-12  9:36     ` Madhav Chauhan
2018-09-12 18:00       ` Ville Syrjälä
2018-09-14  6:12         ` Madhav Chauhan
2018-09-14 12:25           ` Ville Syrjälä
2018-09-14 13:06             ` Madhav Chauhan
2018-09-14 13:27               ` Madhav Chauhan
2018-09-14 13:41                 ` Ville Syrjälä
2018-07-10  9:40 ` [PATCH v5 12/13] drm/i915/icl: Define TRANS_DSI_FUNC_CONF register Madhav Chauhan
2018-09-11 19:30   ` Jani Nikula
2018-09-12  9:35     ` Madhav Chauhan
2018-09-12  9:47       ` Jani Nikula
2018-07-10  9:40 ` [PATCH v5 13/13] drm/i915/icl: Configure DSI transcoders Madhav Chauhan
2018-07-10 10:46 ` ✗ Fi.CI.CHECKPATCH: warning for ICELAKE DSI DRIVER (rev5) Patchwork
2018-07-10 10:51 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-07-10 11:04 ` ✓ Fi.CI.BAT: success " Patchwork
2018-07-10 16:28 ` ✓ Fi.CI.IGT: " Patchwork
2018-09-11 19:35 ` [PATCH v5 00/13] ICELAKE DSI DRIVER Jani Nikula
2018-09-12  6:16   ` Madhav Chauhan
2018-09-12  7:31     ` Jani Nikula

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=875zzbetii.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=madhav.chauhan@intel.com \
    --cc=paulo.r.zanoni@intel.com \
    --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 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.