Linux 4.17.5
Greg KH
maintainerI'm announcing the release of the 4.17.5 kernel.
All users of the 4.17 kernel series must upgrade.
The updated 4.17.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.17.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/imx6q.dtsi | 2 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 7 + arch/x86/include/asm/pgalloc.h | 3 drivers/acpi/osl.c | 72 ++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 24 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 1 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 1 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 14 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 39 ++++++++- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 4 drivers/gpu/drm/amd/amdgpu/vi.c | 77 ++++++++++++++---- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 22 ++++- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 2 drivers/gpu/drm/i915/i915_irq.c | 12 ++ drivers/gpu/drm/i915/i915_reg.h | 5 + drivers/gpu/drm/i915/intel_crt.c | 20 ++++ drivers/gpu/drm/i915/intel_ddi.c | 8 + drivers/gpu/drm/i915/intel_display.c | 16 +++ drivers/gpu/drm/i915/intel_dp.c | 34 +++---- drivers/gpu/drm/i915/intel_dp_mst.c | 14 +++ drivers/gpu/drm/i915/intel_dsi.c | 6 + drivers/gpu/drm/i915/intel_dvo.c | 6 + drivers/gpu/drm/i915/intel_hdmi.c | 6 + drivers/gpu/drm/i915/intel_lrc.c | 12 ++ drivers/gpu/drm/i915/intel_lvds.c | 5 + drivers/gpu/drm/i915/intel_sdvo.c | 6 + drivers/gpu/drm/i915/intel_tv.c | 12 ++ drivers/gpu/drm/qxl/qxl_display.c | 7 + drivers/gpu/drm/sti/Kconfig | 3 drivers/gpu/drm/sun4i/sun4i_tcon.c | 25 ----- drivers/iio/accel/mma8452.c | 2 drivers/staging/android/ion/ion_heap.c | 2 drivers/tty/n_tty.c | 55 +++++++----- drivers/tty/serdev/core.c | 1 drivers/tty/serial/8250/8250_pci.c | 2 drivers/tty/vt/vt.c | 4 drivers/usb/class/cdc-acm.c | 3 drivers/usb/dwc2/hcd_queue.c | 2 drivers/usb/host/xhci-mem.c | 4 drivers/usb/host/xhci-trace.h | 36 +++++++- drivers/usb/serial/cp210x.c | 14 +++ drivers/usb/typec/tcpm.c | 7 - drivers/usb/typec/ucsi/ucsi.c | 13 +++ drivers/usb/typec/ucsi/ucsi_acpi.c | 5 + include/linux/acpi.h | 3 net/ipv6/netfilter/ip6t_rpfilter.c | 2 net/netfilter/nf_tables_core.c | 3 net/netfilter/xt_connmark.c | 2 50 files changed, 488 insertions(+), 149 deletions(-)
Alexander Potapenko (1):
vt: prevent leaking uninitialized data to userspace via /dev/vcs*
Andrey Ryabinin (1):
x86/mm: Don't free P4D table when it is folded at runtime
Andy Shevchenko (1):
serial: 8250_pci: Remove stalled entries in blacklist
Florian Westphal (1):
netfilter: xt_connmark: fix list corruption on rmmod
Greg Kroah-Hartman (1):
Linux 4.17.5
Harry Wentland (1):
drm/amdgpu: Don't default to DC support for Kaveri and older
Heikki Krogerus (3):
acpi: Add helper for deactivating memory region
usb: typec: ucsi: acpi: Workaround for cache mode issue
usb: typec: ucsi: Fix for incorrect status data issue
Houston Yaroschoff (1):
usb: cdc_acm: Add quirk for Uniden UBC125 scanner
Huang Rui (1):
drm/amdgpu: fix the missed vcn fw version report
Jeremy Cline (1):
drm/qxl: Call qxl_bo_unref outside atomic context
Johan Hovold (2):
USB: serial: cp210x: add CESINEL device ids
serdev: fix memleak on module unload
Junwei Zhang (1):
drm/amdgpu: fix clear_all and replace handling in the VM (v2)
Karoly Pados (1):
USB: serial: cp210x: add Silicon Labs IDs for Windows Update
Kenneth Graunke (1):
drm/i915: Enable provoking vertex fix on Gen9 systems.
Laura Abbott (1):
staging: android: ion: Return an ERR_PTR in ion_map_kernel
Leonard Crestez (1):
iio: mma8452: Fix ignoring MMA8452_INT_DRDY
Lyude Paul (3):
drm/amdgpu: Grab/put runtime PM references in atomic_commit_tail() drm/i915/dp: Send DPCD ON for MST before phy_up drm/amdgpu: Count disabled CRTCs in commit tail earlier
Michel Dänzer (5):
drm/amdgpu: Use kvmalloc_array for allocating VRAM manager nodes array drm/amdgpu: Refactor amdgpu_vram_mgr_bo_invisible_size helper drm/amdgpu: Make amdgpu_vram_mgr_bo_invisible_size always accurate drm/amdgpu: Update pin_size values before unpinning BO drm/amdgpu: GPU vs CPU page size fixes in amdgpu_vm_bo_split_mapping
Mikita Lipski (1):
drm/amd/display: Clear connector's edid pointer
Neil Armstrong (1):
ARM64: dts: meson-gxl-s905x-p212: Add phy-supply for usb0
Oliver O'Halloran (1):
drm/sti: Depend on OF rather than selecting it
Paul Kocialkowski (1):
Revert "drm/sun4i: Handle DRM_BUS_FLAG_PIXDATA_*EDGE"
Peter Chen (1):
usb: typec: tcpm: fix logbuffer index is wrong if _tcpm_log is re-entered
Rex Zhu (2):
drm/amdgpu: Add APU support in vi_set_uvd_clocks drm/amdgpu: Add APU support in vi_set_vce_clocks
Sean Nyekjaer (1):
ARM: dts: imx6q: Use correct SDMA script for SPI5 core
Shirish S (1):
drm/amd/display: release spinlock before committing updates to stream
Stefan Agner (1):
drm/atmel-hlcdc: check stride values in the first plane
Taehee Yoo (1):
netfilter: nf_tables: use WARN_ON_ONCE instead of BUG_ON in nft_do_chain()
Tetsuo Handa (2):
n_tty: Fix stall at n_tty_receive_char_special().
n_tty: Access echo_* variables carefully.
Ville Syrjälä (4):
drm/i915: Allow DBLSCAN user modes with eDP/LVDS/DSI drm/i915: Fix PIPESTAT irq ack on i965/g4x drm/i915: Disallow interlaced modes on g4x DP outputs drm/i915: Turn off g4x DP port in .post_disable()
Vincent Bernat (1):
netfilter: ip6t_rpfilter: provide input interface for route lookup
William Wu (1):
usb: dwc2: fix the incorrect bitmaps for the ports of multi_tt hub
Zhengjun Xing (1):
xhci: Fix kernel oops in trace_xhci_free_virt_device
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 17 -SUBLEVEL = 4 +SUBLEVEL = 5 EXTRAVERSION = NAME = Merciless Moray
arch/arm/boot/dts/imx6q.dtsi +1 -1
@@ -96,7 +96,7 @@ clocks = <&clks IMX6Q_CLK_ECSPI5>, <&clks IMX6Q_CLK_ECSPI5>; clock-names = "ipg", "per"; - dmas = <&sdma 11 7 1>, <&sdma 12 7 2>; + dmas = <&sdma 11 8 1>, <&sdma 12 8 2>; dma-names = "rx", "tx"; status = "disabled"; };
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi +7 -0
@@ -189,3 +189,10 @@ &usb0 { status = "okay"; }; + +&usb2_phy0 { + /* + * HDMI_5V is also used as supply for the USB VBUS. + */ + phy-supply = <&hdmi_5v>; +};
arch/x86/include/asm/pgalloc.h +3 -0
@@ -184,6 +184,9 @@ static inline p4d_t *p4d_alloc_one(struct mm_struct *mm, unsigned long addr)static inline void p4d_free (struct mm_struct *mm,p4d_t *p4d) { +if (!pgtable_l5_enabled) +return ; +BUG_ON ((unsigned long )p4d & (PAGE_SIZE -1 ));free_page ((unsigned long )p4d); }
drivers/acpi/osl.c +72 -0
84 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +9 -1
@@ -2080,10 +2080,18 @@ bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)switch (asic_type) {#if defined(CONFIG_DRM_AMD_DC )case CHIP_BONAIRE : -case CHIP_HAWAII :case CHIP_KAVERI :case CHIP_KABINI :case CHIP_MULLINS : +/* +* We have systems in the wild with these ASICs that require +* LVDS and VGA support which is not supported with DC. +* +* Fallback to the non-DC driver here by default so as not to +* cause regressions. +*/ +return amdgpu_dc >0 ; +case CHIP_HAWAII :case CHIP_CARRIZO :case CHIP_STONEY :case CHIP_POLARIS11 :
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +10 -14
@@ -749,8 +749,7 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain, domain =amdgpu_mem_type_to_domain (bo->tbo.mem.mem_type);if (domain ==AMDGPU_GEM_DOMAIN_VRAM ) { adev->vram_pin_size +=amdgpu_bo_size (bo); -if (bo->flags &AMDGPU_GEM_CREATE_NO_CPU_ACCESS ) - adev->invisible_pin_size +=amdgpu_bo_size (bo); + adev->invisible_pin_size +=amdgpu_vram_mgr_bo_invisible_size (bo); }else if (domain ==AMDGPU_GEM_DOMAIN_GTT ) { adev->gart_pin_size +=amdgpu_bo_size (bo); }
@@ -777,25 +776,22 @@ int amdgpu_bo_unpin(struct amdgpu_bo *bo) bo->pin_count--;if (bo->pin_count)return 0 ; -for (i =0 ; i < bo->placement.num_placement; i++) { - bo->placements[i].lpfn =0 ; - bo->placements[i].flags &= ~TTM_PL_FLAG_NO_EVICT ; - } - r =ttm_bo_validate (&bo->tbo, &bo->placement, &ctx); -if (unlikely (r)) { -dev_err (adev->dev,"%p validate failed for unpin\n" , bo); - goto error; - }if (bo->tbo.mem.mem_type ==TTM_PL_VRAM ) { adev->vram_pin_size -=amdgpu_bo_size (bo); -if (bo->flags &AMDGPU_GEM_CREATE_NO_CPU_ACCESS ) - adev->invisible_pin_size -=amdgpu_bo_size (bo); + adev->invisible_pin_size -=amdgpu_vram_mgr_bo_invisible_size (bo); }else if (bo->tbo.mem.mem_type ==TTM_PL_TT ) { adev->gart_pin_size -=amdgpu_bo_size (bo); } -error: +for (i =0 ; i < bo->placement.num_placement; i++) { + bo->placements[i].lpfn =0 ; + bo->placements[i].flags &= ~TTM_PL_FLAG_NO_EVICT ; + } + r =ttm_bo_validate (&bo->tbo, &bo->placement, &ctx); +if (unlikely (r)) +dev_err (adev->dev,"%p validate failed for unpin\n" , bo); +return r; }
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +1 -0
@@ -73,6 +73,7 @@ bool amdgpu_gtt_mgr_has_gart_addr(struct ttm_mem_reg *mem);uint64_t amdgpu_gtt_mgr_usage (struct ttm_mem_type_manager *man);int amdgpu_gtt_mgr_recover (struct ttm_mem_type_manager *man); +u64 amdgpu_vram_mgr_bo_invisible_size (struct amdgpu_bo *bo);uint64_t amdgpu_vram_mgr_usage (struct ttm_mem_type_manager *man);uint64_t amdgpu_vram_mgr_vis_usage (struct ttm_mem_type_manager *man);
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +1 -0
@@ -84,6 +84,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev) } hdr = (const struct common_firmware_header *)adev->vcn.fw->data; + adev->vcn.fw_version =le32_to_cpu (hdr->ucode_version); family_id =le32_to_cpu (hdr->ucode_version) &0xff ; version_major = (le32_to_cpu (hdr->ucode_version) >>24 ) &0xff ; version_minor = (le32_to_cpu (hdr->ucode_version) >>8 ) &0xff ;
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +9 -5
@@ -1442,7 +1442,9 @@ static int amdgpu_vm_bo_split_mapping(struct amdgpu_device *adev,uint64_t count; max_entries =min (max_entries,16ull *1024ull ); -for (count =1 ; count < max_entries; ++count) { +for (count =1 ; + count < max_entries / (PAGE_SIZE /AMDGPU_GPU_PAGE_SIZE ); + ++count) {uint64_t idx = pfn + count; if (pages_addr[idx] !=
@@ -1455,7 +1457,7 @@ static int amdgpu_vm_bo_split_mapping(struct amdgpu_device *adev, dma_addr = pages_addr; }else { addr = pages_addr[pfn]; - max_entries = count; + max_entries = count * (PAGE_SIZE /AMDGPU_GPU_PAGE_SIZE ); } }else if (flags &AMDGPU_PTE_VALID ) {
@@ -1470,7 +1472,7 @@ static int amdgpu_vm_bo_split_mapping(struct amdgpu_device *adev,if (r)return r; - pfn += last - start +1 ; + pfn += (last - start +1 ) / (PAGE_SIZE /AMDGPU_GPU_PAGE_SIZE );if (nodes && nodes->size == pfn) { pfn =0 ; ++nodes;
@@ -2112,7 +2114,8 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev, before->last = saddr -1 ; before->offset = tmp->offset; before->flags = tmp->flags; -list_add (&before->list, &tmp->list); + before->bo_va = tmp->bo_va; +list_add (&before->list, &tmp->bo_va->invalids); }/* Remember mapping split at the end */
@@ -2122,7 +2125,8 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev, after->offset = tmp->offset; after->offset += after->start - tmp->start; after->flags = tmp->flags; -list_add (&after->list, &tmp->list); + after->bo_va = tmp->bo_va; +list_add (&after->list, &tmp->bo_va->invalids); }list_del (&tmp->list);
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +36 -3
@@ -96,6 +96,38 @@ static u64 amdgpu_vram_mgr_vis_size(struct amdgpu_device *adev, adev->gmc.visible_vram_size : end) - start; } +/** +* amdgpu_vram_mgr_bo_invisible_size - CPU invisible BO size +* +* @bo: &amdgpu_bo buffer object (must be in VRAM) +* +* Returns: +* How much of the given &amdgpu_bo buffer object lies in CPU invisible VRAM. +*/ +u64 amdgpu_vram_mgr_bo_invisible_size (struct amdgpu_bo *bo) +{ +struct amdgpu_device *adev =amdgpu_ttm_adev (bo->tbo.bdev); +struct ttm_mem_reg *mem = &bo->tbo.mem; +struct drm_mm_node *nodes = mem->mm_node; +unsigned pages = mem->num_pages; +u64 usage =0 ; + +if (adev->gmc.visible_vram_size == adev->gmc.real_vram_size) +return 0 ; + +if (mem->start >= adev->gmc.visible_vram_size >>PAGE_SHIFT ) +return amdgpu_bo_size (bo); + +while (nodes && pages) { + usage += nodes->size <<PAGE_SHIFT ; + usage -=amdgpu_vram_mgr_vis_size (adev, nodes); + pages -= nodes->size; + ++nodes; + } + +return usage; +} +/** * amdgpu_vram_mgr_new - allocate new ranges *
@@ -135,7 +167,8 @@ static int amdgpu_vram_mgr_new(struct ttm_mem_type_manager *man, num_nodes =DIV_ROUND_UP (mem->num_pages, pages_per_node); } - nodes =kcalloc (num_nodes,sizeof (*nodes),GFP_KERNEL ); + nodes =kvmalloc_array (num_nodes,sizeof (*nodes), +GFP_KERNEL | __GFP_ZERO);if (!nodes)return -ENOMEM ;
@@ -190,7 +223,7 @@ static int amdgpu_vram_mgr_new(struct ttm_mem_type_manager *man,drm_mm_remove_node (&nodes[i]);spin_unlock (&mgr->lock); -kfree (nodes); +kvfree (nodes);return r == -ENOSPC ?0 : r; }
@@ -229,7 +262,7 @@ static void amdgpu_vram_mgr_del(struct ttm_mem_type_manager *man,atomic64_sub (usage, &mgr->usage);atomic64_sub (vis_usage, &mgr->vis_usage); -kfree (mem->mm_node); +kvfree (mem->mm_node); mem->mm_node =NULL ; }
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +2 -2
@@ -467,8 +467,8 @@ static int vce_v3_0_hw_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle;vce_v3_0_override_vce_clock_gating (adev, true); -if (!(adev->flags &AMD_IS_APU )) -amdgpu_asic_set_vce_clocks (adev,10000 ,10000 ); + +amdgpu_asic_set_vce_clocks (adev,10000 ,10000 );for (i =0 ; i < adev->vce.num_rings; i++) adev->vce.ring[i].ready = false;
drivers/gpu/drm/amd/amdgpu/vi.c +60 -17
123 lines not on this page · raw message
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +18 -4
@@ -46,6 +46,7 @@#include <linux/moduleparam.h> #include <linux/version.h> #include <linux/types.h> +#include <linux/pm_runtime.h> #include <drm/drmP.h> #include <drm/drm_atomic.h>
@@ -927,6 +928,7 @@ amdgpu_dm_update_connector_after_detect(struct amdgpu_dm_connector *aconnector)drm_mode_connector_update_edid_property (connector,NULL ); aconnector->num_modes =0 ; aconnector->dc_sink =NULL ; + aconnector->edid =NULL ; }mutex_unlock (&dev->mode_config.mutex);
@@ -3965,10 +3967,11 @@ static void amdgpu_dm_do_flip(struct drm_crtc *crtc,if (acrtc->base.state->event)prepare_flip_isr (acrtc); +spin_unlock_irqrestore (&crtc->dev->event_lock, flags); + surface_updates->surface =dc_stream_get_status (acrtc_state->stream)->plane_states[0 ]; surface_updates->flip_addr = &addr; - dc_commit_updates_for_stream(adev->dm.dc, surface_updates, 1,
@@ -3981,9 +3984,6 @@ static void amdgpu_dm_do_flip(struct drm_crtc *crtc, __func__, addr.address.grph.addr.high_part, addr.address.grph.addr.low_part); - - -spin_unlock_irqrestore (&crtc->dev->event_lock, flags); } static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
@@ -4149,6 +4149,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)struct drm_connector *connector;struct drm_connector_state *old_con_state, *new_con_state;struct dm_crtc_state *dm_old_crtc_state, *dm_new_crtc_state; +int crtc_disable_count =0 ;drm_atomic_helper_update_legacy_modeset_state (dev, state);
@@ -4211,6 +4212,8 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)if (dm_old_crtc_state->stream)remove_stream (adev, acrtc, dm_old_crtc_state->stream); +pm_runtime_get_noresume (dev->dev); + acrtc->enabled = true; acrtc->hw_mode = new_crtc_state->mode; crtc->hwmode = new_crtc_state->mode;
@@ -4348,6 +4351,9 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)struct amdgpu_crtc *acrtc =to_amdgpu_crtc (crtc);bool modeset_needed; +if (old_crtc_state->active && !new_crtc_state->active) + crtc_disable_count++; + dm_new_crtc_state =to_dm_crtc_state (new_crtc_state); dm_old_crtc_state =to_dm_crtc_state (old_crtc_state); modeset_needed = modeset_required(
@@ -4396,6 +4402,14 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)drm_atomic_helper_wait_for_flip_done (dev, state);drm_atomic_helper_cleanup_planes (dev, state); + +/* Finally, drop a runtime PM reference for each newly disabled CRTC, +* so we can put the GPU into runtime suspend if we're not driving any +* displays anymore +*/ +for (i =0 ; i < crtc_disable_count; i++) +pm_runtime_put_autosuspend (dev->dev); +pm_runtime_mark_last_busy (dev->dev); }
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +1 -1
@@ -875,7 +875,7 @@ static int atmel_hlcdc_plane_init_properties(struct atmel_hlcdc_plane *plane,drm_object_attach_property (&plane->base.base, props->alpha,255 ); -if (desc->layout.xstride && desc->layout.pstride) { +if (desc->layout.xstride[0 ] && desc->layout.pstride[0 ]) {int ret; ret = drm_plane_create_rotation_property(&plane->base,
drivers/gpu/drm/i915/i915_irq.c +10 -2
@@ -1862,9 +1862,17 @@ static void i9xx_pipestat_irq_ack(struct drm_i915_private *dev_priv,/* * Clear the PIPE*STAT regs before the IIR +* +* Toggle the enable bits to make sure we get an +* edge in the ISR pipe event bit if we don't clear +* all the enabled status bits. Otherwise the edge +* triggered IIR on i965/g4x wouldn't notice that +* an interrupt is still pending. */ -if (pipe_stats[pipe]) -I915_WRITE (reg, enable_mask | pipe_stats[pipe]); +if (pipe_stats[pipe]) { +I915_WRITE (reg, pipe_stats[pipe]); +I915_WRITE (reg, enable_mask); + } }spin_unlock (&dev_priv->irq_lock); }
drivers/gpu/drm/i915/i915_reg.h +5 -0
@@ -2565,12 +2565,17 @@ enum i915_power_well_id {#define _3D_CHICKEN _MMIO(0x2084)#define _3D_CHICKEN_HIZ_PLANE_DISABLE_MSAA_4X_SNB (1 << 10)#define _3D_CHICKEN2 _MMIO(0x208c) + +#define FF_SLICE_CHICKEN _MMIO(0x2088) +#define FF_SLICE_CHICKEN_CL_PROVOKING_VERTEX_FIX (1 << 1) +/* Disables pipelining of read flushes past the SF-WIZ interface. * Required on all Ironlake steppings according to the B-Spec, but the * particular danger of not doing so is not specified. */ # define _3D_CHICKEN2_WM_READ_PIPELINED (1 << 14)#define _3D_CHICKEN3 _MMIO(0x2090) +#define _3D_CHICKEN_SF_PROVOKING_VERTEX_FIX (1 << 12)#define _3D_CHICKEN_SF_DISABLE_OBJEND_CULL (1 << 10)#define _3D_CHICKEN3_AA_LINE_QUALITY_FIX_ENABLE (1 << 5)#define _3D_CHICKEN3_SF_DISABLE_FASTCLIP_CULL (1 << 5)
drivers/gpu/drm/i915/intel_crt.c +20 -0
@@ -304,6 +304,9 @@ intel_crt_mode_valid(struct drm_connector *connector,int max_dotclk = dev_priv->max_dotclk_freq;int max_clock; +if (mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return MODE_NO_DBLESCAN ; +if (mode->clock <25000 )return MODE_CLOCK_LOW ;
@@ -337,6 +340,12 @@ static bool intel_crt_compute_config(struct intel_encoder *encoder,struct intel_crtc_state *pipe_config, struct drm_connector_state *conn_state) { + struct drm_display_mode *adjusted_mode = + &pipe_config->base.adjusted_mode; + +if (adjusted_mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return false; +return true; }
@@ -344,6 +353,12 @@ static bool pch_crt_compute_config(struct intel_encoder *encoder,struct intel_crtc_state *pipe_config, struct drm_connector_state *conn_state) { + struct drm_display_mode *adjusted_mode = + &pipe_config->base.adjusted_mode; + +if (adjusted_mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return false; + pipe_config->has_pch_encoder = true;return true;
@@ -354,6 +369,11 @@ static bool hsw_crt_compute_config(struct intel_encoder *encoder, struct drm_connector_state *conn_state) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +struct drm_display_mode *adjusted_mode = + &pipe_config->base.adjusted_mode; + +if (adjusted_mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return false; pipe_config->has_pch_encoder = true;
drivers/gpu/drm/i915/intel_ddi.c +6 -2
@@ -2205,7 +2205,8 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,intel_prepare_dp_ddi_buffers (encoder, crtc_state);intel_ddi_init_dp_buf_reg (encoder); -intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_ON ); +if (!is_mst) +intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_ON );intel_dp_start_link_train (intel_dp);if (port !=PORT_A ||INTEL_GEN (dev_priv) >=9 )intel_dp_stop_link_train (intel_dp);
@@ -2303,12 +2304,15 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder,struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);struct intel_digital_port *dig_port =enc_to_dig_port (&encoder->base);struct intel_dp *intel_dp = &dig_port->dp; +bool is_mst =intel_crtc_has_type (old_crtc_state, +INTEL_OUTPUT_DP_MST );/* * Power down sink before disabling the port, otherwise we end * up getting interrupts from the sink on detecting link loss. */ -intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF ); +if (!is_mst) +intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF );intel_disable_ddi_buf (encoder);
drivers/gpu/drm/i915/intel_display.c +13 -3
@@ -14211,12 +14211,22 @@ static enum drm_mode_status intel_mode_valid(struct drm_device *dev, const struct drm_display_mode *mode) { +/* +* Can't reject DBLSCAN here because Xorg ddxen can add piles +* of DBLSCAN modes to the output's mode list when they detect +* the scaling mode property on the connector. And they don't +* ask the kernel to validate those modes in any way until +* modeset time at which point the client gets a protocol error. +* So in order to not upset those clients we silently ignore the +* DBLSCAN flag on such connectors. For other connectors we will +* reject modes with the DBLSCAN flag in encoder->compute_config(). +* And we always reject DBLSCAN modes in connector->mode_valid() +* as we never want such modes on the connector's mode list. +*/ +if (mode->vscan >1 )return MODE_NO_VSCAN ; -if (mode->flags &DRM_MODE_FLAG_DBLSCAN ) -return MODE_NO_DBLESCAN ; -if (mode->flags &DRM_MODE_FLAG_HSKEW )return MODE_H_ILLEGAL ;
drivers/gpu/drm/i915/intel_dp.c +16 -18
@@ -423,6 +423,9 @@ intel_dp_mode_valid(struct drm_connector *connector,int max_rate, mode_rate, max_lanes, max_link_clock;int max_dotclk; +if (mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return MODE_NO_DBLESCAN ; + max_dotclk =intel_dp_downstream_max_dotclock (intel_dp);if (intel_dp_is_edp (intel_dp) && fixed_mode) {
@@ -1760,7 +1763,10 @@ intel_dp_compute_config(struct intel_encoder *encoder, conn_state->scaling_mode); } -if ((IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv)) && +if (adjusted_mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return false; + +if (HAS_GMCH_DISPLAY (dev_priv) && adjusted_mode->flags &DRM_MODE_FLAG_INTERLACE )return false;
@@ -2759,16 +2765,6 @@ static void intel_disable_dp(struct intel_encoder *encoder,static void g4x_disable_dp (struct intel_encoder *encoder,const struct intel_crtc_state *old_crtc_state,const struct drm_connector_state *old_conn_state) -{ -intel_disable_dp (encoder, old_crtc_state, old_conn_state); - -/* disable the port before the pipe on g4x */ -intel_dp_link_down (encoder, old_crtc_state); -} - -static void ilk_disable_dp (struct intel_encoder *encoder, -const struct intel_crtc_state *old_crtc_state, -const struct drm_connector_state *old_conn_state) {intel_disable_dp (encoder, old_crtc_state, old_conn_state); }
@@ -2784,13 +2780,19 @@ static void vlv_disable_dp(struct intel_encoder *encoder,intel_disable_dp (encoder, old_crtc_state, old_conn_state); } -static void ilk_post_disable_dp (struct intel_encoder *encoder, +static void g4x_post_disable_dp (struct intel_encoder *encoder,const struct intel_crtc_state *old_crtc_state,const struct drm_connector_state *old_conn_state) {struct intel_dp *intel_dp =enc_to_intel_dp (&encoder->base);enum port port = encoder->port; +/* +* Bspec does not list a specific disable sequence for g4x DP. +* Follow the ilk+ sequence (disable pipe before the port) for +* g4x DP as it does not suffer from underruns like the normal +* g4x modeset sequence (disable pipe after the port). +*/ intel_dp_link_down (encoder, old_crtc_state);/* Only ilk+ has port A */
@@ -6327,7 +6329,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,drm_connector_init (dev, connector, &intel_dp_connector_funcs, type);drm_connector_helper_add (connector, &intel_dp_connector_helper_funcs); -if (!IS_VALLEYVIEW (dev_priv) && !IS_CHERRYVIEW (dev_priv)) +if (!HAS_GMCH_DISPLAY (dev_priv)) connector->interlace_allowed = true; connector->doublescan_allowed =0 ;
@@ -6426,15 +6428,11 @@ bool intel_dp_init(struct drm_i915_private *dev_priv, intel_encoder->enable = vlv_enable_dp; intel_encoder->disable = vlv_disable_dp; intel_encoder->post_disable = vlv_post_disable_dp; - }else if (INTEL_GEN (dev_priv) >=5 ) { - intel_encoder->pre_enable = g4x_pre_enable_dp; - intel_encoder->enable = g4x_enable_dp; - intel_encoder->disable = ilk_disable_dp; - intel_encoder->post_disable = ilk_post_disable_dp; }else { intel_encoder->pre_enable = g4x_pre_enable_dp; intel_encoder->enable = g4x_enable_dp; intel_encoder->disable = g4x_disable_dp; + intel_encoder->post_disable = g4x_post_disable_dp; } intel_dig_port->dp.output_reg = output_reg;
drivers/gpu/drm/i915/intel_dp_mst.c +13 -1
@@ -48,6 +48,9 @@ static bool intel_dp_mst_compute_config(struct intel_encoder *encoder,bool reduce_m_n =drm_dp_has_quirk (&intel_dp->desc,DP_DPCD_QUIRK_LIMITED_M_N ); +if (adjusted_mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return false; + pipe_config->has_pch_encoder = false; bpp =24 ;if (intel_dp->compliance.test_data.bpc) {
@@ -180,9 +183,11 @@ static void intel_mst_post_disable_dp(struct intel_encoder *encoder, intel_dp->active_mst_links--; intel_mst->connector =NULL ; -if (intel_dp->active_mst_links ==0 ) +if (intel_dp->active_mst_links ==0 ) { +intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF ); intel_dig_port->base.post_disable (&intel_dig_port->base, old_crtc_state,NULL ); + }DRM_DEBUG_KMS ("active links %d\n" , intel_dp->active_mst_links); }
@@ -223,7 +228,11 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,DRM_DEBUG_KMS ("active links %d\n" , intel_dp->active_mst_links); +if (intel_dp->active_mst_links ==0 ) +intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_ON ); +drm_dp_send_power_updown_phy (&intel_dp->mst_mgr, connector->port, true); +if (intel_dp->active_mst_links ==0 ) intel_dig_port->base.pre_enable (&intel_dig_port->base, pipe_config,NULL );
@@ -360,6 +369,9 @@ intel_dp_mst_mode_valid(struct drm_connector *connector,if (!intel_dp)return MODE_ERROR ; +if (mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return MODE_NO_DBLESCAN ; + max_link_clock =intel_dp_max_link_rate (intel_dp); max_lanes =intel_dp_max_lane_count (intel_dp);
drivers/gpu/drm/i915/intel_dsi.c +6 -0
@@ -326,6 +326,9 @@ static bool intel_dsi_compute_config(struct intel_encoder *encoder, conn_state->scaling_mode); } +if (adjusted_mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return false; +/* DSI uses short packets for sync events, so clear mode flags for DSI */ adjusted_mode->flags =0 ;
@@ -1266,6 +1269,9 @@ intel_dsi_mode_valid(struct drm_connector *connector,DRM_DEBUG_KMS ("\n" ); +if (mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return MODE_NO_DBLESCAN ; +if (fixed_mode) {if (mode->hdisplay > fixed_mode->hdisplay)return MODE_PANEL ;
drivers/gpu/drm/i915/intel_dvo.c +6 -0
@@ -219,6 +219,9 @@ intel_dvo_mode_valid(struct drm_connector *connector,int max_dotclk =to_i915 (connector->dev)->max_dotclk_freq;int target_clock = mode->clock; +if (mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return MODE_NO_DBLESCAN ; +/* XXX: Validate clock range */ if (fixed_mode) {
@@ -254,6 +257,9 @@ static bool intel_dvo_compute_config(struct intel_encoder *encoder,if (fixed_mode)intel_fixed_panel_mode (fixed_mode, adjusted_mode); +if (adjusted_mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return false; +return true; }
drivers/gpu/drm/i915/intel_hdmi.c +6 -0
@@ -1557,6 +1557,9 @@ intel_hdmi_mode_valid(struct drm_connector *connector,bool force_dvi =READ_ONCE (to_intel_digital_connector_state (connector->state)->force_audio) ==HDMI_AUDIO_OFF_DVI ; +if (mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return MODE_NO_DBLESCAN ; + clock = mode->clock;if ((mode->flags &DRM_MODE_FLAG_3D_MASK ) ==DRM_MODE_FLAG_3D_FRAME_PACKING )
@@ -1677,6 +1680,9 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,int desired_bpp;bool force_dvi = intel_conn_state->force_audio ==HDMI_AUDIO_OFF_DVI ; +if (adjusted_mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return false; + pipe_config->has_hdmi_sink = !force_dvi && intel_hdmi->has_hdmi_sink;if (pipe_config->has_hdmi_sink)
drivers/gpu/drm/i915/intel_lrc.c +11 -1
@@ -1386,11 +1386,21 @@ static u32 *gen9_init_indirectctx_bb(struct intel_engine_cs *engine, u32 *batch)/* WaFlushCoherentL3CacheLinesAtContextSwitch:skl,bxt,glk */ batch =gen8_emit_flush_coherentl3_wa (engine, batch); + *batch++ =MI_LOAD_REGISTER_IMM (3 ); +/* WaDisableGatherAtSetShaderCommonSlice:skl,bxt,kbl,glk */ - *batch++ =MI_LOAD_REGISTER_IMM (1 ); *batch++ =i915_mmio_reg_offset (COMMON_SLICE_CHICKEN2 ); *batch++ =_MASKED_BIT_DISABLE (GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE ); + +/* BSpec: 11391 */ + *batch++ =i915_mmio_reg_offset (FF_SLICE_CHICKEN ); + *batch++ =_MASKED_BIT_ENABLE (FF_SLICE_CHICKEN_CL_PROVOKING_VERTEX_FIX ); + +/* BSpec: 11299 */ + *batch++ =i915_mmio_reg_offset (_3D_CHICKEN3); + *batch++ =_MASKED_BIT_ENABLE (_3D_CHICKEN_SF_PROVOKING_VERTEX_FIX); + *batch++ =MI_NOOP ;/* WaClearSlmSpaceAtContextSwitch:kbl */
drivers/gpu/drm/i915/intel_lvds.c +5 -0
@@ -380,6 +380,8 @@ intel_lvds_mode_valid(struct drm_connector *connector,struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;int max_pixclk =to_i915 (connector->dev)->max_dotclk_freq; +if (mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return MODE_NO_DBLESCAN ;if (mode->hdisplay > fixed_mode->hdisplay)return MODE_PANEL ;if (mode->vdisplay > fixed_mode->vdisplay)
@@ -429,6 +431,9 @@ static bool intel_lvds_compute_config(struct intel_encoder *intel_encoder,intel_fixed_panel_mode (intel_connector->panel.fixed_mode, adjusted_mode); +if (adjusted_mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return false; +if (HAS_PCH_SPLIT (dev_priv)) { pipe_config->has_pch_encoder = true;
drivers/gpu/drm/i915/intel_sdvo.c +6 -0
@@ -1160,6 +1160,9 @@ static bool intel_sdvo_compute_config(struct intel_encoder *encoder, adjusted_mode); } +if (adjusted_mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return false; +/* * Make the CRTC code factor in the SDVO pixel multiplier. The * SDVO device will factor out the multiplier during mode_set.
@@ -1621,6 +1624,9 @@ intel_sdvo_mode_valid(struct drm_connector *connector,struct intel_sdvo *intel_sdvo =intel_attached_sdvo (connector);int max_dotclk =to_i915 (connector->dev)->max_dotclk_freq; +if (mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return MODE_NO_DBLESCAN ; +if (intel_sdvo->pixel_clock_min > mode->clock)return MODE_CLOCK_LOW ;
drivers/gpu/drm/i915/intel_tv.c +10 -2
@@ -850,6 +850,9 @@ intel_tv_mode_valid(struct drm_connector *connector,const struct tv_mode *tv_mode =intel_tv_mode_find (connector->state);int max_dotclk =to_i915 (connector->dev)->max_dotclk_freq; +if (mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return MODE_NO_DBLESCAN ; +if (mode->clock > max_dotclk)return MODE_CLOCK_HIGH ;
@@ -877,16 +880,21 @@ intel_tv_compute_config(struct intel_encoder *encoder, struct drm_connector_state *conn_state) {const struct tv_mode *tv_mode =intel_tv_mode_find (conn_state); +struct drm_display_mode *adjusted_mode = + &pipe_config->base.adjusted_mode;if (!tv_mode)return false; - pipe_config->base.adjusted_mode.crtc_clock = tv_mode->clock; +if (adjusted_mode->flags &DRM_MODE_FLAG_DBLSCAN ) +return false; + + adjusted_mode->crtc_clock = tv_mode->clock;DRM_DEBUG_KMS ("forcing bpc to 8 for TV\n" ); pipe_config->pipe_bpp =8 *3 ;/* TV has it's own notion of sync and other mode flags, so clear them. */ - pipe_config->base.adjusted_mode.flags =0 ; + adjusted_mode->flags =0 ;/* * FIXME: We don't check whether the input mode is actually what we want
drivers/gpu/drm/qxl/qxl_display.c +5 -2
@@ -630,7 +630,7 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane,struct qxl_cursor_cmd *cmd;struct qxl_cursor *cursor;struct drm_gem_object *obj; -struct qxl_bo *cursor_bo =NULL , *user_bo =NULL ; +struct qxl_bo *cursor_bo =NULL , *user_bo =NULL , *old_cursor_bo =NULL ;int ret;void *user_ptr;int size =64 *64 *4 ;
@@ -684,7 +684,7 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane, cursor_bo, 0); cmd->type =QXL_CURSOR_SET ; -qxl_bo_unref (&qcrtc->cursor_bo); + old_cursor_bo = qcrtc->cursor_bo; qcrtc->cursor_bo = cursor_bo; cursor_bo =NULL ; }else {
@@ -704,6 +704,9 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane,qxl_push_cursor_ring_release (qdev, release,QXL_CMD_CURSOR , false);qxl_release_fence_buffer_objects (release); +if (old_cursor_bo) +qxl_bo_unref (&old_cursor_bo); +qxl_bo_unref (&cursor_bo);return ;
drivers/gpu/drm/sti/Kconfig +1 -2
@@ -1,6 +1,6 @@ config DRM_STI tristate "DRM Support for STMicroelectronics SoC stiH4xx Series" - depends on DRM && (ARCH_STI || ARCH_MULTIPLATFORM) + depends on OF && DRM && (ARCH_STI || ARCH_MULTIPLATFORM) select RESET_CONTROLLER select DRM_KMS_HELPER select DRM_GEM_CMA_HELPER
@@ -8,6 +8,5 @@ config DRM_STI select DRM_PANEL select FW_LOADER select SND_SOC_HDMI_CODEC if SND_SOC - select OF help Choose this option to enable DRM on STM stiH4xx chipset
drivers/gpu/drm/sun4i/sun4i_tcon.c +0 -25
@@ -17,7 +17,6 @@#include <drm/drm_encoder.h> #include <drm/drm_modes.h> #include <drm/drm_of.h> -#include <drm/drm_panel.h> #include <uapi/drm/drm_mode.h>
@@ -350,9 +349,6 @@ static void sun4i_tcon0_mode_set_lvds(struct sun4i_tcon *tcon,static void sun4i_tcon0_mode_set_rgb (struct sun4i_tcon *tcon,const struct drm_display_mode *mode) { -struct drm_panel *panel = tcon->panel; -struct drm_connector *connector = panel->connector; -struct drm_display_info display_info = connector->display_info;unsigned int bp, hsync, vsync;u8 clk_delay;u32 val =0 ;
@@ -410,27 +406,6 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon,if (mode->flags &DRM_MODE_FLAG_PVSYNC ) val |=SUN4I_TCON0_IO_POL_VSYNC_POSITIVE ; -/* -* On A20 and similar SoCs, the only way to achieve Positive Edge -* (Rising Edge), is setting dclk clock phase to 2/3(240�). -* By default TCON works in Negative Edge(Falling Edge), -* this is why phase is set to 0 in that case. -* Unfortunately there's no way to logically invert dclk through -* IO_POL register. -* The only acceptable way to work, triple checked with scope, -* is using clock phase set to 0� for Negative Edge and set to 240� -* for Positive Edge. -* On A33 and similar SoCs there would be a 90� phase option, -* but it divides also dclk by 2. -* Following code is a way to avoid quirks all around TCON -* and DOTCLOCK drivers. -*/ -if (display_info.bus_flags &DRM_BUS_FLAG_PIXDATA_POSEDGE ) -clk_set_phase (tcon->dclk,240 ); - -if (display_info.bus_flags &DRM_BUS_FLAG_PIXDATA_NEGEDGE ) -clk_set_phase (tcon->dclk,0 ); -regmap_update_bits (tcon->regs,SUN4I_TCON0_IO_POL_REG ,SUN4I_TCON0_IO_POL_HSYNC_POSITIVE |SUN4I_TCON0_IO_POL_VSYNC_POSITIVE , val);
drivers/iio/accel/mma8452.c +1 -1
@@ -1034,7 +1034,7 @@ static irqreturn_t mma8452_interrupt(int irq, void *p)if (src <0 )return IRQ_NONE ; -if (!(src & data->chip_info->enabled_events)) +if (!(src & (data->chip_info->enabled_events |MMA8452_INT_DRDY )))return IRQ_NONE ;if (src &MMA8452_INT_DRDY ) {
drivers/staging/android/ion/ion_heap.c +1 -1
@@ -29,7 +29,7 @@ void *ion_heap_map_kernel(struct ion_heap *heap,struct page **tmp = pages;if (!pages) -return NULL ; +return ERR_PTR (-ENOMEM );if (buffer->flags &ION_FLAG_CACHED ) pgprot =PAGE_KERNEL ;
drivers/tty/n_tty.c +32 -23
172 lines not on this page · raw message
drivers/tty/serdev/core.c +1 -0
@@ -617,6 +617,7 @@ EXPORT_SYMBOL_GPL(__serdev_device_driver_register); static void __exit serdev_exit(void) {bus_unregister (&serdev_bus_type); +ida_destroy (&ctrl_ida); }module_exit (serdev_exit);
drivers/tty/serial/8250/8250_pci.c +0 -2
@@ -3339,9 +3339,7 @@ static const struct pci_device_id blacklist[] = {/* multi-io cards handled by parport_serial */ { PCI_DEVICE(0x4348, 0x7053), }, /* WCH CH353 2S1P */ { PCI_DEVICE(0x4348, 0x5053), }, /* WCH CH353 1S1P */ - { PCI_DEVICE(0x4348, 0x7173), }, /* WCH CH355 4S */ { PCI_DEVICE(0x1c00, 0x3250), }, /* WCH CH382 2S1P */ - { PCI_DEVICE(0x1c00, 0x3470), }, /* WCH CH384 4S */ /* Moxa Smartio MUE boards handled by 8250_moxa */ { PCI_VDEVICE(MOXA, 0x1024), },
drivers/tty/vt/vt.c +2 -2
@@ -784,7 +784,7 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */if (!*vc->vc_uni_pagedir_loc)con_set_default_unimap (vc); - vc->vc_screenbuf =kmalloc (vc->vc_screenbuf_size,GFP_KERNEL ); + vc->vc_screenbuf =kzalloc (vc->vc_screenbuf_size,GFP_KERNEL );if (!vc->vc_screenbuf) goto err_free;
@@ -871,7 +871,7 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,if (new_screen_size > (4 <<20 ))return -EINVAL ; - newscreen =kmalloc (new_screen_size,GFP_USER ); + newscreen =kzalloc (new_screen_size,GFP_USER );if (!newscreen)return -ENOMEM ;
drivers/usb/class/cdc-acm.c +3 -0
@@ -1758,6 +1758,9 @@ static const struct usb_device_id acm_ids[] = { { USB_DEVICE(0x11ca, 0x0201), /* VeriFone Mx870 Gadget Serial */ .driver_info =SINGLE_RX_URB , }, + { USB_DEVICE(0x1965, 0x0018), /* Uniden UBC125XLT */ + .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ + }, { USB_DEVICE(0x22b8, 0x7000), /* Motorola Q Phone */ .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ },
drivers/usb/dwc2/hcd_queue.c +1 -1
@@ -383,7 +383,7 @@ static unsigned long *dwc2_get_ls_map(struct dwc2_hsotg *hsotg,/* Get the map and adjust if this is a multi_tt hub */ map = qh->dwc_tt->periodic_bitmaps;if (qh->dwc_tt->usb_tt->multi) - map +=DWC2_ELEMENTS_PER_LS_BITMAP * qh->ttport; + map +=DWC2_ELEMENTS_PER_LS_BITMAP * (qh->ttport -1 );return map; }
drivers/usb/host/xhci-mem.c +2 -2
@@ -878,12 +878,12 @@ void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id) dev = xhci->devs[slot_id]; -trace_xhci_free_virt_device (dev); - xhci->dcbaa->dev_context_ptrs[slot_id] =0 ;if (!dev)return ; +trace_xhci_free_virt_device (dev); +if (dev->tt_info) old_active_eps = dev->tt_info->active_eps;
drivers/usb/host/xhci-trace.h +31 -5
@@ -171,6 +171,37 @@ DEFINE_EVENT(xhci_log_trb, xhci_dbc_gadget_ep_queue,TP_ARGS (ring, trb) ); +DECLARE_EVENT_CLASS (xhci_log_free_virt_dev, + TP_PROTO(struct xhci_virt_device *vdev), +TP_ARGS (vdev), +TP_STRUCT__entry ( + __field(void *, vdev) + __field(unsigned long long, out_ctx) + __field(unsigned long long, in_ctx) + __field(u8, fake_port) + __field(u8, real_port) +__field (u16, current_mel) + + ), +TP_fast_assign ( + __entry->vdev = vdev; + __entry->in_ctx = (unsigned long long) vdev->in_ctx->dma; + __entry->out_ctx = (unsigned long long) vdev->out_ctx->dma; + __entry->fake_port = (u8) vdev->fake_port; + __entry->real_port = (u8) vdev->real_port; + __entry->current_mel = (u16) vdev->current_mel; + ), +TP_printk ("vdev %p ctx %llx | %llx fake_port %d real_port %d current_mel %d" , + __entry->vdev, __entry->in_ctx, __entry->out_ctx, + __entry->fake_port, __entry->real_port, __entry->current_mel + ) +); + +DEFINE_EVENT (xhci_log_free_virt_dev, xhci_free_virt_device, + TP_PROTO(struct xhci_virt_device *vdev), +TP_ARGS (vdev) +); + DECLARE_EVENT_CLASS(xhci_log_virt_dev, TP_PROTO(struct xhci_virt_device *vdev), TP_ARGS(vdev),
@@ -208,11 +239,6 @@ DEFINE_EVENT(xhci_log_virt_dev, xhci_alloc_virt_device,TP_ARGS (vdev) ); -DEFINE_EVENT (xhci_log_virt_dev, xhci_free_virt_device, - TP_PROTO(struct xhci_virt_device *vdev), -TP_ARGS (vdev) -); -DEFINE_EVENT (xhci_log_virt_dev, xhci_setup_device, TP_PROTO(struct xhci_virt_device *vdev), TP_ARGS(vdev)
drivers/usb/serial/cp210x.c +14 -0
@@ -95,6 +95,9 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x10C4, 0x8156) }, /* B&G H3000 link cable */ { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ { USB_DEVICE(0x10C4, 0x815F) }, /* Timewave HamLinkUSB */ + { USB_DEVICE(0x10C4, 0x817C) }, /* CESINEL MEDCAL N Power Quality Monitor */ + { USB_DEVICE(0x10C4, 0x817D) }, /* CESINEL MEDCAL NT Power Quality Monitor */ + { USB_DEVICE(0x10C4, 0x817E) }, /* CESINEL MEDCAL S Power Quality Monitor */ { USB_DEVICE(0x10C4, 0x818B) }, /* AVIT Research USB to TTL */ { USB_DEVICE(0x10C4, 0x819F) }, /* MJS USB Toslink Switcher */ { USB_DEVICE(0x10C4, 0x81A6) }, /* ThinkOptics WavIt */
@@ -112,6 +115,9 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x10C4, 0x826B) }, /* Cygnal Integrated Products, Inc., Fasttrax GPS demonstration module */ { USB_DEVICE(0x10C4, 0x8281) }, /* Nanotec Plug & Drive */ { USB_DEVICE(0x10C4, 0x8293) }, /* Telegesis ETRX2USB */ + { USB_DEVICE(0x10C4, 0x82EF) }, /* CESINEL FALCO 6105 AC Power Supply */ + { USB_DEVICE(0x10C4, 0x82F1) }, /* CESINEL MEDCAL EFD Earth Fault Detector */ + { USB_DEVICE(0x10C4, 0x82F2) }, /* CESINEL MEDCAL ST Network Analyzer */ { USB_DEVICE(0x10C4, 0x82F4) }, /* Starizona MicroTouch */ { USB_DEVICE(0x10C4, 0x82F9) }, /* Procyon AVS */ { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */
@@ -124,7 +130,9 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x10C4, 0x8470) }, /* Juniper Networks BX Series System Console */ { USB_DEVICE(0x10C4, 0x8477) }, /* Balluff RFID */ { USB_DEVICE(0x10C4, 0x84B6) }, /* Starizona Hyperion */ + { USB_DEVICE(0x10C4, 0x851E) }, /* CESINEL MEDCAL PT Network Analyzer */ { USB_DEVICE(0x10C4, 0x85A7) }, /* LifeScan OneTouch Verio IQ */ + { USB_DEVICE(0x10C4, 0x85B8) }, /* CESINEL ReCon T Energy Logger */ { USB_DEVICE(0x10C4, 0x85EA) }, /* AC-Services IBUS-IF */ { USB_DEVICE(0x10C4, 0x85EB) }, /* AC-Services CIS-IBUS */ { USB_DEVICE(0x10C4, 0x85F8) }, /* Virtenio Preon32 */
@@ -134,17 +142,23 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x10C4, 0x8857) }, /* CEL EM357 ZigBee USB Stick */ { USB_DEVICE(0x10C4, 0x88A4) }, /* MMB Networks ZigBee USB Device */ { USB_DEVICE(0x10C4, 0x88A5) }, /* Planet Innovation Ingeni ZigBee USB Device */ + { USB_DEVICE(0x10C4, 0x88FB) }, /* CESINEL MEDCAL STII Network Analyzer */ + { USB_DEVICE(0x10C4, 0x8938) }, /* CESINEL MEDCAL S II Network Analyzer */ { USB_DEVICE(0x10C4, 0x8946) }, /* Ketra N1 Wireless Interface */ { USB_DEVICE(0x10C4, 0x8962) }, /* Brim Brothers charging dock */ { USB_DEVICE(0x10C4, 0x8977) }, /* CEL MeshWorks DevKit Device */ { USB_DEVICE(0x10C4, 0x8998) }, /* KCF Technologies PRN */ + { USB_DEVICE(0x10C4, 0x89A4) }, /* CESINEL FTBC Flexible Thyristor Bridge Controller */ { USB_DEVICE(0x10C4, 0x8A2A) }, /* HubZ dual ZigBee and Z-Wave dongle */ { USB_DEVICE(0x10C4, 0x8A5E) }, /* CEL EM3588 ZigBee USB Stick Long Range */ { USB_DEVICE(0x10C4, 0x8B34) }, /* Qivicon ZigBee USB Radio Stick */ { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ + { USB_DEVICE(0x10C4, 0xEA63) }, /* Silicon Labs Windows Update (CP2101-4/CP2102N) */ { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */ { USB_DEVICE(0x10C4, 0xEA71) }, /* Infinity GPS-MIC-1 Radio Monophone */ + { USB_DEVICE(0x10C4, 0xEA7A) }, /* Silicon Labs Windows Update (CP2105) */ + { USB_DEVICE(0x10C4, 0xEA7B) }, /* Silicon Labs Windows Update (CP2108) */ { USB_DEVICE(0x10C4, 0xF001) }, /* Elan Digital Systems USBscope50 */ { USB_DEVICE(0x10C4, 0xF002) }, /* Elan Digital Systems USBwave12 */ { USB_DEVICE(0x10C4, 0xF003) }, /* Elan Digital Systems USBpulse100 */
drivers/usb/typec/tcpm.c +4 -3
@@ -388,17 +388,18 @@ static void _tcpm_log(struct tcpm_port *port, const char *fmt, va_list args)u64 ts_nsec =local_clock ();unsigned long rem_nsec; +mutex_lock (&port->logbuffer_lock);if (!port->logbuffer[port->logbuffer_head]) { port->logbuffer[port->logbuffer_head] =kzalloc (LOG_BUFFER_ENTRY_SIZE ,GFP_KERNEL ); -if (!port->logbuffer[port->logbuffer_head]) +if (!port->logbuffer[port->logbuffer_head]) { +mutex_unlock (&port->logbuffer_lock);return ; + } }vsnprintf (tmpbuffer,sizeof (tmpbuffer), fmt, args); -mutex_lock (&port->logbuffer_lock); -if (tcpm_log_full (port)) { port->logbuffer_head =max (port->logbuffer_head -1 ,0 );strcpy (tmpbuffer,"overflow" );
drivers/usb/typec/ucsi/ucsi.c +13 -0
@@ -350,6 +350,19 @@ static void ucsi_connector_change(struct work_struct *work) }if (con->status.change &UCSI_CONSTAT_CONNECT_CHANGE ) { +typec_set_pwr_role (con->port, con->status.pwr_dir); + +switch (con->status.partner_type) { +case UCSI_CONSTAT_PARTNER_TYPE_UFP : +typec_set_data_role (con->port,TYPEC_HOST ); +break ; +case UCSI_CONSTAT_PARTNER_TYPE_DFP : +typec_set_data_role (con->port,TYPEC_DEVICE ); +break ; +default : +break ; + } +if (con->status.connected)ucsi_register_partner (con);else
drivers/usb/typec/ucsi/ucsi_acpi.c +5 -0
@@ -79,6 +79,11 @@ static int ucsi_acpi_probe(struct platform_device *pdev)return -ENODEV ; } +/* This will make sure we can use ioremap_nocache() */ + status =acpi_release_memory (ACPI_HANDLE (&pdev->dev), res,1 ); +if (ACPI_FAILURE (status)) +return -ENOMEM ; +/* * NOTE: The memory region for the data structures is used also in an * operation region, which means ACPI has already reserved it. Therefore
include/linux/acpi.h +3 -0
@@ -443,6 +443,9 @@ int acpi_check_resource_conflict(const struct resource *res);int acpi_check_region (resource_size_t start,resource_size_t n,const char *name); +acpi_status acpi_release_memory (acpi_handle handle,struct resource *res, +u32 level); +int acpi_resources_are_enforced (void );#ifdef CONFIG_HIBERNATION
net/ipv6/netfilter/ip6t_rpfilter.c +2 -0
@@ -48,6 +48,8 @@ static bool rpfilter_lookup_reverse6(struct net *net, const struct sk_buff *skb, } fl6.flowi6_mark = flags &XT_RPFILTER_VALID_MARK ? skb->mark :0 ; +if ((flags &XT_RPFILTER_LOOSE ) ==0 ) + fl6.flowi6_oif = dev->ifindex; rt = (void *)ip6_route_lookup (net, &fl6, skb, lookup_flags);if (rt->dst.error)
net/netfilter/nf_tables_core.c +2 -1
@@ -208,7 +208,8 @@ nft_do_chain(struct nft_pktinfo *pkt, void *priv)switch (regs.verdict.code) {case NFT_JUMP : -BUG_ON (stackptr >=NFT_JUMP_STACK_SIZE ); +if (WARN_ON_ONCE (stackptr >=NFT_JUMP_STACK_SIZE )) +return NF_DROP ; jumpstack[stackptr].chain = chain; jumpstack[stackptr].rule = rule; jumpstack[stackptr].rulenum = rulenum;
net/netfilter/xt_connmark.c +1 -1
@@ -211,7 +211,7 @@ static int __init connmark_mt_init(void) static void __exit connmark_mt_exit(void) {xt_unregister_match (&connmark_mt_reg); -xt_unregister_target (connmark_tg_reg); +xt_unregister_targets (connmark_tg_reg,ARRAY_SIZE (connmark_tg_reg)); }module_init (connmark_mt_init);