* [PATCH] drm/i915: intel_dp_check_link_status should only return status of link
@ 2016-07-01 22:47 Manasi Navare
2016-07-02 0:35 ` Rodrigo Vivi
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Manasi Navare @ 2016-07-01 22:47 UTC (permalink / raw)
To: intel-gfx
Intel_dp_check_link_status() function reads the Link status registers
and returns a boolean to indicate link is good or bad.
If the link is bad, it is retrained outside the function based
on the return value.
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
---
drivers/gpu/drm/i915/intel_dp.c | 41 ++++++++++++++++++++++++-----------------
1 file changed, 24 insertions(+), 17 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 6d586b7..c795c9e 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3863,7 +3863,7 @@ go_again:
return -EINVAL;
}
-static void
+static bool
intel_dp_check_link_status(struct intel_dp *intel_dp)
{
struct intel_encoder *intel_encoder = &dp_to_dig_port(intel_dp)->base;
@@ -3873,26 +3873,25 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)
WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex));
if (!intel_dp_get_link_status(intel_dp, link_status)) {
- DRM_ERROR("Failed to get link status\n");
- return;
+ DRM_DEBUG_KMS("Failed to get link status\n");
+ return false;
}
- if (!intel_encoder->base.crtc)
- return;
+ /* Check if the link is valid by reading the bits of Link status
+ * registers
+ */
+ if (!drm_dp_channel_eq_ok(link_status, intel_dp->lane_count) ||
+ !drm_dp_clock_recovery_ok(link_status, intel_dp->lane_count)) {
+ DRM_DEBUG_KMS("Channel EQ or CR not ok, need to retrain\n");
+ return false;
+ }
- if (!to_intel_crtc(intel_encoder->base.crtc)->active)
- return;
+ DRM_DEBUG_KMS("Link is good, no need to retrain\n");
+ return true;
- /* if link training is requested we should perform it always */
- if ((intel_dp->compliance_test_type == DP_TEST_LINK_TRAINING) ||
- (!drm_dp_channel_eq_ok(link_status, intel_dp->lane_count))) {
- DRM_DEBUG_KMS("%s: channel EQ not ok, retraining\n",
- intel_encoder->base.name);
- intel_dp_start_link_train(intel_dp);
- intel_dp_stop_link_train(intel_dp);
- }
}
+
/*
* According to DP spec
* 5.1.2:
@@ -3950,7 +3949,11 @@ intel_dp_short_pulse(struct intel_dp *intel_dp)
}
drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
- intel_dp_check_link_status(intel_dp);
+ if (!intel_dp_check_link_status(intel_dp) ||
+ intel_dp->compliance_test_type == DP_TEST_LINK_TRAINING) {
+ intel_dp_start_link_train(intel_dp);
+ intel_dp_stop_link_train(intel_dp);
+ }
drm_modeset_unlock(&dev->mode_config.connection_mutex);
return true;
@@ -4271,7 +4274,11 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
* link loss triggerring long pulse!!!!
*/
drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
- intel_dp_check_link_status(intel_dp);
+ if (!intel_dp_check_link_status(intel_dp) ||
+ intel_dp->compliance_test_type == DP_TEST_LINK_TRAINING) {
+ intel_dp_start_link_train(intel_dp);
+ intel_dp_stop_link_train(intel_dp);
+ }
drm_modeset_unlock(&dev->mode_config.connection_mutex);
goto out;
}
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] drm/i915: intel_dp_check_link_status should only return status of link
2016-07-01 22:47 [PATCH] drm/i915: intel_dp_check_link_status should only return status of link Manasi Navare
@ 2016-07-02 0:35 ` Rodrigo Vivi
2016-07-11 22:41 ` Manasi Navare
2016-07-02 5:46 ` ✗ Ro.CI.BAT: failure for " Patchwork
` (3 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Rodrigo Vivi @ 2016-07-02 0:35 UTC (permalink / raw)
To: Manasi Navare; +Cc: intel-gfx
On Fri, Jul 1, 2016 at 3:47 PM, Manasi Navare <manasi.d.navare@intel.com> wrote:
> Intel_dp_check_link_status() function reads the Link status registers
> and returns a boolean to indicate link is good or bad.
> If the link is bad, it is retrained outside the function based
> on the return value.
>
> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 41 ++++++++++++++++++++++++-----------------
> 1 file changed, 24 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 6d586b7..c795c9e 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -3863,7 +3863,7 @@ go_again:
> return -EINVAL;
> }
>
> -static void
> +static bool
> intel_dp_check_link_status(struct intel_dp *intel_dp)
> {
> struct intel_encoder *intel_encoder = &dp_to_dig_port(intel_dp)->base;
> @@ -3873,26 +3873,25 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)
> WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex));
>
> if (!intel_dp_get_link_status(intel_dp, link_status)) {
> - DRM_ERROR("Failed to get link status\n");
> - return;
> + DRM_DEBUG_KMS("Failed to get link status\n");
> + return false;
> }
>
> - if (!intel_encoder->base.crtc)
> - return;
where did this check go? why don't we need this anymore?
> + /* Check if the link is valid by reading the bits of Link status
> + * registers
> + */
> + if (!drm_dp_channel_eq_ok(link_status, intel_dp->lane_count) ||
> + !drm_dp_clock_recovery_ok(link_status, intel_dp->lane_count)) {
> + DRM_DEBUG_KMS("Channel EQ or CR not ok, need to retrain\n");
> + return false;
> + }
>
> - if (!to_intel_crtc(intel_encoder->base.crtc)->active)
> - return;
what happens if it is not active now? are we going to attemtp the
retraing in this case?
in other words: we really don't need this check anymore as the one above?
Thanks,
Rodrigo.
> + DRM_DEBUG_KMS("Link is good, no need to retrain\n");
> + return true;
>
> - /* if link training is requested we should perform it always */
> - if ((intel_dp->compliance_test_type == DP_TEST_LINK_TRAINING) ||
> - (!drm_dp_channel_eq_ok(link_status, intel_dp->lane_count))) {
> - DRM_DEBUG_KMS("%s: channel EQ not ok, retraining\n",
> - intel_encoder->base.name);
> - intel_dp_start_link_train(intel_dp);
> - intel_dp_stop_link_train(intel_dp);
> - }
> }
>
> +
> /*
> * According to DP spec
> * 5.1.2:
> @@ -3950,7 +3949,11 @@ intel_dp_short_pulse(struct intel_dp *intel_dp)
> }
>
> drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
> - intel_dp_check_link_status(intel_dp);
> + if (!intel_dp_check_link_status(intel_dp) ||
> + intel_dp->compliance_test_type == DP_TEST_LINK_TRAINING) {
> + intel_dp_start_link_train(intel_dp);
> + intel_dp_stop_link_train(intel_dp);
> + }
> drm_modeset_unlock(&dev->mode_config.connection_mutex);
>
> return true;
> @@ -4271,7 +4274,11 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
> * link loss triggerring long pulse!!!!
> */
> drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
> - intel_dp_check_link_status(intel_dp);
> + if (!intel_dp_check_link_status(intel_dp) ||
> + intel_dp->compliance_test_type == DP_TEST_LINK_TRAINING) {
> + intel_dp_start_link_train(intel_dp);
> + intel_dp_stop_link_train(intel_dp);
> + }
> drm_modeset_unlock(&dev->mode_config.connection_mutex);
> goto out;
> }
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] drm/i915: intel_dp_check_link_status should only return status of link
2016-07-02 0:35 ` Rodrigo Vivi
@ 2016-07-11 22:41 ` Manasi Navare
0 siblings, 0 replies; 8+ messages in thread
From: Manasi Navare @ 2016-07-11 22:41 UTC (permalink / raw)
To: Rodrigo Vivi; +Cc: intel-gfx
On Fri, Jul 01, 2016 at 05:35:25PM -0700, Rodrigo Vivi wrote:
> On Fri, Jul 1, 2016 at 3:47 PM, Manasi Navare <manasi.d.navare@intel.com> wrote:
> > Intel_dp_check_link_status() function reads the Link status registers
> > and returns a boolean to indicate link is good or bad.
> > If the link is bad, it is retrained outside the function based
> > on the return value.
> >
> > Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_dp.c | 41 ++++++++++++++++++++++++-----------------
> > 1 file changed, 24 insertions(+), 17 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index 6d586b7..c795c9e 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -3863,7 +3863,7 @@ go_again:
> > return -EINVAL;
> > }
> >
> > -static void
> > +static bool
> > intel_dp_check_link_status(struct intel_dp *intel_dp)
> > {
> > struct intel_encoder *intel_encoder = &dp_to_dig_port(intel_dp)->base;
> > @@ -3873,26 +3873,25 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)
> > WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex));
> >
> > if (!intel_dp_get_link_status(intel_dp, link_status)) {
> > - DRM_ERROR("Failed to get link status\n");
> > - return;
> > + DRM_DEBUG_KMS("Failed to get link status\n");
> > + return false;
> > }
> >
> > - if (!intel_encoder->base.crtc)
> > - return;
>
> where did this check go? why don't we need this anymore?
>
This function is being refactored to handle upront link training independent
of modeset and according to the spec, this function should only read the DPCD registers
to check if the link is valid. In case of upfront link training, we do not care about
the crtc or if the crtc is active hence this and the next check for crtc acrive are
not needed.
> > + /* Check if the link is valid by reading the bits of Link status
> > + * registers
> > + */
> > + if (!drm_dp_channel_eq_ok(link_status, intel_dp->lane_count) ||
> > + !drm_dp_clock_recovery_ok(link_status, intel_dp->lane_count)) {
> > + DRM_DEBUG_KMS("Channel EQ or CR not ok, need to retrain\n");
> > + return false;
> > + }
> >
> > - if (!to_intel_crtc(intel_encoder->base.crtc)->active)
> > - return;
>
> what happens if it is not active now? are we going to attemtp the
> retraing in this case?
> in other words: we really don't need this check anymore as the one above?
>
> Thanks,
> Rodrigo.
>
> > + DRM_DEBUG_KMS("Link is good, no need to retrain\n");
> > + return true;
> >
> > - /* if link training is requested we should perform it always */
> > - if ((intel_dp->compliance_test_type == DP_TEST_LINK_TRAINING) ||
> > - (!drm_dp_channel_eq_ok(link_status, intel_dp->lane_count))) {
> > - DRM_DEBUG_KMS("%s: channel EQ not ok, retraining\n",
> > - intel_encoder->base.name);
> > - intel_dp_start_link_train(intel_dp);
> > - intel_dp_stop_link_train(intel_dp);
> > - }
> > }
> >
> > +
> > /*
> > * According to DP spec
> > * 5.1.2:
> > @@ -3950,7 +3949,11 @@ intel_dp_short_pulse(struct intel_dp *intel_dp)
> > }
> >
> > drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
> > - intel_dp_check_link_status(intel_dp);
> > + if (!intel_dp_check_link_status(intel_dp) ||
> > + intel_dp->compliance_test_type == DP_TEST_LINK_TRAINING) {
> > + intel_dp_start_link_train(intel_dp);
> > + intel_dp_stop_link_train(intel_dp);
> > + }
> > drm_modeset_unlock(&dev->mode_config.connection_mutex);
> >
> > return true;
> > @@ -4271,7 +4274,11 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)
> > * link loss triggerring long pulse!!!!
> > */
> > drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
> > - intel_dp_check_link_status(intel_dp);
> > + if (!intel_dp_check_link_status(intel_dp) ||
> > + intel_dp->compliance_test_type == DP_TEST_LINK_TRAINING) {
> > + intel_dp_start_link_train(intel_dp);
> > + intel_dp_stop_link_train(intel_dp);
> > + }
> > drm_modeset_unlock(&dev->mode_config.connection_mutex);
> > goto out;
> > }
> > --
> > 1.9.1
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>
>
> --
> Rodrigo Vivi
> Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* ✗ Ro.CI.BAT: failure for drm/i915: intel_dp_check_link_status should only return status of link
2016-07-01 22:47 [PATCH] drm/i915: intel_dp_check_link_status should only return status of link Manasi Navare
2016-07-02 0:35 ` Rodrigo Vivi
@ 2016-07-02 5:46 ` Patchwork
2016-07-02 6:32 ` [PATCH] " kbuild test robot
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2016-07-02 5:46 UTC (permalink / raw)
To: Navare, Manasi D; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: intel_dp_check_link_status should only return status of link
URL : https://patchwork.freedesktop.org/series/9400/
State : failure
== Summary ==
Series 9400v1 drm/i915: intel_dp_check_link_status should only return status of link
http://patchwork.freedesktop.org/api/1.0/series/9400/revisions/1/mbox
Test drv_module_reload_basic:
pass -> DMESG-WARN (ro-bdw-i7-5600u)
pass -> INCOMPLETE (ro-bdw-i7-5557U)
pass -> SKIP (fi-skl-i5-6260u)
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-uc:
pass -> DMESG-FAIL (ro-skl3-i5-6260u)
pass -> DMESG-FAIL (fi-skl-i5-6260u)
pass -> DMESG-FAIL (fi-skl-i7-6700k)
Subgroup basic-batch-kernel-default-wb:
dmesg-fail -> PASS (fi-skl-i5-6260u)
Test gem_exec_suspend:
Subgroup basic-s3:
incomplete -> PASS (fi-hsw-i7-4770k)
Test gem_storedw_loop:
Subgroup basic-default:
pass -> INCOMPLETE (ro-bdw-i5-5250u)
fi-hsw-i7-4770k total:231 pass:196 dwarn:0 dfail:0 fail:2 skip:33
fi-skl-i5-6260u total:231 pass:202 dwarn:0 dfail:3 fail:0 skip:26
fi-skl-i7-6700k total:231 pass:189 dwarn:0 dfail:3 fail:0 skip:39
fi-snb-i7-2600 total:231 pass:176 dwarn:0 dfail:0 fail:2 skip:53
ro-bdw-i5-5250u total:10 pass:9 dwarn:0 dfail:0 fail:0 skip:0
ro-bdw-i7-5557U total:26 pass:20 dwarn:0 dfail:0 fail:0 skip:5
ro-bdw-i7-5600u total:229 pass:189 dwarn:1 dfail:1 fail:0 skip:38
ro-bsw-n3050 total:229 pass:176 dwarn:1 dfail:1 fail:2 skip:49
ro-byt-n2820 total:229 pass:180 dwarn:0 dfail:1 fail:3 skip:45
ro-hsw-i3-4010u total:229 pass:197 dwarn:0 dfail:1 fail:0 skip:31
ro-hsw-i7-4770r total:229 pass:197 dwarn:0 dfail:1 fail:0 skip:31
ro-ilk-i7-620lm total:229 pass:157 dwarn:0 dfail:1 fail:1 skip:70
ro-ilk1-i5-650 total:224 pass:157 dwarn:0 dfail:1 fail:1 skip:65
ro-ivb-i7-3770 total:229 pass:188 dwarn:0 dfail:1 fail:0 skip:40
ro-skl3-i5-6260u total:229 pass:207 dwarn:1 dfail:2 fail:0 skip:19
ro-snb-i7-2620M total:229 pass:179 dwarn:0 dfail:1 fail:1 skip:48
fi-kbl-qkkr failed to connect after reboot
Results at /archive/results/CI_IGT_test/RO_Patchwork_1369/
8707e23 drm-intel-nightly: 2016y-07m-01d-20h-18m-16s UTC integration manifest
fbe3b82 drm/i915: intel_dp_check_link_status should only return status of link
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] drm/i915: intel_dp_check_link_status should only return status of link
2016-07-01 22:47 [PATCH] drm/i915: intel_dp_check_link_status should only return status of link Manasi Navare
2016-07-02 0:35 ` Rodrigo Vivi
2016-07-02 5:46 ` ✗ Ro.CI.BAT: failure for " Patchwork
@ 2016-07-02 6:32 ` kbuild test robot
2016-07-02 7:09 ` kbuild test robot
2016-07-02 9:29 ` Lukas Wunner
4 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2016-07-02 6:32 UTC (permalink / raw)
To: Manasi Navare; +Cc: intel-gfx, kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2276 bytes --]
Hi,
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v4.7-rc5 next-20160701]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Manasi-Navare/drm-i915-intel_dp_check_link_status-should-only-return-status-of-link/20160702-124153
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-i0-201626 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers/gpu/drm/i915/intel_dp.c: In function 'intel_dp_check_link_status':
>> drivers/gpu/drm/i915/intel_dp.c:3872:24: error: unused variable 'intel_encoder' [-Werror=unused-variable]
struct intel_encoder *intel_encoder = &dp_to_dig_port(intel_dp)->base;
^~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/intel_encoder +3872 drivers/gpu/drm/i915/intel_dp.c
0e32b39c Dave Airlie 2014-05-02 3866 return -EINVAL;
0e32b39c Dave Airlie 2014-05-02 3867 }
0e32b39c Dave Airlie 2014-05-02 3868
84fa171b Manasi Navare 2016-07-01 3869 static bool
5c9114d0 Shubhangi Shrivastava 2016-03-30 3870 intel_dp_check_link_status(struct intel_dp *intel_dp)
5c9114d0 Shubhangi Shrivastava 2016-03-30 3871 {
5c9114d0 Shubhangi Shrivastava 2016-03-30 @3872 struct intel_encoder *intel_encoder = &dp_to_dig_port(intel_dp)->base;
5c9114d0 Shubhangi Shrivastava 2016-03-30 3873 struct drm_device *dev = intel_dp_to_dev(intel_dp);
5c9114d0 Shubhangi Shrivastava 2016-03-30 3874 u8 link_status[DP_LINK_STATUS_SIZE];
5c9114d0 Shubhangi Shrivastava 2016-03-30 3875
:::::: The code at line 3872 was first introduced by commit
:::::: 5c9114d0ced2f16d1bfeda650b4acf95159f4759 drm/i915: Reorganizing intel_dp_check_link_status
:::::: TO: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
:::::: CC: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 29665 bytes --]
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] drm/i915: intel_dp_check_link_status should only return status of link
2016-07-01 22:47 [PATCH] drm/i915: intel_dp_check_link_status should only return status of link Manasi Navare
` (2 preceding siblings ...)
2016-07-02 6:32 ` [PATCH] " kbuild test robot
@ 2016-07-02 7:09 ` kbuild test robot
2016-07-02 9:29 ` Lukas Wunner
4 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2016-07-02 7:09 UTC (permalink / raw)
To: Manasi Navare; +Cc: intel-gfx, kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3495 bytes --]
Hi,
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on v4.7-rc5 next-20160701]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Manasi-Navare/drm-i915-intel_dp_check_link_status-should-only-return-status-of-link/20160702-124153
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-rhel (attached as .config)
compiler: gcc-4.9 (Debian 4.9.3-14) 4.9.3
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
drivers/gpu/drm/i915/intel_dp.c: In function 'intel_dp_check_link_status':
>> drivers/gpu/drm/i915/intel_dp.c:3872:24: warning: unused variable 'intel_encoder' [-Wunused-variable]
struct intel_encoder *intel_encoder = &dp_to_dig_port(intel_dp)->base;
^
vim +/intel_encoder +3872 drivers/gpu/drm/i915/intel_dp.c
0e32b39c Dave Airlie 2014-05-02 3856 return ret;
0e32b39c Dave Airlie 2014-05-02 3857 } else {
0e32b39c Dave Airlie 2014-05-02 3858 struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
0e32b39c Dave Airlie 2014-05-02 3859 DRM_DEBUG_KMS("failed to get ESI - device may have failed\n");
0e32b39c Dave Airlie 2014-05-02 3860 intel_dp->is_mst = false;
0e32b39c Dave Airlie 2014-05-02 3861 drm_dp_mst_topology_mgr_set_mst(&intel_dp->mst_mgr, intel_dp->is_mst);
0e32b39c Dave Airlie 2014-05-02 3862 /* send a hotplug event */
0e32b39c Dave Airlie 2014-05-02 3863 drm_kms_helper_hotplug_event(intel_dig_port->base.base.dev);
0e32b39c Dave Airlie 2014-05-02 3864 }
0e32b39c Dave Airlie 2014-05-02 3865 }
0e32b39c Dave Airlie 2014-05-02 3866 return -EINVAL;
0e32b39c Dave Airlie 2014-05-02 3867 }
0e32b39c Dave Airlie 2014-05-02 3868
84fa171b Manasi Navare 2016-07-01 3869 static bool
5c9114d0 Shubhangi Shrivastava 2016-03-30 3870 intel_dp_check_link_status(struct intel_dp *intel_dp)
5c9114d0 Shubhangi Shrivastava 2016-03-30 3871 {
5c9114d0 Shubhangi Shrivastava 2016-03-30 @3872 struct intel_encoder *intel_encoder = &dp_to_dig_port(intel_dp)->base;
5c9114d0 Shubhangi Shrivastava 2016-03-30 3873 struct drm_device *dev = intel_dp_to_dev(intel_dp);
5c9114d0 Shubhangi Shrivastava 2016-03-30 3874 u8 link_status[DP_LINK_STATUS_SIZE];
5c9114d0 Shubhangi Shrivastava 2016-03-30 3875
5c9114d0 Shubhangi Shrivastava 2016-03-30 3876 WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex));
5c9114d0 Shubhangi Shrivastava 2016-03-30 3877
5c9114d0 Shubhangi Shrivastava 2016-03-30 3878 if (!intel_dp_get_link_status(intel_dp, link_status)) {
84fa171b Manasi Navare 2016-07-01 3879 DRM_DEBUG_KMS("Failed to get link status\n");
84fa171b Manasi Navare 2016-07-01 3880 return false;
:::::: The code at line 3872 was first introduced by commit
:::::: 5c9114d0ced2f16d1bfeda650b4acf95159f4759 drm/i915: Reorganizing intel_dp_check_link_status
:::::: TO: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
:::::: CC: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 37220 bytes --]
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] drm/i915: intel_dp_check_link_status should only return status of link
2016-07-01 22:47 [PATCH] drm/i915: intel_dp_check_link_status should only return status of link Manasi Navare
` (3 preceding siblings ...)
2016-07-02 7:09 ` kbuild test robot
@ 2016-07-02 9:29 ` Lukas Wunner
2016-07-11 22:47 ` Manasi Navare
4 siblings, 1 reply; 8+ messages in thread
From: Lukas Wunner @ 2016-07-02 9:29 UTC (permalink / raw)
To: Manasi Navare; +Cc: intel-gfx
On Fri, Jul 01, 2016 at 03:47:56PM -0700, Manasi Navare wrote:
> Intel_dp_check_link_status() function reads the Link status registers
> and returns a boolean to indicate link is good or bad.
> If the link is bad, it is retrained outside the function based
> on the return value.
>
> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 41 ++++++++++++++++++++++++-----------------
> 1 file changed, 24 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 6d586b7..c795c9e 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -3863,7 +3863,7 @@ go_again:
> return -EINVAL;
> }
>
> -static void
> +static bool
> intel_dp_check_link_status(struct intel_dp *intel_dp)
> {
A common pattern is to name bool functions like a yes/no question,
so you might want to adjust the name to something like
intel_dp_link_status_ok() or intel_dp_link_is_good() here.
Best regards,
Lukas
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] drm/i915: intel_dp_check_link_status should only return status of link
2016-07-02 9:29 ` Lukas Wunner
@ 2016-07-11 22:47 ` Manasi Navare
0 siblings, 0 replies; 8+ messages in thread
From: Manasi Navare @ 2016-07-11 22:47 UTC (permalink / raw)
To: Lukas Wunner; +Cc: intel-gfx
On Sat, Jul 02, 2016 at 11:29:05AM +0200, Lukas Wunner wrote:
> On Fri, Jul 01, 2016 at 03:47:56PM -0700, Manasi Navare wrote:
> > Intel_dp_check_link_status() function reads the Link status registers
> > and returns a boolean to indicate link is good or bad.
> > If the link is bad, it is retrained outside the function based
> > on the return value.
> >
> > Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_dp.c | 41 ++++++++++++++++++++++++-----------------
> > 1 file changed, 24 insertions(+), 17 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index 6d586b7..c795c9e 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -3863,7 +3863,7 @@ go_again:
> > return -EINVAL;
> > }
> >
> > -static void
> > +static bool
> > intel_dp_check_link_status(struct intel_dp *intel_dp)
> > {
>
> A common pattern is to name bool functions like a yes/no question,
> so you might want to adjust the name to something like
> intel_dp_link_status_ok() or intel_dp_link_is_good() here.
>
> Best regards,
>
> Lukas
I will change the name to follow this naming pattern.
Regards
Manasi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-07-11 22:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-01 22:47 [PATCH] drm/i915: intel_dp_check_link_status should only return status of link Manasi Navare
2016-07-02 0:35 ` Rodrigo Vivi
2016-07-11 22:41 ` Manasi Navare
2016-07-02 5:46 ` ✗ Ro.CI.BAT: failure for " Patchwork
2016-07-02 6:32 ` [PATCH] " kbuild test robot
2016-07-02 7:09 ` kbuild test robot
2016-07-02 9:29 ` Lukas Wunner
2016-07-11 22:47 ` Manasi Navare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox