drm/i915: Add bigjoiner force enable option to debugfs
Subsystems (3)
PATCH 1/1 drm/i915: Add bigjoiner force enable option to debugfs
For validation purposes, it might be useful to be able to force Bigjoiner mode, even if current dotclock/resolution do not require that.
Lets add such to option to debugfs.
v2: - Apparently intel_dp_need_bigjoiner can't be used, when
debugfs entry is created so lets just check manually the DISPLAY_VER.
v3: - Switch to intel_connector from drm_connector(Jani Nikula)
- Remove redundant modeset lock(Jani Nikula)
- Use kstrtobool_from_user for boolean value(Jani Nikula)
v4: - Apply the changes to proper function(Jani Nikula)
--- .../drm/i915/display/intel_display_debugfs.c | 66 +++++++++++++++++++ .../drm/i915/display/intel_display_types.h | 2 + drivers/gpu/drm/i915/display/intel_dp.c | 6 +- 3 files changed, 73 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_display_debugfs.c +66 -0
@@ -1398,6 +1398,30 @@ out: drm_modeset_unlock(&dev->mode_config.connection_mutex);return ret; } +static int i915_bigjoiner_enable_show (struct seq_file *m,void *data) +{ +struct intel_connector *connector =to_intel_connector (m->private); +struct drm_crtc *crtc; +struct intel_encoder *encoder =intel_attached_encoder (connector); +struct intel_dp *intel_dp =enc_to_intel_dp (encoder); +int ret =0 ; + +if (!encoder) +return -ENODEV ; + + crtc = connector->base.state->crtc; +if (connector->base.status != connector_status_connected || !crtc) { + ret = -ENODEV ; + goto out; + } + +seq_printf (m,"Bigjoiner enable: %d\n" , intel_dp->force_bigjoiner_enable); + +out: + +return ret; +} +static ssize_t i915_dsc_output_format_write (struct file *file,const char __user *ubuf,size_t len,loff_t *offp)
@@ -1419,12 +1443,39 @@ static ssize_t i915_dsc_output_format_write(struct file *file,return len; } +static ssize_t i915_bigjoiner_enable_fops_write (struct file *file, +const char __user *ubuf, +size_t len,loff_t *offp) +{ +struct seq_file *m = file->private_data; +struct intel_connector *connector = m->private; +struct intel_encoder *encoder =intel_attached_encoder (connector); +struct intel_dp *intel_dp =enc_to_intel_dp (encoder); +bool bigjoiner_en =0 ; +int ret; + + ret =kstrtobool_from_user (ubuf, len, &bigjoiner_en); +if (ret <0 ) +return ret; + + intel_dp->force_bigjoiner_enable = bigjoiner_en; + *offp += len; + +return len; +} +static int i915_dsc_output_format_open (struct inode *inode,struct file *file) {return single_open (file, i915_dsc_output_format_show, inode->i_private); } +static int i915_bigjoiner_enable_open (struct inode *inode, +struct file *file) +{ +return single_open (file, i915_bigjoiner_enable_show, inode->i_private); +} +static const struct file_operations i915_dsc_output_format_fops = { .owner =THIS_MODULE , .open = i915_dsc_output_format_open,
@@ -1434,6 +1485,15 @@ static const struct file_operations i915_dsc_output_format_fops = { .write = i915_dsc_output_format_write }; +static const struct file_operations i915_bigjoiner_enable_fops = { + .owner =THIS_MODULE , + .open = i915_bigjoiner_enable_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + .write = i915_bigjoiner_enable_fops_write +}; +/* * Returns the Current CRTC's bpc. * Example usage: cat /sys/kernel/debug/dri/0/crtc-0/i915_current_bpc
@@ -1513,6 +1573,12 @@ void intel_connector_debugfs_add(struct intel_connector *intel_connector) connector, &i915_dsc_output_format_fops); } +if (DISPLAY_VER (dev_priv) >=11 && + intel_connector->base.connector_type == DRM_MODE_CONNECTOR_DisplayPort) { +debugfs_create_file ("i915_bigjoiner_force_enable" ,0644 , root, + &intel_connector->base, &i915_bigjoiner_enable_fops); + } + if (connector->connector_type == DRM_MODE_CONNECTOR_DSI || connector->connector_type == DRM_MODE_CONNECTOR_eDP || connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
drivers/gpu/drm/i915/display/intel_display_types.h +2 -0
@@ -1753,6 +1753,8 @@ struct intel_dp {bool is_mst;int active_mst_links; +bool force_bigjoiner_enable; +/* connector directly attached - won't be use for modeset in mst world */ struct intel_connector *attached_connector;
drivers/gpu/drm/i915/display/intel_dp.c +5 -1
@@ -1153,7 +1153,11 @@ bool intel_dp_need_bigjoiner(struct intel_dp *intel_dp,if (!intel_dp_can_bigjoiner (intel_dp))return false; -return clock > i915->max_dotclk_freq || hdisplay >5120 ; +if (intel_dp->force_bigjoiner_enable) +drm_dbg_kms (&i915->drm,"Forcing bigjoiner mode\n" ); + +return clock > i915->max_dotclk_freq || hdisplay >5120 || + intel_dp->force_bigjoiner_enable; } static enum drm_mode_status
Signature · 1 line
2.37.3
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Add bigjoiner force enable option to debugfs (rev4)
== Series Details ==
== Series Details ==
Series: drm/i915: Add bigjoiner force enable option to debugfs (rev4)
URL : https://patchwork.freedesktop.org/series/124730/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13773 -> Patchwork_124730v4
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_124730v4 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_124730v4, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/index.html
Participating hosts (32 -> 33)
------------------------------
Additional (2): bat-adln-1 bat-adlm-1
Missing (1): fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_124730v4:
### IGT changes ###
#### Possible regressions ####
* igt@i915_module_load@load:
- bat-jsl-3: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13773/bat-jsl-3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-jsl-3/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_124730v4 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@debugfs_test@basic-hwmon:
- bat-adln-1: NOTRUN -> [SKIP][3] ([i915#9318])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adln-1/igt@[email protected]
- bat-adlm-1: NOTRUN -> [SKIP][4] ([i915#3826])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adlm-1/igt@[email protected]
* igt@fbdev@eof:
- bat-adlm-1: NOTRUN -> [SKIP][5] ([i915#2582]) +3 other tests skip
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adlm-1/igt@[email protected]
* igt@fbdev@info:
- bat-adlm-1: NOTRUN -> [SKIP][6] ([i915#1849] / [i915#2582])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adlm-1/igt@[email protected]
* igt@gem_lmem_swapping@parallel-random-engines:
- bat-adlm-1: NOTRUN -> [SKIP][7] ([i915#4613]) +3 other tests skip
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adlm-1/igt@[email protected]
* igt@gem_tiled_pread_basic:
- bat-adln-1: NOTRUN -> [SKIP][8] ([i915#3282])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adln-1/igt@gem_tiled_pread_basic.html
- bat-adlm-1: NOTRUN -> [SKIP][9] ([i915#3282])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adlm-1/igt@gem_tiled_pread_basic.html
* igt@i915_pm_rps@basic-api:
- bat-adlm-1: NOTRUN -> [SKIP][10] ([i915#6621])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adlm-1/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- bat-adln-1: NOTRUN -> [SKIP][11] ([i915#4213]) +1 other test skip
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adln-1/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-after-cursor-varying-size:
- bat-adlm-1: NOTRUN -> [SKIP][12] ([i915#1845]) +17 other tests skip
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adlm-1/igt@[email protected]
* igt@kms_dsc@dsc-basic:
- bat-adln-1: NOTRUN -> [SKIP][13] ([i915#3555] / [i915#3840])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adln-1/igt@[email protected]
* igt@kms_flip@basic-plain-flip:
- bat-adlm-1: NOTRUN -> [SKIP][14] ([i915#3637]) +3 other tests skip
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adlm-1/igt@[email protected]
* igt@kms_force_connector_basic@force-load-detect:
- bat-adln-1: NOTRUN -> [SKIP][15] ([fdo#109285])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adln-1/igt@[email protected]
- bat-adlm-1: NOTRUN -> [SKIP][16] ([fdo#109285])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adlm-1/igt@[email protected]
* igt@kms_frontbuffer_tracking@basic:
- bat-adlm-1: NOTRUN -> [SKIP][17] ([i915#1849])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adlm-1/igt@[email protected]
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-c-dp-5:
- bat-adlp-11: [PASS][18] -> [ABORT][19] ([i915#8668] / [i915#9451])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13773/bat-adlp-11/igt@kms_pipe_crc_basic@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adlp-11/igt@kms_pipe_crc_basic@[email protected]
* igt@kms_psr@cursor_plane_move:
- bat-adlm-1: NOTRUN -> [SKIP][20] ([i915#1072]) +3 other tests skip
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adlm-1/igt@kms_psr@cursor_plane_move.html
* igt@kms_setmode@basic-clone-single-crtc:
- bat-adlm-1: NOTRUN -> [SKIP][21] ([i915#3555])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adlm-1/igt@[email protected]
* igt@prime_vgem@basic-fence-flip:
- bat-adlm-1: NOTRUN -> [SKIP][22] ([i915#1845] / [i915#3708])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adlm-1/igt@[email protected]
* igt@prime_vgem@basic-write:
- bat-adlm-1: NOTRUN -> [SKIP][23] ([i915#3708]) +2 other tests skip
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adlm-1/igt@[email protected]
#### Possible fixes ####
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-dp-5:
- bat-adlp-11: [ABORT][24] ([i915#8668]) -> [PASS][25]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13773/bat-adlp-11/igt@kms_pipe_crc_basic@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-adlp-11/igt@kms_pipe_crc_basic@[email protected]
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1:
- bat-rplp-1: [ABORT][26] ([i915#8668]) -> [PASS][27]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13773/bat-rplp-1/igt@kms_pipe_crc_basic@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/bat-rplp-1/igt@kms_pipe_crc_basic@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3826]: https://gitlab.freedesktop.org/drm/intel/issues/3826
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#8668]: https://gitlab.freedesktop.org/drm/intel/issues/8668
[i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318
[i915#9451]: https://gitlab.freedesktop.org/drm/intel/issues/9451
Build changes
-------------
* Linux: CI_DRM_13773 -> Patchwork_124730v4
CI-20190529: 20190529
CI_DRM_13773: 730155121b4ad393d5bc4b5ea06aac28116d5097 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7545: 4aac61139d076775a173a75a15156e408a366546 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_124730v4: 730155121b4ad393d5bc4b5ea06aac28116d5097 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
0e03bdaa536a drm/i915: Add bigjoiner force enable option to debugfs
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_124730v4/index.html
Quoted 34 lines · Stanislav Lisovskiy
For validation purposes, it might be useful to be able to force Bigjoiner mode, even if current dotclock/resolution do not require that.
Lets add such to option to debugfs.v2: - Apparently
intel_dp_need_bigjoinercan't be used, when
debugfs entry is created so lets just check manually theDISPLAY_VER.v3: - Switch to
intel_connectorfromdrm_connector(Jani Nikula)
- Remove redundant modeset lock(Jani Nikula)
- Usekstrtobool_from_userfor boolean value(Jani Nikula)v4: - Apply the changes to proper function(Jani Nikula)
Signed-off-by Stanislav Lisovskiy <[email protected]>--- .../drm/i915/display/intel_display_debugfs.c | 66 +++++++++++++++++++ .../drm/i915/display/intel_display_types.h | 2 + drivers/gpu/drm/i915/display/intel_dp.c | 6 +- 3 files changed, 73 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_display_debugfs.c +4
-0@@ -1398,6 +1398,30 @@ out: drm_modeset_unlock(&dev->mode_config.connection_mutex);return ret; } +static int i915_bigjoiner_enable_show (struct seq_file *m,void *data) +{ +struct intel_connector *connector =to_intel_connector (m->private); +struct drm_crtc *crtc;
drivers/gpu/drm/i915/display/intel_display_debugfs.c out: drm_modeset_unlock(&dev->mode_config.connection_mutex); · line 1414
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display_debugfs.c +10
-0+struct intel_encoder *encoder =intel_attached_encoder (connector); +struct intel_dp *intel_dp =enc_to_intel_dp (encoder); +int ret =0 ; + +if (!encoder) +return -ENODEV ; + + crtc = connector->base.state->crtc; +if (connector->base.status != connector_status_connected || !crtc) { + ret = -ENODEV ;
Why do we need this extra complication?
Quoted 70 lines
drivers/gpu/drm/i915/display/intel_display_debugfs.c +46
-0+ goto out; + } + +seq_printf (m,"Bigjoiner enable: %d\n" , intel_dp->force_bigjoiner_enable); + +out: + +return ret; +} +static ssize_t i915_dsc_output_format_write (struct file *file,const char __user *ubuf,size_t len,loff_t *offp)@@ -1419,12 +1443,39 @@ static ssize_t i915_dsc_output_format_write(struct file *file,return len; } +static ssize_t i915_bigjoiner_enable_fops_write (struct file *file, +const char __user *ubuf, +size_t len,loff_t *offp) +{ +struct seq_file *m = file->private_data; +struct intel_connector *connector = m->private; +struct intel_encoder *encoder =intel_attached_encoder (connector); +struct intel_dp *intel_dp =enc_to_intel_dp (encoder); +bool bigjoiner_en =0 ; +int ret; + + ret =kstrtobool_from_user (ubuf, len, &bigjoiner_en); +if (ret <0 ) +return ret; + + intel_dp->force_bigjoiner_enable = bigjoiner_en; + *offp += len; + +return len; +} +static int i915_dsc_output_format_open (struct inode *inode,struct file *file) {return single_open (file, i915_dsc_output_format_show, inode->i_private); } +static int i915_bigjoiner_enable_open (struct inode *inode, +struct file *file) +{ +return single_open (file, i915_bigjoiner_enable_show, inode->i_private); +} +static const struct file_operations i915_dsc_output_format_fops = { .owner =THIS_MODULE , .open = i915_dsc_output_format_open,@@ -1434,6 +1485,15 @@ static const struct file_operations i915_dsc_output_format_fops = { .write = i915_dsc_output_format_write }; +static const struct file_operations i915_bigjoiner_enable_fops = { + .owner =THIS_MODULE , + .open = i915_bigjoiner_enable_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + .write = i915_bigjoiner_enable_fops_write +}; +/* * Returns the Current CRTC's bpc. * Example usage: cat /sys/kernel/debug/dri/0/crtc-0/i915_current_bpc
drivers/gpu/drm/i915/display/intel_display_debugfs.c void intel_connector_debugfs_add(struct intel_connector *intel_connector) · line 1577
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display_debugfs.c +2
-0@@ -1513,6 +1573,12 @@ void intel_connector_debugfs_add(struct intel_connector *intel_connector) connector, &i915_dsc_output_format_fops); } +if (DISPLAY_VER (dev_priv) >=11 && + intel_connector->base.connector_type == DRM_MODE_CONNECTOR_DisplayPort) {
eDP missing
Quoted 25 lines
drivers/gpu/drm/i915/display/intel_display_debugfs.c +4
-0+debugfs_create_file ("i915_bigjoiner_force_enable" ,0644 , root, + &intel_connector->base, &i915_bigjoiner_enable_fops); + } + if (connector->connector_type == DRM_MODE_CONNECTOR_DSI || connector->connector_type == DRM_MODE_CONNECTOR_eDP || connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort ||drivers/gpu/drm/i915/display/intel_display_types.h +2
-0@@ -1753,6 +1753,8 @@ struct intel_dp {bool is_mst;int active_mst_links; +bool force_bigjoiner_enable; +/* connector directly attached - won't be use for modeset in mst world */ struct intel_connector *attached_connector;drivers/gpu/drm/i915/display/intel_dp.c +0
-0
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_need_bigjoiner(struct intel_dp *intel_dp, · line 1157
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_dp.c +2
-1@@ -1153,7 +1153,11 @@ bool intel_dp_need_bigjoiner(struct intel_dp *intel_dp,if (!intel_dp_can_bigjoiner (intel_dp))return false; -return clock > i915->max_dotclk_freq || hdisplay >5120 ; +if (intel_dp->force_bigjoiner_enable) +drm_dbg_kms (&i915->drm,"Forcing bigjoiner mode\n" );
That's going to cause excessive dmesg spam.
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_dp.c +3
-0+ +return clock > i915->max_dotclk_freq || hdisplay >5120 || + intel_dp->force_bigjoiner_enable; } static enum drm_mode_statusSignature · 1 line
2.37.3
Signature · 2 lines
Ville Syrjälä Intel
Hi Ville,
Quoted 154 lines · Ville Syrjälä
Quoted 34 lines · Stanislav Lisovskiy
For validation purposes, it might be useful to be able to force Bigjoiner mode, even if current dotclock/resolution do not require that.
Lets add such to option to debugfs.v2: - Apparently
intel_dp_need_bigjoinercan't be used, when
debugfs entry is created so lets just check manually theDISPLAY_VER.v3: - Switch to
intel_connectorfromdrm_connector(Jani Nikula)
- Remove redundant modeset lock(Jani Nikula)
- Usekstrtobool_from_userfor boolean value(Jani Nikula)v4: - Apply the changes to proper function(Jani Nikula)
Signed-off-by Stanislav Lisovskiy <[email protected]>--- .../drm/i915/display/intel_display_debugfs.c | 66 +++++++++++++++++++ .../drm/i915/display/intel_display_types.h | 2 + drivers/gpu/drm/i915/display/intel_dp.c | 6 +- 3 files changed, 73 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_display_debugfs.c +4
-0@@ -1398,6 +1398,30 @@ out: drm_modeset_unlock(&dev->mode_config.connection_mutex);return ret; } +static int i915_bigjoiner_enable_show (struct seq_file *m,void *data) +{ +struct intel_connector *connector =to_intel_connector (m->private); +struct drm_crtc *crtc;drivers/gpu/drm/i915/display/intel_display_debugfs.c out: drm_modeset_unlock(&dev->mode_config.connection_mutex); · line 1414
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display_debugfs.c +10
-0+struct intel_encoder *encoder =intel_attached_encoder (connector); +struct intel_dp *intel_dp =enc_to_intel_dp (encoder); +int ret =0 ; + +if (!encoder) +return -ENODEV ; + + crtc = connector->base.state->crtc; +if (connector->base.status != connector_status_connected || !crtc) { + ret = -ENODEV ;Why do we need this extra complication?
Quoted 70 lines
drivers/gpu/drm/i915/display/intel_display_debugfs.c +46
-0+ goto out; + } + +seq_printf (m,"Bigjoiner enable: %d\n" , intel_dp->force_bigjoiner_enable); + +out: + +return ret; +} +static ssize_t i915_dsc_output_format_write (struct file *file,const char __user *ubuf,size_t len,loff_t *offp)@@ -1419,12 +1443,39 @@ static ssize_t i915_dsc_output_format_write(struct file *file,return len; } +static ssize_t i915_bigjoiner_enable_fops_write (struct file *file, +const char __user *ubuf, +size_t len,loff_t *offp) +{ +struct seq_file *m = file->private_data; +struct intel_connector *connector = m->private; +struct intel_encoder *encoder =intel_attached_encoder (connector); +struct intel_dp *intel_dp =enc_to_intel_dp (encoder); +bool bigjoiner_en =0 ; +int ret; + + ret =kstrtobool_from_user (ubuf, len, &bigjoiner_en); +if (ret <0 ) +return ret; + + intel_dp->force_bigjoiner_enable = bigjoiner_en; + *offp += len; + +return len; +} +static int i915_dsc_output_format_open (struct inode *inode,struct file *file) {return single_open (file, i915_dsc_output_format_show, inode->i_private); } +static int i915_bigjoiner_enable_open (struct inode *inode, +struct file *file) +{ +return single_open (file, i915_bigjoiner_enable_show, inode->i_private); +} +static const struct file_operations i915_dsc_output_format_fops = { .owner =THIS_MODULE , .open = i915_dsc_output_format_open,@@ -1434,6 +1485,15 @@ static const struct file_operations i915_dsc_output_format_fops = { .write = i915_dsc_output_format_write }; +static const struct file_operations i915_bigjoiner_enable_fops = { + .owner =THIS_MODULE , + .open = i915_bigjoiner_enable_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + .write = i915_bigjoiner_enable_fops_write +}; +/* * Returns the Current CRTC's bpc. * Example usage: cat /sys/kernel/debug/dri/0/crtc-0/i915_current_bpc drivers/gpu/drm/i915/display/intel_display_debugfs.c void intel_connector_debugfs_add(struct intel_connector *intel_connector) · line 1577
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display_debugfs.c +2
-0@@ -1513,6 +1573,12 @@ void intel_connector_debugfs_add(struct intel_connector *intel_connector) connector, &i915_dsc_output_format_fops); } +if (DISPLAY_VER (dev_priv) >=11 && + intel_connector->base.connector_type == DRM_MODE_CONNECTOR_DisplayPort) {eDP missing
Quoted 28 lines
drivers/gpu/drm/i915/display/intel_display_debugfs.c +4
-0+debugfs_create_file ("i915_bigjoiner_force_enable" ,0644 , root, + &intel_connector->base, &i915_bigjoiner_enable_fops); + } + if (connector->connector_type == DRM_MODE_CONNECTOR_DSI || connector->connector_type == DRM_MODE_CONNECTOR_eDP || connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort ||drivers/gpu/drm/i915/display/intel_display_types.h +2
-0@@ -1753,6 +1753,8 @@ struct intel_dp {bool is_mst;int active_mst_links; +bool force_bigjoiner_enable; +/* connector directly attached - won't be use for modeset in mst world */ struct intel_connector *attached_connector;drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1153,7 +1153,11 @@ bool intel_dp_need_bigjoiner(struct intel_dp *intel_dp,if (!intel_dp_can_bigjoiner (intel_dp))return false;
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_need_bigjoiner(struct intel_dp *intel_dp, · line 1157
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_dp.c +2
-1-return clock > i915->max_dotclk_freq || hdisplay >5120 ; +if (intel_dp->force_bigjoiner_enable) +drm_dbg_kms (&i915->drm,"Forcing bigjoiner mode\n" );That's going to cause excessive dmesg spam.
Then how from dmesg we will get to know, big joiner was forced? Shouldn't we have atleast one debug print to know this?
Quoted 10 lines
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_dp.c +3
-0+ +return clock > i915->max_dotclk_freq || hdisplay >5120 || + intel_dp->force_bigjoiner_enable; } static enum drm_mode_statusSignature · 1 line
2.37.3
Quoted 12 lines · On Wed, 17 Jan 2024, "Sharma, Swati2" <[email protected]> wrote:
Hi Ville,
Quoted 9 lines · Ville Syrjälä
Quoted 8 lines · Stanislav Lisovskiy
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1153,7 +1153,11 @@ bool intel_dp_need_bigjoiner(struct intel_dp *intel_dp,if (!intel_dp_can_bigjoiner (intel_dp))return false;
Quoted 8 lines
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_need_bigjoiner(struct intel_dp *intel_dp, · line 1157
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_dp.c +2
-1-return clock > i915->max_dotclk_freq || hdisplay >5120 ; +if (intel_dp->force_bigjoiner_enable) +drm_dbg_kms (&i915->drm,"Forcing bigjoiner mode\n" );That's going to cause excessive dmesg spam.
Then how from dmesg we will get to know, big joiner was forced? Shouldn't we have atleast one debug print to know this?
Yeah. But this gets called for every single display mode via intel_dp_mode_valid().
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel
Quoted 19 lines · Jani Nikula
Quoted 18 lines · On Wed, 17 Jan 2024, "Sharma, Swati2" <[email protected]> wrote:
Hi Ville,
Quoted 14 lines · Ville Syrjälä
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_need_bigjoiner(struct intel_dp *intel_dp, · line 1157
Quoted 11 lines · Stanislav Lisovskiy
drivers/gpu/drm/i915/display/intel_dp.c +2
-1@@ -1153,7 +1153,11 @@ bool intel_dp_need_bigjoiner(struct intel_dp *intel_dp,if (!intel_dp_can_bigjoiner (intel_dp))return false; -return clock > i915->max_dotclk_freq || hdisplay >5120 ; +if (intel_dp->force_bigjoiner_enable) +drm_dbg_kms (&i915->drm,"Forcing bigjoiner mode\n" );That's going to cause excessive dmesg spam.
Quoted 5 lines
Quoted 2 lines
Then how from dmesg we will get to know, big joiner was forced? Shouldn't we have atleast one debug print to know this?
Yeah. But this gets called for every single display mode via
intel_dp_mode_valid().
ohh okay, can we add dbg print in intel_dp_compute_link_config() from where intel_dp_need_bigjoiner() is called?
Quoted 5 lines
BR,
Jani.