add LG panel to dpcd quirk database
Subsystems (3)
v4 cover add LG panel to dpcd quirk database
Only specific N value (0x8000) would be acceptable for LG LP140WF6-SPM1 eDP panel which is running at asynchronous clock mode. With the other N value, it will enter BITS mode and display black screen. This patch series set constant N value for specific sink/branch device that would cover similar issue.
Lee, Shawn C (3):
drm: Add support for device_id based detection.
drm: Change limited M/N quirk to constant N quirk.
drm: add LG eDP panel to quirk database
drivers/gpu/drm/drm_dp_helper.c | 17 ++++++++++++++++- drivers/gpu/drm/i915/intel_display.c | 28 +++++++++++++--------------- drivers/gpu/drm/i915/intel_display.h | 2 +- drivers/gpu/drm/i915/intel_dp.c | 8 ++++---- drivers/gpu/drm/i915/intel_dp_mst.c | 6 +++--- include/drm/drm_dp_helper.h | 6 +++--- 6 files changed, 40 insertions(+), 27 deletions(-)
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 add LG panel to dpcd quirk database (rev2)
== Series Details ==
== Series Details ==
Series: add LG panel to dpcd quirk database (rev2)
URL : https://patchwork.freedesktop.org/series/49413/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip f9668ab33374 drm: Add support for device_id based detection. 9aca7b72df61 drm: Change limited M/N quirk to constant N quirk. -:179: WARNING:TYPO_SPELLING: 'compatability' may be misspelled - perhaps 'compatibility'? #179: FILE: include/drm/drm_dp_helper.h:1267: + * to 16 bits. So will give a constant value (0x8000) for compatability.
total: 0 errors, 1 warnings, 0 checks, 128 lines checked f51d9a4ab5a3 drm: add LG eDP panel to quirk database -:34: WARNING:LONG_LINE: line over 100 characters #34: FILE: drivers/gpu/drm/drm_dp_helper.c:1275:
+ { OUI(0x00, 0x22, 0xb9), DEVICE_ID('s', 'i', 'v', 'a', 'r', 'T'), false, BIT(DP_DPCD_QUIRK_CONSTANT_N) },
total: 0 errors, 1 warnings, 0 checks, 8 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.SPARSE: warning for add LG panel to dpcd quirk database (rev2)
In reply to Lee, Shawn C== Series Details ==
== Series Details ==
Series: add LG panel to dpcd quirk database (rev2)
URL : https://patchwork.freedesktop.org/series/49413/
State : warning
== Summary ==
$ dim sparse origin/drm-tip Commit: drm: Add support for device_id based detection. Okay!
Commit: drm: Change limited M/N quirk to constant N quirk. -O:drivers/gpu/drm/i915/intel_display.c:6705:18: warning: expression using sizeof(void) +drivers/gpu/drm/i915/intel_display.c:6702:26: warning: expression using sizeof(void)
Commit: drm: add LG eDP panel to quirk database
Okay!
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v4 1/3 drm: Add support for device_id based detection.
In reply to Lee, Shawn CDP quirk list just compare sink or branch device's OUI so far. That means particular vendor's products will be applied specific change. This change would confirm device_id the same or not. Then driver can implement some changes for branch/sink device that really need additional WA.
v2: use sizeof instead of hard coded '6'
v3: add lost commit messages back for version 2
v4: send patch to both intel-gfx and dri-devel
--- drivers/gpu/drm/drm_dp_helper.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_dp_helper.c +14 -1
@@ -1256,15 +1256,20 @@ EXPORT_SYMBOL(drm_dp_stop_crc);struct dpcd_quirk {u8 oui[3 ]; +u8 device_id[6 ];bool is_branch;u32 quirks; };#define OUI (first, second, third) { (first), (second), (third) } +#define DEVICE_ID (first, second, third, fourth, fifth, sixth) \ + { (first), (second), (third), (fourth), (fifth), (sixth) } + +#define DEVICE_ID_ANY DEVICE_ID(0, 0, 0, 0, 0, 0)static const struct dpcd_quirk dpcd_quirk_list[] = {/* Analogix 7737 needs reduced M and N at HBR2 link rates */ - {OUI (0x00 ,0x22 ,0xb9 ), true,BIT (DP_DPCD_QUIRK_LIMITED_M_N ) }, + {OUI (0x00 ,0x22 ,0xb9 ),DEVICE_ID_ANY , true,BIT (DP_DPCD_QUIRK_LIMITED_M_N ) }, };#undef OUI
@@ -1283,6 +1288,7 @@ drm_dp_get_quirks(const struct drm_dp_dpcd_ident *ident, bool is_branch)const struct dpcd_quirk *quirk;u32 quirks =0 ;int i; +u8 any_device[] =DEVICE_ID_ANY ;for (i =0 ; i <ARRAY_SIZE (dpcd_quirk_list); i++) { quirk = &dpcd_quirk_list[i];
@@ -1293,12 +1299,19 @@ drm_dp_get_quirks(const struct drm_dp_dpcd_ident *ident, bool is_branch)if (memcmp (quirk->oui, ident->oui,sizeof (ident->oui)) !=0 )continue ; +if (memcmp (quirk->device_id, any_device,sizeof (any_device)) !=0 && +memcmp (quirk->device_id, ident->device_id,sizeof (ident->device_id)) !=0 ) +continue ; + quirks |= quirk->quirks; }return quirks; } +#undef DEVICE_ID_ANY +#undef DEVICE_ID +/** * drm_dp_read_desc - read sink/branch descriptor from DPCD * @aux: DisplayPort AUX channel
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 2/3 drm: Change limited M/N quirk to constant N quirk.
In reply to Lee, Shawn CSome DP dongles in particular seem to be fussy about too large link M/N values. Set specific value for N divider can resolve this issue per dongle vendor's comment. So configure N as constant value (0x8000) to instead of reduce M/N formula when specific DP dongle connected.
v2: add more comments for issue description and fix typo.
v3: add lost commit messages back for version 2
v4: send patch to both intel-gfx and dri-devel
--- drivers/gpu/drm/drm_dp_helper.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 28 +++++++++++++--------------- drivers/gpu/drm/i915/intel_display.h | 2 +- drivers/gpu/drm/i915/intel_dp.c | 8 ++++---- drivers/gpu/drm/i915/intel_dp_mst.c | 6 +++--- include/drm/drm_dp_helper.h | 6 +++--- 6 files changed, 25 insertions(+), 27 deletions(-)
drivers/gpu/drm/drm_dp_helper.c +1 -1
@@ -1269,7 +1269,7 @@ struct dpcd_quirk {static const struct dpcd_quirk dpcd_quirk_list[] = {/* Analogix 7737 needs reduced M and N at HBR2 link rates */ - {OUI (0x00 ,0x22 ,0xb9 ),DEVICE_ID_ANY , true,BIT (DP_DPCD_QUIRK_LIMITED_M_N ) }, + {OUI (0x00 ,0x22 ,0xb9 ),DEVICE_ID_ANY , true,BIT (DP_DPCD_QUIRK_CONSTANT_N ) }, };#undef OUI
drivers/gpu/drm/i915/intel_display.c +13 -15
@@ -6680,22 +6680,20 @@ intel_reduce_m_n_ratio(uint32_t *num, uint32_t *den)static void compute_m_n (unsigned int m,unsigned int n,uint32_t *ret_m,uint32_t *ret_n, -bool reduce_m_n) +bool constant_n) {/* -* Reduce M/N as much as possible without loss in precision. Several DP -* dongles in particular seem to be fussy about too large *link* M/N -* values. The passed in values are more likely to have the least -* significant bits zero than M after rounding below, so do this first. +* Several DP dongles in particular seem to be fussy about +* too large link M/N values. Give N value as 0x8000 that +* should be acceptable by specific devices. 0x8000 is the +* specified fixed N value for asynchronous clock mode, +* which the devices expect also in synchronous clock mode. */ -if (reduce_m_n) { -while ((m &1 ) ==0 && (n &1 ) ==0 ) { - m >>=1 ; - n >>=1 ; - } - } +if (constant_n) + *ret_n =0x8000 ; +else + *ret_n = min_t(unsigned int, roundup_pow_of_two(n), DATA_LINK_N_MAX); - *ret_n = min_t(unsigned int, roundup_pow_of_two(n), DATA_LINK_N_MAX); *ret_m =div_u64 ((uint64_t ) m * *ret_n, n);intel_reduce_m_n_ratio (ret_m, ret_n); }
@@ -6704,18 +6702,18 @@ void intel_link_compute_m_n(int bits_per_pixel, int nlanes, int pixel_clock, int link_clock, struct intel_link_m_n *m_n, - bool reduce_m_n) + bool constant_n) { m_n->tu = 64;compute_m_n (bits_per_pixel * pixel_clock, link_clock * nlanes *8 , &m_n->gmch_m, &m_n->gmch_n, - reduce_m_n); + constant_n);compute_m_n (pixel_clock, link_clock, &m_n->link_m, &m_n->link_n, - reduce_m_n); + constant_n); }static inline bool intel_panel_use_ssc (struct drm_i915_private *dev_priv)
drivers/gpu/drm/i915/intel_display.h +1 -1
@@ -379,7 +379,7 @@ struct intel_link_m_n {void intel_link_compute_m_n (int bpp,int nlanes,int pixel_clock,int link_clock,struct intel_link_m_n *m_n, -bool reduce_m_n); +bool constant_n);bool is_ccs_modifier (u64 modifier);#endif
drivers/gpu/drm/i915/intel_dp.c +4 -4
@@ -1998,8 +1998,8 @@ intel_dp_compute_config(struct intel_encoder *encoder,struct intel_connector *intel_connector = intel_dp->attached_connector;struct intel_digital_connector_state *intel_conn_state =to_intel_digital_connector_state (conn_state); -bool reduce_m_n =drm_dp_has_quirk (&intel_dp->desc, -DP_DPCD_QUIRK_LIMITED_M_N ); +bool constant_n =drm_dp_has_quirk (&intel_dp->desc, +DP_DPCD_QUIRK_CONSTANT_N );if (HAS_PCH_SPLIT (dev_priv) && !HAS_DDI (dev_priv) && port !=PORT_A ) pipe_config->has_pch_encoder = true;
@@ -2064,7 +2064,7 @@ intel_dp_compute_config(struct intel_encoder *encoder, adjusted_mode->crtc_clock, pipe_config->port_clock, &pipe_config->dp_m_n, - reduce_m_n); + constant_n);if (intel_connector->panel.downclock_mode !=NULL && dev_priv->drrs.type ==SEAMLESS_DRRS_SUPPORT ) {
@@ -2074,7 +2074,7 @@ intel_dp_compute_config(struct intel_encoder *encoder, intel_connector->panel.downclock_mode->clock, pipe_config->port_clock, &pipe_config->dp_m2_n2, - reduce_m_n); + constant_n); }if (!HAS_DDI (dev_priv))
drivers/gpu/drm/i915/intel_dp_mst.c +3 -3
@@ -45,8 +45,8 @@ static bool intel_dp_mst_compute_config(struct intel_encoder *encoder,int lane_count, slots;const struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode;int mst_pbn; -bool reduce_m_n =drm_dp_has_quirk (&intel_dp->desc, -DP_DPCD_QUIRK_LIMITED_M_N ); +bool constant_n =drm_dp_has_quirk (&intel_dp->desc, +DP_DPCD_QUIRK_CONSTANT_N );if (adjusted_mode->flags &DRM_MODE_FLAG_DBLSCAN )return false;
@@ -87,7 +87,7 @@ static bool intel_dp_mst_compute_config(struct intel_encoder *encoder, adjusted_mode->crtc_clock, pipe_config->port_clock, &pipe_config->dp_m_n, - reduce_m_n); + constant_n); pipe_config->dp_m_n.tu = slots;
include/drm/drm_dp_helper.h +3 -3
@@ -1260,12 +1260,12 @@ int drm_dp_read_desc(struct drm_dp_aux *aux, struct drm_dp_desc *desc,*/ enum drm_dp_quirk {/** -* @DP_DPCD_QUIRK_LIMITED_M_N: +* @DP_DPCD_QUIRK_CONSTANT_N: * * The device requires main link attributes Mvid and Nvid to be limited -* to 16 bits. +* to 16 bits. So will give a constant value (0x8000) for compatability. */ -DP_DPCD_QUIRK_LIMITED_M_N , +DP_DPCD_QUIRK_CONSTANT_N , };/**
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v4 3/3 drm: add LG eDP panel to quirk database
In reply to Lee, Shawn CThe N value was computed by kernel driver that based on synchronous clock mode. But only specific N value (0x8000) would be acceptable for LG LP140WF6-SPM1 eDP panel which is running at asynchronous clock mode. With the other N value, Tcon will enter BITS mode and display black screen. Add this panel into quirk database and give particular N value when calculate M/N divider.
v2: no update
v3: add lost commit messages back for version 2
v4: send patch to both intel-gfx and dri-devel
--- drivers/gpu/drm/drm_dp_helper.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/drm_dp_helper.c +2 -0
@@ -1270,6 +1270,8 @@ struct dpcd_quirk {static const struct dpcd_quirk dpcd_quirk_list[] = {/* Analogix 7737 needs reduced M and N at HBR2 link rates */ {OUI (0x00 ,0x22 ,0xb9 ),DEVICE_ID_ANY , true,BIT (DP_DPCD_QUIRK_CONSTANT_N ) }, +/* LG LP140WF6-SPM1 eDP panel */ + {OUI (0x00 ,0x22 ,0xb9 ),DEVICE_ID ('s' ,'i' ,'v' ,'a' ,'r' ,'T' ), false,BIT (DP_DPCD_QUIRK_CONSTANT_N ) }, };#undef OUI
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI✗ Fi.CI.BAT: failure for add LG panel to dpcd quirk database (rev2)
In reply to Lee, Shawn C== Series Details ==
== Series Details ==
Series: add LG panel to dpcd quirk database (rev2)
URL : https://patchwork.freedesktop.org/series/49413/
State : failure
== Summary ==
= CI Bug Log - changes from CI_DRM_4806 -> Patchwork_10147 =
== Summary - FAILURE ==
Serious unknown changes coming with Patchwork_10147 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_10147, 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/49413/revisions/2/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_10147:
=== IGT changes ===
==== Possible regressions ====
igt@drv_selftest@live_hangcheck:
fi-skl-guc: PASS -> DMESG-FAIL== Known issues ==
Here are the changes found in Patchwork_10147 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@amdgpu/amd_prime@amd-to-i915:
fi-kbl-8809g: NOTRUN -> FAIL (fdo#107341)
==== Possible fixes ====
igt@amdgpu/amd_basic@userptr:
fi-kbl-8809g: INCOMPLETE (fdo#107402) -> PASS
igt@gem_exec_suspend@basic-s3:
fi-blb-e6850: INCOMPLETE (fdo#107718) -> PASS
fi-icl-u: INCOMPLETE (fdo#107901) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-byt-clapper: FAIL (fdo#107362, fdo#103191) -> PASS
igt@prime_vgem@basic-fence-flip:
fi-ilk-650: FAIL (fdo#104008) -> PASS fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#107341 https://bugs.freedesktop.org/show_bug.cgi?id=107341
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107402 https://bugs.freedesktop.org/show_bug.cgi?id=107402
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#107901 https://bugs.freedesktop.org/show_bug.cgi?id=107901
== Participating hosts (49 -> 44) ==
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4806 -> Patchwork_10147
CI_DRM_4806: feeccde66999c5e87be3550f2159e5d7eeb61c67 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4638: 20a7ead8bdf09774c7d58fcbe6a0980d08ed5365 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10147: f51d9a4ab5a3c6effb8c6b0235eb91a4b0f96701 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
f51d9a4ab5a3 drm: add LG eDP panel to quirk database 9aca7b72df61 drm: Change limited M/N quirk to constant N quirk. f9668ab33374 drm: Add support for device_id based detection.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10147/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for add LG panel to dpcd quirk database (rev2)
In reply to Lee, Shawn C== Series Details ==
== Series Details ==
Series: add LG panel to dpcd quirk database (rev2)
URL : https://patchwork.freedesktop.org/series/49413/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4809 -> Patchwork_10152 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/49413/revisions/2/mbox/
== Known issues ==
Here are the changes found in Patchwork_10152 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_evict:
fi-bsw-kefka: PASS -> DMESG-WARN (fdo#107709)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
fi-byt-clapper: PASS -> INCOMPLETE (fdo#102657)
==== Possible fixes ====
igt@kms_frontbuffer_tracking@basic:
fi-byt-clapper: FAIL (fdo#103167) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
fi-bxt-dsi: INCOMPLETE (fdo#103927) -> PASS
igt@kms_psr@primary_page_flip:
fi-kbl-r: FAIL (fdo#107336) -> PASS fdo#102657 https://bugs.freedesktop.org/show_bug.cgi?id=102657
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336
fdo#107709 https://bugs.freedesktop.org/show_bug.cgi?id=107709
== Participating hosts (51 -> 46) ==
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4809 -> Patchwork_10152
CI_DRM_4809: 398eca316f0ed73de201afc12c4ab1ef3b2890cb @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4640: 9a8da36e708f9ed15b20689dfe305e41f9a19008 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10152: 4947b044fdaf8bac17fdd9c581451e2e0848b9f7 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
4947b044fdaf drm: add LG eDP panel to quirk database fd3ec3d72559 drm: Change limited M/N quirk to constant N quirk. d9c4e8c40739 drm: Add support for device_id based detection.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10152/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for add LG panel to dpcd quirk database (rev2)
In reply to Lee, Shawn C== Series Details ==
== Series Details ==
Series: add LG panel to dpcd quirk database (rev2)
URL : https://patchwork.freedesktop.org/series/49413/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4809_full -> Patchwork_10152_full =
== Summary - SUCCESS ==
No regressions found.
== Known issues ==
Here are the changes found in Patchwork_10152_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
shard-glk: PASS -> FAIL (fdo#105363)
==== Possible fixes ====
igt@drv_suspend@shrink:
shard-kbl: INCOMPLETE (fdo#106886, fdo#103665) -> PASS
igt@gem_exec_big:
shard-hsw: INCOMPLETE (fdo#103540) -> PASS
igt@perf@blocking:
shard-hsw: FAIL (fdo#102252) -> PASS fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4809 -> Patchwork_10152
CI_DRM_4809: 398eca316f0ed73de201afc12c4ab1ef3b2890cb @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4640: 9a8da36e708f9ed15b20689dfe305e41f9a19008 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10152: 4947b044fdaf8bac17fdd9c581451e2e0848b9f7 @ 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_10152/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · Shawn C
Only specific N value (
0x8000) would be acceptable for LG LP140WF6-SPM1 eDP panel which is running at asynchronous clock mode. With the other N value, it will enter BITS mode and display black screen. This patch series set constant N value for specific sink/branch device that would cover similar issue.
Pushed the series to drm-misc-next. Thanks for the patches, review and testing.
BR,
Jani.
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel