From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Mahesh Kumar <mahesh1.kumar@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/i915/cnl; Add macro to get PORT_TX register
Date: Fri, 9 Mar 2018 11:55:47 -0800 [thread overview]
Message-ID: <20180309195547.GJ5970@intel.com> (raw)
In-Reply-To: <20180309125858.12243-2-mahesh1.kumar@intel.com>
On Fri, Mar 09, 2018 at 06:28:56PM +0530, Mahesh Kumar wrote:
> This patch creates a new macro to get PORT_TX register for any given DW.
> This will remove the need of defining register address for each port & DW.
please squash patches 1 and 2. I had to open both simultaneously to review it
what indicates that they should be 1 patch.
>
> Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
> ---
> drivers/gpu/drm/i915/i915_reg.h | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index e6a8c0ee7df1..30ef3513dc6f 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -1964,6 +1964,34 @@ enum i915_power_well_id {
> _CNL_PORT_PCS_DW1_LN0_F)
> #define COMMON_KEEPER_EN (1 << 26)
>
> +/* CNL Port TX registers */
> +#define _CNL_PORT_TX_AE_GRP_OFFSET 0x162340
> +#define _CNL_PORT_TX_B_GRP_OFFSET 0x1623C0
> +#define _CNL_PORT_TX_C_GRP_OFFSET 0x162B40
> +#define _CNL_PORT_TX_D_GRP_OFFSET 0x162BC0
> +#define _CNL_PORT_TX_F_GRP_OFFSET 0x162A40
> +#define _CNL_PORT_TX_AE_LN0_OFFSET 0x162440
> +#define _CNL_PORT_TX_B_LN0_OFFSET 0x162640
> +#define _CNL_PORT_TX_C_LN0_OFFSET 0x162C40
> +#define _CNL_PORT_TX_D_LN0_OFFSET 0x162E40
> +#define _CNL_PORT_TX_F_LN0_OFFSET 0x162840
> +#define CNL_PORT_TX_DW_GRP(port, dw) (_PICK((port), \
> + _CNL_PORT_TX_AE_GRP_OFFSET, \
> + _CNL_PORT_TX_B_GRP_OFFSET, \
> + _CNL_PORT_TX_B_GRP_OFFSET, \
> + _CNL_PORT_TX_D_GRP_OFFSET, \
> + _CNL_PORT_TX_AE_GRP_OFFSET, \
> + _CNL_PORT_TX_F_GRP_OFFSET) + \
> + 4*(dw))
the math is right. I'm glad someone could see some logic on all these
numbers. I with we had a basic offset and math for all the port registers, but...
> +#define CNL_PORT_TX_DW_LN0(port, dw) (_PICK((port), \
who converts the offset to MMIO reg now?
> + _CNL_PORT_TX_AE_LN0_OFFSET, \
> + _CNL_PORT_TX_B_LN0_OFFSET, \
> + _CNL_PORT_TX_B_LN0_OFFSET, \
> + _CNL_PORT_TX_D_LN0_OFFSET, \
> + _CNL_PORT_TX_AE_LN0_OFFSET, \
> + _CNL_PORT_TX_F_LN0_OFFSET) + \
> + 4*(dw))
> +
> #define _CNL_PORT_TX_DW2_GRP_AE 0x162348
> #define _CNL_PORT_TX_DW2_GRP_B 0x1623C8
> #define _CNL_PORT_TX_DW2_GRP_C 0x162B48
> --
> 2.14.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-03-09 19:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-09 12:58 [PATCH 0/3] CNL port refactoring Mahesh Kumar
2018-03-09 12:58 ` [PATCH 1/3] drm/i915/cnl; Add macro to get PORT_TX register Mahesh Kumar
2018-03-09 19:55 ` Rodrigo Vivi [this message]
2018-03-09 20:51 ` Lucas De Marchi
2018-03-12 7:01 ` Kumar, Mahesh
2018-03-09 12:58 ` [PATCH 2/3] drm/i915/cnl: Replace PORT_TX register macros with new ones Mahesh Kumar
2018-03-09 12:58 ` [PATCH 3/3] drm/i915/cnl: Kill _MMIO_PORT6 macro Mahesh Kumar
2018-03-09 19:56 ` Rodrigo Vivi
2018-03-09 14:02 ` ✓ Fi.CI.BAT: success for CNL port refactoring (rev2) Patchwork
2018-03-09 17:31 ` ✓ Fi.CI.IGT: " Patchwork
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=20180309195547.GJ5970@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mahesh1.kumar@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.