GMBUS changes
Subsystems (2)
v6 cover GMBUS changes
I am not aware if there is a reason for restricting the Bytes per GMBUS WR/RD to 256 at present. But HW has 9Bits for Total Byte count for a single read or Write cycle. Means we can extend a cycle of RD/WR to 511Bytes.
At present nothing much as ROI, as most of the usecases are for less than 256Bytes. On GLK tested for 300Bytes on single normal read, found to be working fine.
First patch does it. But I have restricted the extension to Gen9 onwards, as I am not sure about the legacy platforms.
And second patch is enabling the burst read for all GMBUS read of more than 511Bytes, on supported platforms. Basically this Burst read is enabled in HW for HDCP2.2 compliance requirement. Instead of enabling the burst read only for HDCP on special API this patch enables it for all GMBUS read of >511Bytes, on capable platforms.
At present there is no clarity on special handling required for N*256 Bytes (Where N is >2). So as per discussions, at present we are fixing the max length for BURST read to 767 Bytes.
Changes in V5 and V6:
- Max length of Burst read is fixed at 767. [ville]
- Collected Reviewed-by tags received.
Ramalingam C (2):
drm/i915/gmbus: Increase the Bytes per Rd/Wr Op
drm/i915/gmbus: Enable burst read
drivers/gpu/drm/i915/i915_drv.h | 3 ++ drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_i2c.c | 61 ++++++++++++++++++++++++++++++++-------- 3 files changed, 55 insertions(+), 11 deletions(-)
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 1/2 drm/i915/gmbus: Increase the Bytes per Rd/Wr Op
GMBUS HW supports 511Bytes as Max Bytes per single RD/WR op. Instead of enabling the 511Bytes per RD/WR cycle on legacy platforms for no absolute ROIs, this change allows the max bytes per op upto 511Bytes from Gen9 onwards.
v2:
No Change.
v3:
Inline function for max_xfer_size and renaming of the macro.[Jani]
v4:
Extra brackets removed [ville]
Commit msg is modified.
v5:
Collecting the Reviewed-By received.
--- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_i2c.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -3093,6 +3093,7 @@ enum i915_power_well_id {#define GMBUS_CYCLE_STOP (4 << 25)#define GMBUS_BYTE_COUNT_SHIFT 16#define GMBUS_BYTE_COUNT_MAX 256U +#define GEN9_GMBUS_BYTE_COUNT_MAX 511U#define GMBUS_SLAVE_INDEX_SHIFT 8#define GMBUS_SLAVE_ADDR_SHIFT 1#define GMBUS_SLAVE_READ (1 << 0)
drivers/gpu/drm/i915/intel_i2c.c +9 -2
@@ -361,6 +361,13 @@ gmbus_wait_idle(struct drm_i915_private *dev_priv)return ret; } +static inline +unsigned int gmbus_max_xfer_size (struct drm_i915_private *dev_priv) +{ +return INTEL_GEN (dev_priv) >=9 ?GEN9_GMBUS_BYTE_COUNT_MAX : +GMBUS_BYTE_COUNT_MAX ; +} + static int gmbus_xfer_read_chunk(struct drm_i915_private *dev_priv, unsigned short addr, u8 *buf, unsigned int len,
@@ -400,7 +407,7 @@ gmbus_xfer_read(struct drm_i915_private *dev_priv, struct i2c_msg *msg,int ret; do { - len = min(rx_size, GMBUS_BYTE_COUNT_MAX); + len = min(rx_size, gmbus_max_xfer_size(dev_priv)); ret = gmbus_xfer_read_chunk(dev_priv, msg->addr, buf, len, gmbus1_index);
@@ -462,7 +469,7 @@ gmbus_xfer_write(struct drm_i915_private *dev_priv, struct i2c_msg *msg,int ret; do { - len = min(tx_size, GMBUS_BYTE_COUNT_MAX); + len = min(tx_size, gmbus_max_xfer_size(dev_priv)); ret = gmbus_xfer_write_chunk(dev_priv, msg->addr, buf, len, gmbus1_index);
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v6 2/2 drm/i915/gmbus: Enable burst read
In reply to Ramalingam CSupport for Burst read in HW is added for HDCP2.2 compliance requirement.
This patch enables the burst read for all the gmbus read of more than 511Bytes, on capable platforms.
v2:
Extra line is removed.
v3:
Macro is added for detecting the BURST_READ Support [Jani] Runtime detection of the need for burst_read [Jani] Calculation enhancement.
v4:
GMBUS0 reg val is passed from caller [ville] Removed a extra var [ville]
Extra brackets are removed [ville]
Implemented the handling of 512Bytes Burst Read.
v5:
Burst read max length is fixed at 767Bytes [Ville]
v6:
Collecting the received reviewed-by.
--- drivers/gpu/drm/i915/i915_drv.h | 3 ++ drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_i2c.c | 61 +++++++++++++++++++++++++++++++++------- 3 files changed, 55 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +3 -0
@@ -2574,6 +2574,9 @@ intel_info(const struct drm_i915_private *dev_priv) IS_SKL_GT3(dev_priv) || IS_SKL_GT4(dev_priv))#define HAS_GMBUS_IRQ (dev_priv) (INTEL_GEN(dev_priv) >= 4) +#define HAS_GMBUS_BURST_READ (dev_priv) (INTEL_GEN(dev_priv) >= 10 || \ + IS_GEMINILAKE(dev_priv) || \ + IS_KABYLAKE(dev_priv))/* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte * rows, which changed the alignment requirements and fence programming.
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -3064,6 +3064,7 @@ enum i915_power_well_id {#define GMBUS_RATE_400KHZ (2 << 8)/* reserved on Pineview */ #define GMBUS_RATE_1MHZ (3 << 8)/* reserved on Pineview */ #define GMBUS_HOLD_EXT (1 << 7)/* 300ns hold time, rsvd on Pineview */ +#define GMBUS_BYTE_CNT_OVERRIDE (1 << 6)#define GMBUS_PIN_DISABLED 0#define GMBUS_PIN_SSC 1#define GMBUS_PIN_VGADDC 2
drivers/gpu/drm/i915/intel_i2c.c +51 -10
114 lines not on this page · raw message
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for GMBUS changes (rev6)
In reply to Ramalingam C== Series Details ==
== Series Details ==
Series: GMBUS changes (rev6)
URL : https://patchwork.freedesktop.org/series/41632/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip 3e6e90c178c0 drm/i915/gmbus: Increase the Bytes per Rd/Wr Op 7a76dec751ca drm/i915/gmbus: Enable burst read -:42: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #42: FILE: drivers/gpu/drm/i915/i915_drv.h:2577: +#define HAS_GMBUS_BURST_READ(dev_priv) (INTEL_GEN(dev_priv) >= 10 || \ + IS_GEMINILAKE(dev_priv) || \ + IS_KABYLAKE(dev_priv))
total: 0 errors, 0 warnings, 1 checks, 130 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.SPARSE: warning for GMBUS changes (rev6)
In reply to Ramalingam C== Series Details ==
== Series Details ==
Series: GMBUS changes (rev6)
URL : https://patchwork.freedesktop.org/series/41632/
State : warning
== Summary ==
$ dim sparse origin/drm-tip Commit: drm/i915/gmbus: Increase the Bytes per Rd/Wr Op -O:drivers/gpu/drm/i915/intel_i2c.c:403:23: warning: expression using sizeof(void) -O:drivers/gpu/drm/i915/intel_i2c.c:465:23: warning: expression using sizeof(void) +drivers/gpu/drm/i915/intel_i2c.c:410:23: warning: expression using sizeof(void) +drivers/gpu/drm/i915/intel_i2c.c:410:23: warning: expression using sizeof(void) +drivers/gpu/drm/i915/intel_i2c.c:472:23: warning: expression using sizeof(void) +drivers/gpu/drm/i915/intel_i2c.c:472:23: warning: expression using sizeof(void)
Commit: drm/i915/gmbus: Enable burst read -O:drivers/gpu/drm/i915/intel_i2c.c:410:23: warning: expression using sizeof(void) -O:drivers/gpu/drm/i915/intel_i2c.c:410:23: warning: expression using sizeof(void) +drivers/gpu/drm/i915/intel_i2c.c:445:31: warning: expression using sizeof(void) +drivers/gpu/drm/i915/intel_i2c.c:447:31: warning: expression using sizeof(void) +drivers/gpu/drm/i915/intel_i2c.c:447:31: warning: expression using sizeof(void) -drivers/gpu/drm/i915/selftests/../i915_drv.h:3672:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3675:16: warning: expression using sizeof(void)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for GMBUS changes (rev6)
In reply to Ramalingam C== Series Details ==
== Series Details ==
Series: GMBUS changes (rev6)
URL : https://patchwork.freedesktop.org/series/41632/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4397 -> Patchwork_9472 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/41632/revisions/6/mbox/
== Changes ==
No changes found
== Participating hosts (44 -> 39) ==
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4397 -> Patchwork_9472
CI_DRM_4397: 7306233935b0e426454e8adcf09a8022faa03cbc @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4530: 0e98bf69f146eb72fe3a7c3b19a049b5786f0ca3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9472: 7a76dec751ca9a366446c65608f8d3715df9bbfe @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
7a76dec751ca drm/i915/gmbus: Enable burst read 3e6e90c178c0 drm/i915/gmbus: Increase the Bytes per Rd/Wr Op
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9472/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for GMBUS changes (rev6)
In reply to Ramalingam C== Series Details ==
== Series Details ==
Series: GMBUS changes (rev6)
URL : https://patchwork.freedesktop.org/series/41632/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4397_full -> Patchwork_9472_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9472_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9472_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9472_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_schedule@deep-bsd2:
shard-kbl: PASS -> SKIP +2
igt@perf_pmu@rc6:
shard-kbl: SKIP -> PASS== Known issues ==
Here are the changes found in Patchwork_9472_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_mmap_gtt@coherency:
shard-glk: NOTRUN -> FAIL (fdo#100587)
igt@gem_softpin@noreloc-s3:
shard-kbl: NOTRUN -> INCOMPLETE (fdo#103665)
igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
shard-glk: NOTRUN -> FAIL (fdo#105454, fdo#106509)
igt@kms_flip_tiling@flip-x-tiled:
shard-glk: PASS -> FAIL (fdo#103822, fdo#104724)
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-mmap-wc:
{shard-glk9}: NOTRUN -> FAIL (fdo#103167, fdo#104724)
igt@kms_setmode@basic:
{shard-glk9}: NOTRUN -> FAIL (fdo#99912)
shard-apl: PASS -> FAIL (fdo#99912)
shard-kbl: PASS -> FAIL (fdo#99912)
igt@perf_pmu@busy-accuracy-98-vcs1:
shard-snb: NOTRUN -> INCOMPLETE (fdo#105411)
==== Possible fixes ====
igt@gem_exec_schedule@preemptive-hang-render:
shard-snb: INCOMPLETE (fdo#105411) -> SKIP
igt@kms_flip@2x-flip-vs-expired-vblank:
shard-glk: FAIL (fdo#105363) -> PASS
igt@kms_flip@flip-vs-expired-vblank:
shard-glk: FAIL (fdo#105189) -> PASS
igt@kms_flip_tiling@flip-y-tiled:
shard-glk: FAIL (fdo#103822, fdo#104724) -> PASS {name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#100587 https://bugs.freedesktop.org/show_bug.cgi?id=100587
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#105189 https://bugs.freedesktop.org/show_bug.cgi?id=105189
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (6 -> 6) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4397 -> Patchwork_9472
CI_DRM_4397: 7306233935b0e426454e8adcf09a8022faa03cbc @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4530: 0e98bf69f146eb72fe3a7c3b19a049b5786f0ca3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9472: 7a76dec751ca9a366446c65608f8d3715df9bbfe @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9472/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx