1. 10 2月, 2016 4 次提交
  2. 05 2月, 2016 10 次提交
    • M
      drm/dp/mst: deallocate payload on port destruction · 91a25e46
      Mykola Lysenko 提交于
      This is needed to properly deallocate port payload
      after downstream branch get unplugged.
      
      In order to do this unplugged MST topology should
      be preserved, to find first alive port on path to
      unplugged MST topology, and send payload deallocation
      request to branch device of found port.
      
      For this mstb and port kref's are used in reversed
      order to track when port and branch memory could be
      freed.
      
      Added additional functions to find appropriate mstb
      as described above.
      Signed-off-by: NMykola Lysenko <Mykola.Lysenko@amd.com>
      Reviewed-by: NHarry Wentland <Harry.Wentland@amd.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      91a25e46
    • A
      drm/dp/mst: Reverse order of MST enable and clearing VC payload table. · c175cd16
      Andrey Grodzovsky 提交于
      On DELL U3014 if you clear the table before enabling MST it sometimes
      hangs the receiver.
      Signed-off-by: NAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>
      Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
      Cc: stable@vger.kernel.org
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      c175cd16
    • H
      drm/dp/mst: move GUID storage from mgr, port to only mst branch · 5e93b820
      Hersen Wu 提交于
      Previous implementation does not handle case below: boot up one MST branch
      to DP connector of ASIC. After boot up, hot plug 2nd MST branch to DP output
      of 1st MST, GUID is not created for 2nd MST branch. When downstream port of
      2nd MST branch send upstream request, it fails because 2nd MST branch GUID
      is not available.
      
      New Implementation: only create GUID for MST branch and save it within Branch.
      Signed-off-by: NHersen Wu <hersenxs.wu@amd.com>
      Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
      Cc: stable@vger.kernel.org
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      5e93b820
    • M
      drm/dp/mst: change MST detection scheme · cfcfa086
      Mykola Lysenko 提交于
      1. Get edid for all connected MST displays, not only on logical ports,
         in the same thread as MST topology detection is done:
           There are displays that have branches inside w/o logical ports.
           So in case another SST display connected downstream system can
           end-up in situation when 3 DOWN requests sent: two for
          ‘remote i2c read’ and one for ‘enum path resources’, making slots full.
      
      2. Call notification callback in one place in the end of topology discovery/update:
           This is done to reduce number of events sent to userspace in case complex
           topology discovery is going, adding multiple number of connectors;
      
      3. Remove notification callback call from short pulse interrupt processing function:
           This is done in order not to block interrupt processing function, in case any
           MST request will be made from it. Notification will be send from topology
           discovery/update work item.
      Signed-off-by: NMykola Lysenko <Mykola.Lysenko@amd.com>
      Reviewed-by: NHarry Wentland <Harry.Wentland@amd.com>
      Cc: stable@vger.kernel.org
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      cfcfa086
    • H
      drm/dp/mst: Calculate MST PBN with 31.32 fixed point · a9ebb3e4
      Harry Wentland 提交于
      Our PBN value overflows the 20 bits integer part of the 20.12
      fixed point. We need to use 31.32 fixed point to avoid this.
      
      This happens with display clocks larger than 293122 (at 24 bpp),
      which we see with the Sharp (and similar) 4k tiled displays.
      Signed-off-by: NHarry Wentland <harry.wentland@amd.com>
      Cc: stable@vger.kernel.org
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      a9ebb3e4
    • I
      drm/mst: Add range check for max_payloads during init · 4d6a10da
      Imre Deak 提交于
      max_payload is limited by the space we have in
      drm_dp_mst_topology_mgr::vcpi_mask,payload_mask. We need to track
      max_payloads+1 IDs in these masks, see drm_dp_mst_assign_payload_id().
      Add a sanity check for this.
      
      Caught by coverity.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NDavid Weinehall <david.weinehall@intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      4d6a10da
    • I
      drm/mst: Don't ignore the MST PBN self-test result · 441388a8
      Imre Deak 提交于
      Otherwise this call would have no effect.
      
      Caught by Coverity.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NDavid Weinehall <david.weinehall@intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      441388a8
    • I
      drm: fix missing reference counting decrease · dabe1954
      Insu Yun 提交于
      In drm_dp_mst_allocate_vcpi, it returns true in two paths,
      but in one path, there is no reference couting decrease.
      Signed-off-by: NInsu Yun <wuninsu@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      dabe1954
    • J
      xhci: harden xhci_find_next_ext_cap against device removal · 89140fda
      Joe Lawrence 提交于
      xhci_find_next_ext_cap doesn't check for PCI hotplug removal and may use
      the PCI master abort bit pattern (~0) to calculate a new PCI address
      offset to read/write.  The has lead to reproducable crashes when testing
      surprise removal during device initialization on a Stratus platform, at
      least after commit d5ddcdf4 ("xhci: rework xhci extended capability
      list parsing functions").
      
      The crash is repeatable on a Stratus platform when injecting hardware
      faults to induce xHCI host controller hotplug during driver
      initialization.  If a PCI read in xhci_find_next_ext_cap returns the
      master abort pattern, quirk_usb_handoff_xhci may start using a bogus
      ext_cap_offset to start searching more bogus PCI addresses.
      Signed-off-by: NJoe Lawrence <joe.lawrence@stratus.com>
      Acked-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      89140fda
    • M
      [media] saa7134-alsa: Only frees registered sound cards · ac75fe5d
      Mauro Carvalho Chehab 提交于
      That prevents this bug:
      [ 2382.269496] BUG: unable to handle kernel NULL pointer dereference at 0000000000000540
      [ 2382.270013] IP: [<ffffffffa01fe616>] snd_card_free+0x36/0x70 [snd]
      [ 2382.270013] PGD 0
      [ 2382.270013] Oops: 0002 [#1] SMP
      [ 2382.270013] Modules linked in: saa7134_alsa(-) tda1004x saa7134_dvb videobuf2_dvb dvb_core tda827x tda8290 tuner saa7134 tveeprom videobuf2_dma_sg videobuf2_memops videobuf2_v4l2 videobuf2_core v4l2_common videodev media auth_rpcgss nfsv4 dns_resolver nfs lockd grace sunrpc tun bridge stp llc ebtables ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack it87 hwmon_vid snd_hda_codec_idt snd_hda_codec_generic iTCO_wdt iTCO_vendor_support snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core snd_seq pcspkr i2c_i801 snd_seq_device snd_pcm snd_timer lpc_ich snd mfd_core soundcore binfmt_misc i915 video i2c_algo_bit drm_kms_helper drm r8169 ata_generic serio_raw pata_acpi mii i2c_core [last unloaded: videobuf2_memops]
      [ 2382.270013] CPU: 0 PID: 4899 Comm: rmmod Not tainted 4.5.0-rc1+ #4
      [ 2382.270013] Hardware name: PCCHIPS P17G/P17G, BIOS 080012  05/14/2008
      [ 2382.270013] task: ffff880039c38000 ti: ffff88003c764000 task.ti: ffff88003c764000
      [ 2382.270013] RIP: 0010:[<ffffffffa01fe616>]  [<ffffffffa01fe616>] snd_card_free+0x36/0x70 [snd]
      [ 2382.270013] RSP: 0018:ffff88003c767ea0  EFLAGS: 00010286
      [ 2382.270013] RAX: ffff88003c767eb8 RBX: 0000000000000000 RCX: 0000000000006260
      [ 2382.270013] RDX: ffffffffa020a060 RSI: ffffffffa0206de1 RDI: ffff88003c767eb0
      [ 2382.270013] RBP: ffff88003c767ed8 R08: 0000000000019960 R09: ffffffff811a5412
      [ 2382.270013] R10: ffffea0000d7c200 R11: 0000000000000000 R12: ffff88003c767ea8
      [ 2382.270013] R13: 00007ffe760617f7 R14: 0000000000000000 R15: 0000557625d7f1e0
      [ 2382.270013] FS:  00007f80bb1c0700(0000) GS:ffff88003f400000(0000) knlGS:0000000000000000
      [ 2382.270013] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      [ 2382.270013] CR2: 0000000000000540 CR3: 000000003c00f000 CR4: 00000000000006f0
      [ 2382.270013] Stack:
      [ 2382.270013]  000000003c767ed8 ffffffff00000000 ffff880000000000 ffff88003c767eb8
      [ 2382.270013]  ffff88003c767eb8 ffffffffa049a890 00007ffe76060060 ffff88003c767ef0
      [ 2382.270013]  ffffffffa049889d ffffffffa049a500 ffff88003c767f48 ffffffff8111079c
      [ 2382.270013] Call Trace:
      [ 2382.270013]  [<ffffffffa049889d>] saa7134_alsa_exit+0x1d/0x780 [saa7134_alsa]
      [ 2382.270013]  [<ffffffff8111079c>] SyS_delete_module+0x19c/0x1f0
      [ 2382.270013]  [<ffffffff8170fc2e>] entry_SYSCALL_64_fastpath+0x12/0x71
      [ 2382.270013] Code: 20 a0 48 c7 c6 e1 6d 20 a0 48 89 e5 41 54 53 4c 8d 65 d0 48 89 fb 48 83 ec 28 c7 45 d0 00 00 00 00 49 8d 7c 24 08 e8 7a 55 ed e0 <4c> 89 a3 40 05 00 00 48 89 df e8 eb fd ff ff 85 c0 75 1a 48 8d
      [ 2382.270013] RIP  [<ffffffffa01fe616>] snd_card_free+0x36/0x70 [snd]
      [ 2382.270013]  RSP <ffff88003c767ea0>
      [ 2382.270013] CR2: 0000000000000540
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      ac75fe5d
  3. 04 2月, 2016 26 次提交