1. 17 11月, 2015 1 次提交
    • M
      drm/i915: Clear intel_crtc->atomic before updating it. · ba8af3e5
      Maarten Lankhorst 提交于
      If an atomic update fails intel_crtc->atomic may have have some values left
      from the last atomic check. One example is atomic->wait_for_vblank,
      which results in spurious errors in kms_flip.
      
      [ 1551.892708] ------------[ cut here ]------------
      [ 1551.892721] WARNING: CPU: 3 PID: 4179 at ../drivers/gpu/drm/drm_irq.c:1199 drm_wait_one_vblank+0x197/0x1a0 [drm]()
      [ 1551.892722] vblank not available on crtc 2, ret=-22
      [ 1551.892751] Modules linked in: snd_hda_intel i915 drm_kms_helper drm
      intel_gtt i2c_algo_bit cfbfillrect syscopyarea cfbimgblt sysfillrect
      sysimgblt fb_sys_fops cfbcopyarea agpgart cfg80211 binfmt_misc
      snd_hda_codec_hdmi intel_rapl iosf_mbi x86_pkg_temp_thermal coretemp
      kvm_intel snd_hda_codec_realtek kvm snd_hda_codec_generic iTCO_wdt
      aesni_intel aes_x86_64 glue_helper lrw snd_hda_codec gf128mul
      ablk_helper cryptd snd_hwdep psmouse snd_hda_core pcspkr snd_pcm
      snd_timer snd lpc_ich i2c_i801 mfd_core soundcore wmi evdev [last
      unloaded: drm]
      [ 1551.892753] CPU: 3 PID: 4179 Comm: kms_pipe_crc_ba Tainted: G     U  W       4.3.0-reg+ #6
      [ 1551.892754] Hardware name:                  /DZ77BH-55K, BIOS BHZ7710H.86A.0100.2013.0517.0942 05/17/2013
      [ 1551.892758]  ffffffffa03128d8 ffff8800cec73890 ffffffff812c0f3c ffff8800cec738d8
      [ 1551.892760]  ffff8800cec738c8 ffffffff8104ff36 ffff880116ae2290 0000000000000002
      [ 1551.892762]  ffff8800d39fcda0 ffff8800d038b4d0 ffff8800d42b5550 ffff8800cec73928
      [ 1551.892763] Call Trace:
      [ 1551.892768]  [<ffffffff812c0f3c>] dump_stack+0x4e/0x82
      [ 1551.892771]  [<ffffffff8104ff36>] warn_slowpath_common+0x86/0xc0
      [ 1551.892773]  [<ffffffff8104ffbc>] warn_slowpath_fmt+0x4c/0x50
      [ 1551.892781]  [<ffffffffa02e6708>] ? drm_vblank_get+0x78/0xd0 [drm]
      [ 1551.892787]  [<ffffffffa02e6d47>] drm_wait_one_vblank+0x197/0x1a0 [drm]
      [ 1551.892813]  [<ffffffffa03d052f>] intel_post_plane_update+0xef/0x120 [i915]
      [ 1551.892832]  [<ffffffffa03d11d2>] intel_atomic_commit+0x4c2/0x1600 [i915]
      [ 1551.892862]  [<ffffffffa02ff0c7>] ? drm_atomic_check_only+0x147/0x5e0 [drm]
      [ 1551.892872]  [<ffffffffa02feeb7>] ? drm_atomic_add_affected_connectors+0x27/0xf0 [drm]
      [ 1551.892881]  [<ffffffffa02ff597>] drm_atomic_commit+0x37/0x60 [drm]
      [ 1551.892887]  [<ffffffffa034301a>] restore_fbdev_mode+0x28a/0x2c0 [drm_kms_helper]
      [ 1551.892895]  [<ffffffffa0345253>] drm_fb_helper_restore_fbdev_mode_unlocked+0x33/0x80 [drm_kms_helper]
      [ 1551.892900]  [<ffffffffa03452cd>] drm_fb_helper_set_par+0x2d/0x50 [drm_kms_helper]
      [ 1551.892920]  [<ffffffffa03e7a9a>] intel_fbdev_set_par+0x1a/0x60 [i915]
      [ 1551.892923]  [<ffffffff8131a5a7>] fb_set_var+0x1a7/0x3f0
      [ 1551.892927]  [<ffffffff8109732f>] ? trace_hardirqs_on_caller+0x12f/0x1c0
      [ 1551.892931]  [<ffffffff81314f32>] fbcon_blank+0x212/0x2f0
      [ 1551.892935]  [<ffffffff81373f4a>] do_unblank_screen+0xba/0x1d0
      [ 1551.892937]  [<ffffffff8136b725>] vt_ioctl+0x13d5/0x1450
      [ 1551.892940]  [<ffffffff8107cdd1>] ? preempt_count_sub+0x41/0x50
      [ 1551.892943]  [<ffffffff8135d8a3>] tty_ioctl+0x423/0xe30
      [ 1551.892947]  [<ffffffff8119f721>] do_vfs_ioctl+0x301/0x560
      [ 1551.892949]  [<ffffffff8119b1e3>] ? putname+0x53/0x60
      [ 1551.892952]  [<ffffffff811ab376>] ? __fget_light+0x66/0x90
      [ 1551.892955]  [<ffffffff8119f9f9>] SyS_ioctl+0x79/0x90
      [ 1551.892958]  [<ffffffff81552e97>] entry_SYSCALL_64_fastpath+0x12/0x6f
      [ 1551.892961] ---[ end trace 3e764d4b6628c91c ]---
      
      Testcase: kms_flip
      Reported-and-tested-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Cc: stable@vger.kernel.org #v4.3
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: NDaniel Stone <daniels@collabora.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/5649C2BA.6080300@mblankhorst.nl
      ba8af3e5
  2. 16 11月, 2015 4 次提交
  3. 13 11月, 2015 5 次提交
    • S
      mpt3sas: fix inline markers on non inline function declarations · 0a5149ba
      Stephen Rothwell 提交于
      After merging the scsi tree, today's linux-next build (powerpc
      allyesconfig) failed like this:
      
      In file included from drivers/scsi/mpt3sas/mpt3sas_scsih.c:59:0:
      drivers/scsi/mpt3sas/mpt3sas_scsih.c: In function '_scsih_io_done':
      drivers/scsi/mpt3sas/mpt3sas_base.h:1414:1: error: inlining failed in call to always_inline 'mpt3sas_scsi_direct_io_get': function body not available
       mpt3sas_scsi_direct_io_get(struct MPT3SAS_ADAPTER *ioc, u16 smid);
       ^
      drivers/scsi/mpt3sas/mpt3sas_scsih.c:4448:6: error: called from here
        if (mpt3sas_scsi_direct_io_get(ioc, smid) &&
            ^
      In file included from drivers/scsi/mpt3sas/mpt3sas_scsih.c:59:0:
      drivers/scsi/mpt3sas/mpt3sas_base.h:1416:1: error: inlining failed in call to always_inline 'mpt3sas_scsi_direct_io_set': function body not available
       mpt3sas_scsi_direct_io_set(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 direct_io);
       ^
      drivers/scsi/mpt3sas/mpt3sas_scsih.c:4454:3: error: called from here
         mpt3sas_scsi_direct_io_set(ioc, smid, 0);
         ^
      In file included from drivers/scsi/mpt3sas/mpt3sas_scsih.c:5
      9:0:
      drivers/scsi/mpt3sas/mpt3sas_base.h:1416:1: error: inlining failed in call to always_inline 'mpt3sas_scsi_direct_io_set': function body not available
       mpt3sas_scsi_direct_io_set(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 direct_io);
       ^
      drivers/scsi/mpt3sas/mpt3sas_scsih.c:4454:3: error: called from here
         mpt3sas_scsi_direct_io_set(ioc, smid, 0);
         ^
      
      Presumably caused by commit
      
        c84b06a4 ("mpt3sas: Single driver module which supports both SAS 2.0 & SAS 3.0 HBAs")
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
      0a5149ba
    • M
      Revert "drm/rockchip: Convert the probe function to the generic drm_of_component_probe()" · 5bad7d29
      Mark Yao 提交于
      This reverts commit 52f5eb60.
      
      Rockchip drm can't work with generic drm_of_component_probe now
      Signed-off-by: NMark Yao <mark.yao@rock-chips.com>
      Acked-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      5bad7d29
    • V
      drm: Don't oops in drm_calc_timestamping_constants() if drm_vblank_init() wasn't called · 0c545ac4
      Ville Syrjälä 提交于
      Seems the crtc helpers call drm_calc_timestamping_constants()
      unconditionally even if the driver didn't initialize vblank support by
      calling drm_vblank_init(). That used to be OK since the constants were
      stored under drm_crtc.
      
      However I broke this with
      commit eba1f35d ("drm: Move timestamping constants into drm_vblank_crtc")
      when I moved the constants to live inside the drm_vblank_crtc struct
      instead. If drm_vblank_init() isn't called, we don't allocate these
      structures, and so drm_calc_timestamping_constants() will oops.
      
      Fix it by adding a check into drm_calc_timestamping_constants() to see
      if vblank support was initialized at all. And to keep in line with other
      such checks, also toss in a check and warn for the case where vblank
      support was initialized, but the wrong number of crtcs was specified.
      
      Fixes the following sort of oops:
       BUG: unable to handle kernel NULL pointer dereference at 00000000000000b0
       IP: [<ffffffffa014b266>] drm_calc_timestamping_constants+0x86/0x130 [drm]
       PGD 0
       Oops: 0002 [#1] SMP
       Modules linked in: sr_mod cdrom mgag200(+) i2c_algo_bit drm_kms_helper ahci syscopyarea sysfillrect sysimgblt libahci fb_sys_fops bnx2x ttm tg3(+) mdio drm ptp sd_mod libata i2c_core pps_core libcrc32c hpsa dm_mirror dm_region_hash dm_log dm_mod
       CPU: 0 PID: 418 Comm: kworker/0:2 Not tainted 4.3.0+ #1
       Hardware name: HP ProLiant DL380 Gen9, BIOS P89 06/09/2015
       Workqueue: events work_for_cpu_fn
       task: ffff88046ca95500 ti: ffff88007830c000 task.ti: ffff88007830c000
       RIP: 0010:[<ffffffffa014b266>]  [<ffffffffa014b266>] drm_calc_timestamping_constants+0x86/0x130 [drm]
       RSP: 0018:ffff88007830f4e8  EFLAGS: 00010246
       RAX: 0000000000fe4c00 RBX: ffff88006a849160 RCX: 0000000000000540
       RDX: 0000000000000000 RSI: 000000000000fde8 RDI: ffff88006a849000
       RBP: ffff88007830f518 R08: ffff88007830c000 R09: 00000001b87e3712
       R10: 00000000000050c4 R11: 0000000000000000 R12: 0000000000fe4c00
       R13: ffff88006a849000 R14: 0000000000000000 R15: 000000000000fde8
       FS:  0000000000000000(0000) GS:ffff88046f800000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 00000000000000b0 CR3: 00000000019d6000 CR4: 00000000001406f0
       Stack:
        ffff88007830f518 ffff88006a849000 ffff880c69b90340 ffff880c69b90000
        ffff880c69b90348 ffff880c69b90340 ffff88007830f748 ffffffffa042f7e7
        ffff88006a849090 0000000000000000 ffff88006a849160 0000000000000000
       Call Trace:
        [<ffffffffa042f7e7>] drm_crtc_helper_set_mode+0x3d7/0x4b0 [drm_kms_helper]
        [<ffffffffa04307d4>] drm_crtc_helper_set_config+0x8d4/0xb10 [drm_kms_helper]
        [<ffffffffa01548d4>] drm_mode_set_config_internal+0x64/0x100 [drm]
        [<ffffffffa043c342>] drm_fb_helper_pan_display+0xa2/0x280 [drm_kms_helper]
        [<ffffffff81392c7b>] fb_pan_display+0xbb/0x170
        [<ffffffff8138cf70>] bit_update_start+0x20/0x50
        [<ffffffff8138b81b>] fbcon_switch+0x39b/0x590
        [<ffffffff8140a3d0>] redraw_screen+0x1a0/0x240
        [<ffffffff8140b30e>] do_bind_con_driver+0x2ee/0x310
        [<ffffffff8140b651>] do_take_over_console+0x141/0x1b0
        [<ffffffff81387377>] do_fbcon_takeover+0x57/0xb0
        [<ffffffff8138c98b>] fbcon_event_notify+0x60b/0x750
        [<ffffffff810a5599>] notifier_call_chain+0x49/0x70
        [<ffffffff810a58dd>] __blocking_notifier_call_chain+0x4d/0x70
        [<ffffffff810a5916>] blocking_notifier_call_chain+0x16/0x20
        [<ffffffff8139282b>] fb_notifier_call_chain+0x1b/0x20
        [<ffffffff81394881>] register_framebuffer+0x1f1/0x330
        [<ffffffffa043d9aa>] drm_fb_helper_initial_config+0x27a/0x3d0 [drm_kms_helper]
        [<ffffffffa0469b4d>] mgag200_fbdev_init+0xdd/0xf0 [mgag200]
        [<ffffffffa0468586>] mgag200_modeset_init+0x176/0x1e0 [mgag200]
        [<ffffffffa0464659>] mgag200_driver_load+0x3f9/0x580 [mgag200]
        [<ffffffffa014e067>] drm_dev_register+0xa7/0xb0 [drm]
        [<ffffffffa015054f>] drm_get_pci_dev+0x8f/0x1e0 [drm]
        [<ffffffffa046937b>] mga_pci_probe+0x9b/0xc0 [mgag200]
        [<ffffffff813662d5>] local_pci_probe+0x45/0xa0
        [<ffffffff8109afe4>] work_for_cpu_fn+0x14/0x20
        [<ffffffff8109e13c>] process_one_work+0x14c/0x3c0
        [<ffffffff8109eaa4>] worker_thread+0x244/0x470
        [<ffffffff8168bfba>] ? __schedule+0x2aa/0x760
        [<ffffffff8109e860>] ? rescuer_thread+0x310/0x310
        [<ffffffff810a4438>] kthread+0xd8/0xf0
        [<ffffffff810a4360>] ? kthread_park+0x60/0x60
        [<ffffffff8169030f>] ret_from_fork+0x3f/0x70
        [<ffffffff810a4360>] ? kthread_park+0x60/0x60
       Code: f6 31 d2 41 89 c2 8b 83 b4 00 00 00 0f af c1 48 98 48 69 c0 40 42 0f 00 48 f7 f6 f6 43 74 10 41 89 c4 75 26 f6 05 9a 6f 03 00 01 <45> 89 96 b0 00 00 00 45 89 a6 ac 00 00 00 75 35 48 83 c4 08 5b
       RIP  [<ffffffffa014b266>] drm_calc_timestamping_constants+0x86/0x130 [drm]
        RSP <ffff88007830f4e8>
       CR2: 00000000000000b0
      
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Reported-by: NJeff Moyer <jmoyer@redhat.com>
      References: http://lists.freedesktop.org/archives/dri-devel/2015-November/094217.html
      Fixes: eba1f35d ("drm: Move timestamping constants into drm_vblank_crtc")
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      0c545ac4
    • D
      libnvdimm, pmem: fix size trim in pmem_direct_access() · 589e75d1
      Dan Williams 提交于
      This masking prevents access to the end of the device via dax_do_io(),
      and is unnecessary as arch_add_memory() would have rejected an unaligned
      allocation.
      
      Cc: <stable@vger.kernel.org>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      589e75d1
    • D
      libnvdimm, e820: fix numa node for e820-type-12 pmem ranges · f7256dc0
      Dan Williams 提交于
      Rather than punt on the numa node for these e820 ranges try to find a
      better answer with memory_add_physaddr_to_nid() when it is available.
      
      Cc: <stable@vger.kernel.org>
      Reported-by: NBoaz Harrosh <boaz@plexistor.com>
      Tested-by: NBoaz Harrosh <boaz@plexistor.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      f7256dc0
  4. 12 11月, 2015 30 次提交