Re: [PATCH]i915: use WARN_ON_ONCE in intel_dp_aux_transfer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 24, 2016 at 05:03:20PM +0800, Dave Young wrote:
> On 11/24/16 at 10:53am, Jani Nikula wrote:
> > On Thu, 24 Nov 2016, Dave Young <dyoung@xxxxxxxxxx> wrote:
> > > I see a lot of below warning:
> > 
> > No, we must not hide this under the carpet. There's a bug at fdo about
> > this, and we need to fix it.
> 
> It is not hiding it, just not repeating the warnings. But anyway I do
> not have strong opinion. I'm building my kernel with this patch until
> there is a real fix in upstream.

We already have a patch to reduce it a single WARN:
d4cb3fd9b548 ("drm/i915/dp: add lane_count check in intel_dp_check_link_status")

Do we need to get that backported to stable?

> 
> > 
> > BR,
> > Jani.
> > 
> > 
> > > [   17.128256] WARNING: CPU: 1 PID: 95 at drivers/gpu/drm/i915/intel_dp.c:1062 intel_dp_aux_transfer+0x201/0x240 [i915]
> > > [   17.128264] WARN_ON_ONCE(!msg->buffer != !msg->size)
> > > [   17.128267] Modules linked in:
> > > [   17.128273]  kvm_intel kvm irqbypass i915 intel_gtt drm_kms_helper snd_hda_codec_realtek syscopyarea snd_hda_codec_generic sysfillrect sysimgblt fb_sys_fops drm arc4 rtsx_pci_sdmmc iwlmvm mac80211 snd_hda_intel btusb snd_hda_codec btrtl iwlwifi btbcm btintel snd_hwdep snd_hda_core snd_seq bluetooth e1000e i2c_i801 cfg80211 input_leds snd_seq_device i2c_smbus serio_raw pcspkr snd_pcm ptp rtsx_pci pps_core mfd_core snd_timer thinkpad_acpi snd soundcore rfkill video nfsd auth_rpcgss nfs_acl lockd grace sunrpc
> > > [   17.128338] CPU: 1 PID: 95 Comm: kworker/u16:2 Not tainted 4.9.0-rc6+ #200
> > > [   17.128344] Hardware name: LENOVO 20ARS1BJ02/20ARS1BJ02, BIOS GJET91WW (2.41 ) 09/21/2016
> > > [   17.128355] Workqueue: events_unbound async_run_entry_fn
> > > [   17.128361]  ffff9db20105fa98 ffffffffa9eeb8ed ffff9db20105fae8 0000000000000000
> > > [   17.128370]  ffff9db20105fad8 ffffffffa9c5339b 00000426907d27c8 ffff9db20105fbc0
> > > [   17.128379]  ffff9474910510e0 0000000000000003 00000000fffffffb 0000000000000000
> > > [   17.128388] Call Trace:
> > > [   17.128396]  [<ffffffffa9eeb8ed>] dump_stack+0x63/0x86
> > > [   17.128404]  [<ffffffffa9c5339b>] __warn+0xcb/0xf0
> > > [   17.128410]  [<ffffffffa9c5341f>] warn_slowpath_fmt+0x5f/0x80
> > > [   17.128454]  [<ffffffffc0a8e45e>] ? intel_dp_aux_transfer+0xde/0x240 [i915]
> > > [   17.128492]  [<ffffffffc0a8e581>] intel_dp_aux_transfer+0x201/0x240 [i915]
> > > [   17.128507]  [<ffffffffc09b2c82>] drm_dp_dpcd_access+0x72/0x110 [drm_kms_helper]
> > > [   17.128519]  [<ffffffffc09b2d3b>] drm_dp_dpcd_write+0x1b/0x20 [drm_kms_helper]
> > > [   17.128557]  [<ffffffffc0a89b3b>] intel_dp_start_link_train+0x2cb/0x4c0 [i915]
> > > [   17.128594]  [<ffffffffc0a8b099>] intel_dp_check_link_status+0xd9/0x110 [i915]
> > > [   17.128630]  [<ffffffffc0a8fc3f>] intel_dp_detect+0x79f/0xb90 [i915]
> > > [   17.128641]  [<ffffffffc09b413f>] drm_helper_probe_single_connector_modes+0x3ff/0x4f0 [drm_kms_helper]
> > > [   17.128654]  [<ffffffffc09c21fe>] drm_fb_helper_initial_config+0xae/0x430 [drm_kms_helper]
> > > [   17.128697]  [<ffffffffc0a81418>] intel_fbdev_initial_config+0x18/0x30 [i915]
> > > [   17.128705]  [<ffffffffa9c74fb7>] async_run_entry_fn+0x37/0xe0
> > > [   17.128713]  [<ffffffffa9c6c4a9>] process_one_work+0x1e9/0x440
> > > [   17.128721]  [<ffffffffa9c6c74b>] worker_thread+0x4b/0x4f0
> > > [   17.128728]  [<ffffffffa9c6c700>] ? process_one_work+0x440/0x440
> > > [   17.128721]  [<ffffffffa9c6c74b>] worker_thread+0x4b/0x4f0
> > > [   17.128728]  [<ffffffffa9c6c700>] ? process_one_work+0x440/0x440
> > > [   17.128735]  [<ffffffffa9c71f99>] kthread+0xd9/0xf0
> > > [   17.128741]  [<ffffffffa9c1172e>] ? __switch_to+0x2ce/0x580
> > > [   17.128748]  [<ffffffffa9c71ec0>] ? kthread_park+0x60/0x60
> > > [   17.128754]  [<ffffffffa9c71ec0>] ? kthread_park+0x60/0x60
> > > [   17.128762]  [<ffffffffaa1f7835>] ret_from_fork+0x25/0x30
> > > [   17.128768] ---[ end trace 1c8614b2fcd03dac ]---
> > > [   17.151929] [drm:intel_dp_start_link_train [i915]] *ERROR* failed to update link training
> > >
> > > It seems a known issue below:
> > > https://bugs.freedesktop.org/show_bug.cgi?id=97344
> > >
> > > This is not to fix the real problem just use WARN_ON_ONCE is better for
> > > this kind of warnings instead of warn again and again.
> > >
> > > Signed-off-by: Dave Young <dyoung@xxxxxxxxxx>
> > > ---
> > >  drivers/gpu/drm/i915/intel_dp.c |    2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > --- linux-x86.orig/drivers/gpu/drm/i915/intel_dp.c
> > > +++ linux-x86/drivers/gpu/drm/i915/intel_dp.c
> > > @@ -1059,7 +1059,7 @@ intel_dp_aux_transfer(struct drm_dp_aux
> > >  		if (WARN_ON(txsize > 20))
> > >  			return -E2BIG;
> > >  
> > > -		WARN_ON(!msg->buffer != !msg->size);
> > > +		WARN_ON_ONCE(!msg->buffer != !msg->size);
> > >  
> > >  		if (msg->buffer)
> > >  			memcpy(txbuf + HEADER_SIZE, msg->buffer, msg->size);
> > 
> > -- 
> > Jani Nikula, Intel Open Source Technology Center
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux