From: Dave Airlie Date: Sun, 13 Mar 2016 23:42:34 +0000 (+1000) Subject: Merge drm-fixes into drm-next. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9b61c0fcdf0cfd20a85d9856d46142e7f297de0a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge drm-fixes into drm-next. Nouveau wanted this to avoid some worse conflicts when I merge that. --- 9b61c0fcdf0cfd20a85d9856d46142e7f297de0a diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu.h index 0c42a85ca5a5,5e7770f9a415..d0489722fc7e --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@@ -82,9 -82,13 +82,11 @@@ extern int amdgpu_vm_size extern int amdgpu_vm_block_size; extern int amdgpu_vm_fault_stop; extern int amdgpu_vm_debug; -extern int amdgpu_enable_scheduler; extern int amdgpu_sched_jobs; extern int amdgpu_sched_hw_submission; -extern int amdgpu_enable_semaphores; extern int amdgpu_powerplay; + extern unsigned amdgpu_pcie_gen_cap; + extern unsigned amdgpu_pcie_lane_cap; #define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS 3000 #define AMDGPU_MAX_USEC_TIMEOUT 100000 /* 100 ms */ @@@ -2357,7 -2318,7 +2316,8 @@@ void amdgpu_ttm_placement_from_domain(s bool amdgpu_ttm_bo_is_amdgpu_bo(struct ttm_buffer_object *bo); int amdgpu_ttm_tt_set_userptr(struct ttm_tt *ttm, uint64_t addr, uint32_t flags); + bool amdgpu_ttm_tt_has_userptr(struct ttm_tt *ttm); +struct mm_struct *amdgpu_ttm_tt_get_usermm(struct ttm_tt *ttm); bool amdgpu_ttm_tt_affect_userptr(struct ttm_tt *ttm, unsigned long start, unsigned long end); bool amdgpu_ttm_tt_is_readonly(struct ttm_tt *ttm); diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_display.c index 2cb53c24dec0,1846d65b7285..f0ed974bd4e0 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c @@@ -70,16 -72,13 +70,16 @@@ static void amdgpu_flip_work_func(struc struct drm_crtc *crtc = &amdgpuCrtc->base; unsigned long flags; - unsigned i; - int vpos, hpos, stat, min_udelay; + unsigned i, repcnt = 4; + int vpos, hpos, stat, min_udelay = 0; struct drm_vblank_crtc *vblank = &crtc->dev->vblank[work->crtc_id]; - amdgpu_flip_wait_fence(adev, &work->excl); + if (amdgpu_flip_handle_fence(work, &work->excl)) + return; + for (i = 0; i < work->shared_count; ++i) - amdgpu_flip_wait_fence(adev, &work->shared[i]); + if (amdgpu_flip_handle_fence(work, &work->shared[i])) + return; /* We borrow the event spin lock for protecting flip_status */ spin_lock_irqsave(&crtc->dev->event_lock, flags); @@@ -119,12 -123,19 +124,19 @@@ spin_lock_irqsave(&crtc->dev->event_lock, flags); }; + if (!repcnt) + DRM_DEBUG_DRIVER("Delay problem on crtc %d: min_udelay %d, " + "framedur %d, linedur %d, stat %d, vpos %d, " + "hpos %d\n", work->crtc_id, min_udelay, + vblank->framedur_ns / 1000, + vblank->linedur_ns / 1000, stat, vpos, hpos); + - /* do the flip (mmio) */ - adev->mode_info.funcs->page_flip(adev, work->crtc_id, work->base); /* set the flip status */ amdgpuCrtc->pflip_status = AMDGPU_FLIP_SUBMITTED; - spin_unlock_irqrestore(&crtc->dev->event_lock, flags); + + /* Do the flip (mmio) */ + adev->mode_info.funcs->page_flip(adev, work->crtc_id, work->base); } /* diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 01b4fd6115c2,9ef1db87cf26..74a2f8a6be1f --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@@ -77,9 -78,13 +77,11 @@@ int amdgpu_vm_block_size = -1 int amdgpu_vm_fault_stop = 0; int amdgpu_vm_debug = 0; int amdgpu_exp_hw_support = 0; -int amdgpu_enable_scheduler = 1; int amdgpu_sched_jobs = 32; int amdgpu_sched_hw_submission = 2; -int amdgpu_enable_semaphores = 0; int amdgpu_powerplay = -1; + unsigned amdgpu_pcie_gen_cap = 0; + unsigned amdgpu_pcie_lane_cap = 0; MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing, in megabytes"); module_param_named(vramlimit, amdgpu_vram_limit, int, 0600); diff --cc drivers/gpu/drm/i915/intel_dp.c index cbc06596659a,cdc2c15873dc..f069a82deb57 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@@ -6043,9 -6045,7 +6043,8 @@@ intel_dp_init(struct drm_device *dev } intel_dig_port->port = port; - dev_priv->dig_port_map[port] = intel_encoder; intel_dig_port->dp.output_reg = output_reg; + intel_dig_port->max_lanes = 4; intel_encoder->type = INTEL_OUTPUT_DISPLAYPORT; if (IS_CHERRYVIEW(dev)) { diff --cc drivers/gpu/drm/i915/intel_hdmi.c index 80b44c054087,616108c4bc3e..a0d8daed2470 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c @@@ -2236,10 -2222,8 +2235,9 @@@ void intel_hdmi_init(struct drm_device intel_encoder->cloneable |= 1 << INTEL_OUTPUT_HDMI; intel_dig_port->port = port; - dev_priv->dig_port_map[port] = intel_encoder; intel_dig_port->hdmi.hdmi_reg = hdmi_reg; intel_dig_port->dp.output_reg = INVALID_MMIO_REG; + intel_dig_port->max_lanes = 4; intel_hdmi_init_connector(intel_dig_port, intel_connector); } diff --cc include/uapi/linux/media.h index 6aac2f035a5d,a8e3a8c0d85a..a2f1af049370 --- a/include/uapi/linux/media.h +++ b/include/uapi/linux/media.h @@@ -74,19 -74,10 +74,19 @@@ struct media_device_info /* * I/O entities */ - #define MEDIA_ENT_F_IO_DTV (MEDIA_ENT_F_BASE + 1001) - #define MEDIA_ENT_F_IO_VBI (MEDIA_ENT_F_BASE + 1002) - #define MEDIA_ENT_F_IO_SWRADIO (MEDIA_ENT_F_BASE + 1003) + #define MEDIA_ENT_F_IO_DTV (MEDIA_ENT_F_BASE + 0x01001) + #define MEDIA_ENT_F_IO_VBI (MEDIA_ENT_F_BASE + 0x01002) + #define MEDIA_ENT_F_IO_SWRADIO (MEDIA_ENT_F_BASE + 0x01003) +/* + * Analog TV IF-PLL decoders + * + * It is a responsibility of the master/bridge drivers to create links + * for MEDIA_ENT_F_IF_VID_DECODER and MEDIA_ENT_F_IF_AUD_DECODER. + */ +#define MEDIA_ENT_F_IF_VID_DECODER (MEDIA_ENT_F_BASE + 2001) +#define MEDIA_ENT_F_IF_AUD_DECODER (MEDIA_ENT_F_BASE + 2002) + /* * Connectors */