drm/i915/fia: FIA registers offset implementation.
Subsystems (2)
PATCH 1/1 drm/i915/fia: FIA registers offset implementation.
The registers DPCSSS,DPSP,DPMLE1 and DPPMS are all at an offset from the base - which is the FLexi IO Adaptor. Lets follow the offset calculation while accessing these registers.
v2:
- Follow spec for numbering - s/0/1(Lucas)
- s/FIA_1/FIA1_BASE (Anusha)
--- drivers/gpu/drm/i915/i915_reg.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +11 -4
@@ -2057,8 +2057,15 @@ enum i915_power_well_id {#define BXT_PORT_CL2CM_DW6 (phy) _BXT_PHY((phy), _PORT_CL2CM_DW6_BC)#define DW6_OLDO_DYN_PWR_DOWN_EN (1 << 28) +/* FIA Offsets */ +#define FIA1_BASE 0x163000 +#define PORT_TX_DFLEXDPMLE1_OFFSET 0x008C0 +#define PORT_TX_DFLEXDPPMS_OFFSET 0x00890 +#define PORT_TX_DFLEXDPCSSS_OFFSET 0x00894 +#define PORT_TX_DFLEXDPSP_OFFSET 0x008A0 +/* ICL PHY DFLEX registers */ -#define PORT_TX_DFLEXDPMLE1 _MMIO(0x1638C0) +#define PORT_TX_DFLEXDPMLE1 _MMIO(FIA1_BASE + PORT_TX_DFLEXDPMLE1_OFFSET)#define DFLEXDPMLE1_DPMLETC_MASK (n) (0xf << (4 * (n)))#define DFLEXDPMLE1_DPMLETC (n, x) ((x) << (4 * (n)))
@@ -10988,17 +10995,17 @@ enum skl_power_gate { _ICL_DSC1_RC_BUF_THRESH_1_UDW_PB, \ _ICL_DSC1_RC_BUF_THRESH_1_UDW_PC) -#define PORT_TX_DFLEXDPSP _MMIO(0x1638A0) +#define PORT_TX_DFLEXDPSP _MMIO(FIA1_BASE + PORT_TX_DFLEXDPSP_OFFSET)#define TC_LIVE_STATE_TBT (tc_port) (1 << ((tc_port) * 8 + 6))#define TC_LIVE_STATE_TC (tc_port) (1 << ((tc_port) * 8 + 5))#define DP_LANE_ASSIGNMENT_SHIFT (tc_port) ((tc_port) * 8)#define DP_LANE_ASSIGNMENT_MASK (tc_port) (0xf << ((tc_port) * 8))#define DP_LANE_ASSIGNMENT (tc_port, x) ((x) << ((tc_port) * 8)) -#define PORT_TX_DFLEXDPPMS _MMIO(0x163890) +#define PORT_TX_DFLEXDPPMS _MMIO(FIA1_BASE + PORT_TX_DFLEXDPPMS_OFFSET)#define DP_PHY_MODE_STATUS_COMPLETED (tc_port) (1 << (tc_port)) -#define PORT_TX_DFLEXDPCSSS _MMIO(0x163894) +#define PORT_TX_DFLEXDPCSSS _MMIO(FIA1_BASE + PORT_TX_DFLEXDPCSSS_OFFSET)#define DP_PHY_MODE_STATUS_NOT_SAFE (tc_port) (1 << (tc_port))#endif /* _I915_REG_H_ */
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 10 lines · Anusha Srivatsa
The registers DPCSSS,DPSP,DPMLE1 and DPPMS are all at an offset from the base - which is the FLexi IO Adaptor. Lets follow the offset calculation while accessing these registers.
v2:
- Follow spec for numbering - s/0/1(Lucas)
- s/FIA_1/FIA1_BASE (Anusha)Cc Lucas De Marchi <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>
thanks
Lucas De Marchi
Quoted 49 lines
--- drivers/gpu/drm/i915/i915_reg.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/i915_reg.h +11
-4@@ -2057,8 +2057,15 @@ enum i915_power_well_id {#define BXT_PORT_CL2CM_DW6 (phy) _BXT_PHY((phy), _PORT_CL2CM_DW6_BC)#define DW6_OLDO_DYN_PWR_DOWN_EN (1 << 28) +/* FIA Offsets */ +#define FIA1_BASE 0x163000 +#define PORT_TX_DFLEXDPMLE1_OFFSET 0x008C0 +#define PORT_TX_DFLEXDPPMS_OFFSET 0x00890 +#define PORT_TX_DFLEXDPCSSS_OFFSET 0x00894 +#define PORT_TX_DFLEXDPSP_OFFSET 0x008A0 +/* ICL PHY DFLEX registers */ -#define PORT_TX_DFLEXDPMLE1 _MMIO(0x1638C0) +#define PORT_TX_DFLEXDPMLE1 _MMIO(FIA1_BASE + PORT_TX_DFLEXDPMLE1_OFFSET)#define DFLEXDPMLE1_DPMLETC_MASK (n) (0xf << (4 * (n)))#define DFLEXDPMLE1_DPMLETC (n, x) ((x) << (4 * (n)))@@ -10988,17 +10995,17 @@ enum skl_power_gate { _ICL_DSC1_RC_BUF_THRESH_1_UDW_PB, \ _ICL_DSC1_RC_BUF_THRESH_1_UDW_PC) -#define PORT_TX_DFLEXDPSP _MMIO(0x1638A0) +#define PORT_TX_DFLEXDPSP _MMIO(FIA1_BASE + PORT_TX_DFLEXDPSP_OFFSET)#define TC_LIVE_STATE_TBT (tc_port) (1 << ((tc_port) * 8 + 6))#define TC_LIVE_STATE_TC (tc_port) (1 << ((tc_port) * 8 + 5))#define DP_LANE_ASSIGNMENT_SHIFT (tc_port) ((tc_port) * 8)#define DP_LANE_ASSIGNMENT_MASK (tc_port) (0xf << ((tc_port) * 8))#define DP_LANE_ASSIGNMENT (tc_port, x) ((x) << ((tc_port) * 8)) -#define PORT_TX_DFLEXDPPMS _MMIO(0x163890) +#define PORT_TX_DFLEXDPPMS _MMIO(FIA1_BASE + PORT_TX_DFLEXDPPMS_OFFSET)#define DP_PHY_MODE_STATUS_COMPLETED (tc_port) (1 << (tc_port)) -#define PORT_TX_DFLEXDPCSSS _MMIO(0x163894) +#define PORT_TX_DFLEXDPCSSS _MMIO(FIA1_BASE + PORT_TX_DFLEXDPCSSS_OFFSET)#define DP_PHY_MODE_STATUS_NOT_SAFE (tc_port) (1 << (tc_port))#endif /* _I915_REG_H_ */ Signature · 1 line
2.17.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915/fia: FIA registers offset implementation. (rev2)
In reply to Anusha Srivatsa== Series Details ==
== Series Details ==
Series: drm/i915/fia: FIA registers offset implementation. (rev2)
URL : https://patchwork.freedesktop.org/series/51566/
State : failure
== Summary ==
= CI Bug Log - changes from CI_DRM_5052 -> Patchwork_10640 =
== Summary - FAILURE ==
Serious unknown changes coming with Patchwork_10640 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_10640, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/51566/revisions/2/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_10640:
=== IGT changes ===
==== Possible regressions ====
igt@drv_selftest@live_requests:
fi-icl-u: NOTRUN -> INCOMPLETE== Known issues ==
Here are the changes found in Patchwork_10640 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_flip@basic-flip-vs-modeset:
fi-skl-6700hq: PASS -> DMESG-WARN (fdo#105998)
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: PASS -> DMESG-WARN (fdo#102614)
==== Possible fixes ====
igt@gem_exec_suspend@basic-s3:
fi-icl-u: INCOMPLETE (fdo#107713) -> PASS
igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence:
fi-byt-clapper: FAIL (fdo#107362, fdo#103191) -> PASS
igt@kms_pipe_crc_basic@read-crc-pipe-b:
fi-byt-clapper: FAIL (fdo#107362) -> PASS fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107713 https://bugs.freedesktop.org/show_bug.cgi?id=107713
== Participating hosts (49 -> 44) ==
Missing (5): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600
== Build changes ==
* Linux: CI_DRM_5052 -> Patchwork_10640
CI_DRM_5052: 24b6ea5d5f299c5e9e6b4d92068651f7f1555bd0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4699: 1270ec553741ac20c45178d2b26f9a9562ea565f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10640: 45d8bcb2c70420a81d0b4bb3d6c20fef33bf9ee2 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
45d8bcb2c704 drm/i915/fia: FIA registers offset implementation.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10640/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 3 lines · Anusha Srivatsa
The registers DPCSSS,DPSP,DPMLE1 and DPPMS are all at an offset from the base - which is the FLexi IO Adaptor. Lets follow the offset calculation while accessing these registers.
Why?
If I search the specs or i915_reg.h for, say, 0x1638c0 I'll find what I'm looking for.
We generally don't follow this type of definitions for registers. We may have some, but those are exceptions.
Please don't do this without some pretty good rationale written in the commit message.
BR,
Jani.
Quoted 53 lines
v2:
- Follow spec for numbering - s/0/1(Lucas)
- s/FIA_1/FIA1_BASE (Anusha)Cc Lucas De Marchi <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/i915_reg.h +11
-4@@ -2057,8 +2057,15 @@ enum i915_power_well_id {#define BXT_PORT_CL2CM_DW6 (phy) _BXT_PHY((phy), _PORT_CL2CM_DW6_BC)#define DW6_OLDO_DYN_PWR_DOWN_EN (1 << 28) +/* FIA Offsets */ +#define FIA1_BASE 0x163000 +#define PORT_TX_DFLEXDPMLE1_OFFSET 0x008C0 +#define PORT_TX_DFLEXDPPMS_OFFSET 0x00890 +#define PORT_TX_DFLEXDPCSSS_OFFSET 0x00894 +#define PORT_TX_DFLEXDPSP_OFFSET 0x008A0 +/* ICL PHY DFLEX registers */ -#define PORT_TX_DFLEXDPMLE1 _MMIO(0x1638C0) +#define PORT_TX_DFLEXDPMLE1 _MMIO(FIA1_BASE + PORT_TX_DFLEXDPMLE1_OFFSET)#define DFLEXDPMLE1_DPMLETC_MASK (n) (0xf << (4 * (n)))#define DFLEXDPMLE1_DPMLETC (n, x) ((x) << (4 * (n)))@@ -10988,17 +10995,17 @@ enum skl_power_gate { _ICL_DSC1_RC_BUF_THRESH_1_UDW_PB, \ _ICL_DSC1_RC_BUF_THRESH_1_UDW_PC) -#define PORT_TX_DFLEXDPSP _MMIO(0x1638A0) +#define PORT_TX_DFLEXDPSP _MMIO(FIA1_BASE + PORT_TX_DFLEXDPSP_OFFSET)#define TC_LIVE_STATE_TBT (tc_port) (1 << ((tc_port) * 8 + 6))#define TC_LIVE_STATE_TC (tc_port) (1 << ((tc_port) * 8 + 5))#define DP_LANE_ASSIGNMENT_SHIFT (tc_port) ((tc_port) * 8)#define DP_LANE_ASSIGNMENT_MASK (tc_port) (0xf << ((tc_port) * 8))#define DP_LANE_ASSIGNMENT (tc_port, x) ((x) << ((tc_port) * 8)) -#define PORT_TX_DFLEXDPPMS _MMIO(0x163890) +#define PORT_TX_DFLEXDPPMS _MMIO(FIA1_BASE + PORT_TX_DFLEXDPPMS_OFFSET)#define DP_PHY_MODE_STATUS_COMPLETED (tc_port) (1 << (tc_port)) -#define PORT_TX_DFLEXDPCSSS _MMIO(0x163894) +#define PORT_TX_DFLEXDPCSSS _MMIO(FIA1_BASE + PORT_TX_DFLEXDPCSSS_OFFSET)#define DP_PHY_MODE_STATUS_NOT_SAFE (tc_port) (1 << (tc_port))#endif /* _I915_REG_H_ */
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · Jani Nikula
Quoted 3 lines · Anusha Srivatsa
The registers DPCSSS,DPSP,DPMLE1 and DPPMS are all at an offset from the base - which is the FLexi IO Adaptor. Lets follow the offset calculation while accessing these registers.
Quoted 7 lines
Why?
If I search the specs or
i915_reg.hfor, say,0x1638c0I'll find what I'm looking for.We generally don't follow this type of definitions for registers. We may have some, but those are exceptions.
Because spec 29550 treats those registers as a base + offset to be more future proof regarding a change of the base. And yes, I think something like that needs to be stated in the commit message. Is this enough?
Lucas De Marchi
Quoted 67 lines
Please don't do this without some pretty good rationale written in the commit message.
BR,
Jani.Quoted 43 lines
v2:
- Follow spec for numbering - s/0/1(Lucas)
- s/FIA_1/FIA1_BASE (Anusha)Cc Lucas De Marchi <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/i915_reg.h +9
-2@@ -2057,8 +2057,15 @@ enum i915_power_well_id {#define BXT_PORT_CL2CM_DW6 (phy) _BXT_PHY((phy), _PORT_CL2CM_DW6_BC)#define DW6_OLDO_DYN_PWR_DOWN_EN (1 << 28) +/* FIA Offsets */ +#define FIA1_BASE 0x163000 +#define PORT_TX_DFLEXDPMLE1_OFFSET 0x008C0 +#define PORT_TX_DFLEXDPPMS_OFFSET 0x00890 +#define PORT_TX_DFLEXDPCSSS_OFFSET 0x00894 +#define PORT_TX_DFLEXDPSP_OFFSET 0x008A0 +/* ICL PHY DFLEX registers */ -#define PORT_TX_DFLEXDPMLE1 _MMIO(0x1638C0) +#define PORT_TX_DFLEXDPMLE1 _MMIO(FIA1_BASE + PORT_TX_DFLEXDPMLE1_OFFSET)#define DFLEXDPMLE1_DPMLETC_MASK (n) (0xf << (4 * (n)))#define DFLEXDPMLE1_DPMLETC (n, x) ((x) << (4 * (n)))@@ -10988,17 +10995,17 @@ enum skl_power_gate { _ICL_DSC1_RC_BUF_THRESH_1_UDW_PB, \ _ICL_DSC1_RC_BUF_THRESH_1_UDW_PC) -#define PORT_TX_DFLEXDPSP _MMIO(0x1638A0) +#define PORT_TX_DFLEXDPSP _MMIO(FIA1_BASE + PORT_TX_DFLEXDPSP_OFFSET)#define TC_LIVE_STATE_TBT (tc_port) (1 << ((tc_port) * 8 + 6))#define TC_LIVE_STATE_TC (tc_port) (1 << ((tc_port) * 8 + 5))#define DP_LANE_ASSIGNMENT_SHIFT (tc_port) ((tc_port) * 8)#define DP_LANE_ASSIGNMENT_MASK (tc_port) (0xf << ((tc_port) * 8))#define DP_LANE_ASSIGNMENT (tc_port, x) ((x) << ((tc_port) * 8))drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 11011
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +2
-2-#define PORT_TX_DFLEXDPPMS _MMIO(0x163890) +#define PORT_TX_DFLEXDPPMS _MMIO(FIA1_BASE + PORT_TX_DFLEXDPPMS_OFFSET)#define DP_PHY_MODE_STATUS_COMPLETED (tc_port) (1 << (tc_port)) -#define PORT_TX_DFLEXDPCSSS _MMIO(0x163894) +#define PORT_TX_DFLEXDPCSSS _MMIO(FIA1_BASE + PORT_TX_DFLEXDPCSSS_OFFSET)#define DP_PHY_MODE_STATUS_NOT_SAFE (tc_port) (1 << (tc_port))#endif /* _I915_REG_H_ */ --
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Lucas De Marchi _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 12 lines · Lucas De Marchi
Quoted 11 lines · Jani Nikula
Quoted 3 lines · Anusha Srivatsa
The registers DPCSSS,DPSP,DPMLE1 and DPPMS are all at an offset from the base - which is the FLexi IO Adaptor. Lets follow the offset calculation while accessing these registers.
Why?
If I search the specs or
i915_reg.hfor, say,0x1638c0I'll find what I'm looking for.
Quoted 6 lines
Quoted 2 lines
We generally don't follow this type of definitions for registers. We may have some, but those are exceptions.
Because spec 29550 treats those registers as a base + offset to be more future proof regarding a change of the base. And yes, I think something like that needs to be stated in the commit message. Is this enough?
Fair enough. Please also see comments in-line.
Quoted 29 lines
Lucas De Marchi
Quoted 26 lines
Please don't do this without some pretty good rationale written in the commit message.
BR,
Jani.Quoted 19 lines
v2:
- Follow spec for numbering - s/0/1(Lucas)
- s/FIA_1/FIA1_BASE (Anusha)Cc Lucas De Marchi <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -2057,8 +2057,15 @@ enum i915_power_well_id {#define BXT_PORT_CL2CM_DW6 (phy) _BXT_PHY((phy), _PORT_CL2CM_DW6_BC)#define DW6_OLDO_DYN_PWR_DOWN_EN (1 << 28)
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/i915/i915_reg.h enum i915_power_well_id { · line 2061
Quoted 2 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0+/* FIA Offsets */ +#define FIA1_BASE 0x163000
Ok.
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h enum i915_power_well_id { · line 2065
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +4
-0+#define PORT_TX_DFLEXDPMLE1_OFFSET 0x008C0 +#define PORT_TX_DFLEXDPPMS_OFFSET 0x00890 +#define PORT_TX_DFLEXDPCSSS_OFFSET 0x00894 +#define PORT_TX_DFLEXDPSP_OFFSET 0x008A0
These should not be grouped here, instead please add above each macro below or just leave out, see below.
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h enum i915_power_well_id { · line 2068
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +2
-1+/* ICL PHY DFLEX registers */ -#define PORT_TX_DFLEXDPMLE1 _MMIO(0x1638C0) +#define PORT_TX_DFLEXDPMLE1 _MMIO(FIA1_BASE + PORT_TX_DFLEXDPMLE1_OFFSET)
IMO either:
#define _PORT_TX_DFLEXDPMLE1 0x008C0
#define PORT_TX_DFLEXDPMLE1 _MMIO(FIA1_BASE + _PORT_TX_DFLEXDPMLE1)
or just:
#define PORT_TX_DFLEXDPMLE1 _MMIO(FIA1_BASE + 0x008C0)
BR,
Jani.
Quoted 31 lines
Quoted 31 lines
Quoted 14 lines
drivers/gpu/drm/i915/i915_reg.h +1
-1#define DFLEXDPMLE1_DPMLETC_MASK (n) (0xf << (4 * (n)))#define DFLEXDPMLE1_DPMLETC (n, x) ((x) << (4 * (n)))@@ -10988,17 +10995,17 @@ enum skl_power_gate { _ICL_DSC1_RC_BUF_THRESH_1_UDW_PB, \ _ICL_DSC1_RC_BUF_THRESH_1_UDW_PC) -#define PORT_TX_DFLEXDPSP _MMIO(0x1638A0) +#define PORT_TX_DFLEXDPSP _MMIO(FIA1_BASE + PORT_TX_DFLEXDPSP_OFFSET)#define TC_LIVE_STATE_TBT (tc_port) (1 << ((tc_port) * 8 + 6))#define TC_LIVE_STATE_TC (tc_port) (1 << ((tc_port) * 8 + 5))#define DP_LANE_ASSIGNMENT_SHIFT (tc_port) ((tc_port) * 8)#define DP_LANE_ASSIGNMENT_MASK (tc_port) (0xf << ((tc_port) * 8))#define DP_LANE_ASSIGNMENT (tc_port, x) ((x) << ((tc_port) * 8))drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 11011
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +2
-2-#define PORT_TX_DFLEXDPPMS _MMIO(0x163890) +#define PORT_TX_DFLEXDPPMS _MMIO(FIA1_BASE + PORT_TX_DFLEXDPPMS_OFFSET)#define DP_PHY_MODE_STATUS_COMPLETED (tc_port) (1 << (tc_port)) -#define PORT_TX_DFLEXDPCSSS _MMIO(0x163894) +#define PORT_TX_DFLEXDPCSSS _MMIO(FIA1_BASE + PORT_TX_DFLEXDPCSSS_OFFSET)#define DP_PHY_MODE_STATUS_NOT_SAFE (tc_port) (1 << (tc_port))#endif /* _I915_REG_H_ */ --
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 86 lines
-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Wednesday, October 31, 2018 2:29 AM
To: Lucas De Marchi <[email protected]>
Cc: Srivatsa, Anusha <[email protected]>; intel- [email protected]; De Marchi, Lucas <[email protected]>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/fia: FIA registers offset implementation.Quoted 1 line · Lucas De Marchi
On Tue, Oct 30, 2018 at 6:56 AM Jani Nikula <[email protected]>
Quoted 11 lines · wrote:
Quoted 11 lines · Anusha Srivatsa
Quoted 3 lines
The registers DPCSSS,DPSP,DPMLE1 and DPPMS are all at an offset from the base - which is the FLexi IO Adaptor. Lets follow the offset calculation while accessing these registers.
Why?
If I search the specs or
i915_reg.hfor, say,0x1638c0I'll find what I'm looking for.Quoted 6 lines
Quoted 2 lines
We generally don't follow this type of definitions for registers. We may have some, but those are exceptions.
Because spec 29550 treats those registers as a base + offset to be more future proof regarding a change of the base. And yes, I think something like that needs to be stated in the commit message. Is this enough?
Fair enough. Please also see comments in-line.
Quoted 21 lines
Lucas De Marchi
Quoted 18 lines
Please don't do this without some pretty good rationale written in the commit message.
BR,
Jani.Quoted 11 lines
v2:
- Follow spec for numbering - s/0/1(Lucas)
- s/FIA_1/FIA1_BASE (Anusha)Cc Lucas De Marchi <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/i915/i915_reg.h enum i915_power_well_id { · line 2057
Quoted 7 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_reg.hindexbcee91bcfba6..dd74bc01c64e100644drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -2057,8 +2057,15 @@ enum i915_power_well_id {#define BXT_PORT_CL2CM_DW6 (phy) _BXT_PHY((phy),
_PORT_CL2CM_DW6_BC)Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h enum i915_power_well_id { · line 2061
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0#define DW6_OLDO_DYN_PWR_DOWN_EN (1 << 28) +/* FIA Offsets */ +#define FIA1_BASE 0x163000Ok.
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h enum i915_power_well_id { · line 2065
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +4
-0+#define PORT_TX_DFLEXDPMLE1_OFFSET 0x008C0 +#define PORT_TX_DFLEXDPPMS_OFFSET 0x00890 +#define PORT_TX_DFLEXDPCSSS_OFFSET 0x00894 +#define PORT_TX_DFLEXDPSP_OFFSET 0x008A0These should not be grouped here, instead please add above each macro below or just leave out, see below.
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h enum i915_power_well_id {
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +2
-1+/* ICL PHY DFLEX registers */ -#define PORT_TX_DFLEXDPMLE1 _MMIO(0x1638C0) +#define PORT_TX_DFLEXDPMLE1 _MMIO(FIA1_BASE +
PORT_TX_DFLEXDPMLE1_OFFSET)IMO either:
Quoted 7 lines
#define
_PORT_TX_DFLEXDPMLE10x008C0
#definePORT_TX_DFLEXDPMLE1_MMIO(FIA1_BASE +_PORT_TX_DFLEXDPMLE1)or just:
#define
PORT_TX_DFLEXDPMLE1_MMIO(FIA1_BASE + 0x008C0)
Makes sense. I ll make this change...
Anusha
Quoted 42 lines
BR,
Jani.Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 10999
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +1
-1#define DFLEXDPMLE1_DPMLETC_MASK (n) (0xf << (4 * (n)))#define DFLEXDPMLE1_DPMLETC (n, x) ((x) << (4 * (n)))@@ -10988,17 +10995,17 @@ enum skl_power_gate { _ICL_DSC1_RC_BUF_THRESH_1_UDW_PB, \ _ICL_DSC1_RC_BUF_THRESH_1_UDW_PC) -#define PORT_TX_DFLEXDPSP _MMIO(0x1638A0) +#define PORT_TX_DFLEXDPSP _MMIO(FIA1_BASE +
PORT_TX_DFLEXDPSP_OFFSET)Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate {
Quoted 8 lines
drivers/gpu/drm/i915/i915_reg.h +1
-1#define TC_LIVE_STATE_TBT (tc_port) (1 << ((tc_port) * 8 + 6))#define TC_LIVE_STATE_TC (tc_port) (1 << ((tc_port) * 8 + 5))#define DP_LANE_ASSIGNMENT_SHIFT (tc_port) ((tc_port) * 8)#define DP_LANE_ASSIGNMENT_MASK (tc_port) (0xf << ((tc_port) * 8))#define DP_LANE_ASSIGNMENT (tc_port, x) ((x) << ((tc_port) * 8)) -#define PORT_TX_DFLEXDPPMS _MMIO(0x163890) +#define PORT_TX_DFLEXDPPMS _MMIO(FIA1_BASE +
PORT_TX_DFLEXDPPMS_OFFSET)Quoted 1 line
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 11007
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +0
-0#define DP_PHY_MODE_STATUS_COMPLETED (tc_port) (1 <<(
tc_port))Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 11008
Quoted 3 lines
drivers/gpu/drm/i915/i915_reg.h +1
-1-#define PORT_TX_DFLEXDPCSSS _MMIO(0x163894) +#define PORT_TX_DFLEXDPCSSS _MMIO(FIA1_BASE +
PORT_TX_DFLEXDPCSSS_OFFSET)Quoted 1 line
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 11009
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +0
-0#define DP_PHY_MODE_STATUS_NOT_SAFE (tc_port) (1 <<(
tc_port))Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 11011
Quoted 2 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0#endif /* _I915_REG_H_ */ --
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 2 lines
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 11 lines · Anusha
Quoted 11 lines
Quoted 3 lines
Quoted 3 lines
Review
Quoted 3 lines
/* ICL PHY DFLEX registers */
(quoted diff) +1
-1-#define PORT_TX_DFLEXDPMLE1 _MMIO(0x1638C0) +#define PORT_TX_DFLEXDPMLE1 _MMIO(FIA1_BASE +
PORT_TX_DFLEXDPMLE1_OFFSET)IMO either:
#define
_PORT_TX_DFLEXDPMLE10x008C0
#definePORT_TX_DFLEXDPMLE1_MMIO(FIA1_BASE +_PORT_TX_DFLEXDPMLE1)
Quoted 5 lines
Quoted 3 lines
or just:
#define
PORT_TX_DFLEXDPMLE1_MMIO(FIA1_BASE + 0x008C0)Makes sense. I ll make this change...
I think the second option makes more sense. The additional underscored name doesn't improve readability.
Lucas De Marchi
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 23 lines
-----Original Message-----
From: Lucas De Marchi [mailto:[email protected]]
Sent: Wednesday, October 31, 2018 10:23 AM
To: Srivatsa, Anusha <[email protected]>
Cc: Jani Nikula <[email protected]>; [email protected]; De Marchi, Lucas <[email protected]>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/fia: FIA registers offset implementation.Quoted 11 lines · Anusha
Quoted 11 lines
Quoted 3 lines
Quoted 3 lines
Review
Quoted 3 lines
/* ICL PHY DFLEX registers */
(quoted diff) +1
-1-#define PORT_TX_DFLEXDPMLE1 _MMIO(0x1638C0) +#define PORT_TX_DFLEXDPMLE1 _MMIO(FIA1_BASE +
PORT_TX_DFLEXDPMLE1_OFFSET)IMO either:
#define
_PORT_TX_DFLEXDPMLE10x008C0
#definePORT_TX_DFLEXDPMLE1_MMIO(FIA1_BASE +_PORT_TX_DFLEXDPMLE1)
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
or just:
#define
PORT_TX_DFLEXDPMLE1_MMIO(FIA1_BASE + 0x008C0)Makes sense. I ll make this change...
I think the second option makes more sense. The additional underscored name doesn't improve readability.
Yes, so no special additional defines for offsets, just -
#define PORT_TX_DFLEXDPMLE1 _MMIO(FIA1_BASE + 0x008C0)
Anusha
Quoted 1 line
Lucas De Marchi
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx