From: Dave Airlie Date: Tue, 15 Aug 2017 06:16:58 +0000 (+1000) Subject: Backmerge tag 'v4.13-rc5' into drm-next X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0c697fafc66830ca7d5dc19123a1d0641deaa1f6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Backmerge tag 'v4.13-rc5' into drm-next Linux 4.13-rc5 There's a really nasty nouveau collision, hopefully someone can take a look once I pushed this out. --- 0c697fafc66830ca7d5dc19123a1d0641deaa1f6 diff --cc drivers/gpu/drm/i915/i915_gem_execbuffer.c index 929f275e67aa,e9503f6d1100..5fa44767c29e --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@@ -2209,8 -2206,12 +2211,8 @@@ i915_gem_do_execbuffer(struct drm_devic if (err) goto err_rpm; - err = eb_select_context(&eb); - if (unlikely(err)) - goto err_unlock; - err = eb_relocate(&eb); - if (err) + if (err) { /* * If the user expects the execobject.offset and * reloc.presumed_offset to be an exact match, diff --cc drivers/gpu/drm/i915/intel_pm.c index ee2a349cfe68,40b224b44d1b..48785ef75d33 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@@ -4459,11 -4463,11 +4459,11 @@@ static int skl_compute_plane_wm(const s if ((cpp * cstate->base.adjusted_mode.crtc_htotal / 512 < 1) && (plane_bytes_per_line / 512 < 1)) selected_result = method2; - else if ((ddb_allocation && ddb_allocation / - fixed16_to_u32_round_up(plane_blocks_per_line)) >= 1) + else if (ddb_allocation >= - fixed_16_16_to_u32_round_up(plane_blocks_per_line)) - selected_result = min_fixed_16_16(method1, method2); ++ fixed16_to_u32_round_up(plane_blocks_per_line)) + selected_result = min_fixed16(method1, method2); else if (latency >= linetime_us) - selected_result = min_fixed_16_16(method1, method2); + selected_result = min_fixed16(method1, method2); else selected_result = method1; } diff --cc drivers/gpu/drm/nouveau/nv50_display.c index 6dee4071bb3f,2bc0dc985214..2efcfb18024d --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c @@@ -3915,6 -3940,8 +3924,8 @@@ nv50_disp_atomic_commit_tail(struct drm NV_ATOMIC(drm, "%s: clr %04x (set %04x)\n", crtc->name, asyh->clr.mask, asyh->set.mask); - if (crtc_state->active && !asyh->state.active) ++ if (new_crtc_state->active && !asyh->state.active) + drm_crtc_vblank_off(crtc); if (asyh->clr.mask) { nv50_head_flush_clr(head, asyh, atom->flush_disable); @@@ -4000,11 -4027,13 +4011,13 @@@ nv50_head_flush_set(head, asyh); interlock_core = 1; } - } - for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) { - if (new_crtc_state->event) - drm_crtc_vblank_get(crtc); + if (asyh->state.active) { - if (!crtc_state->active) ++ if (!new_crtc_state->active) + drm_crtc_vblank_on(crtc); + if (asyh->state.event) + drm_crtc_vblank_get(crtc); + } } /* Update plane(s). */ @@@ -4047,16 -4076,18 +4060,18 @@@ NV_ERROR(drm, "%s: timeout\n", plane->name); } - for_each_crtc_in_state(state, crtc, crtc_state, i) { - if (crtc->state->event) { + for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) { + if (new_crtc_state->event) { unsigned long flags; /* Get correct count/ts if racing with vblank irq */ - drm_crtc_accurate_vblank_count(crtc); + if (crtc->state->active) - drm_accurate_vblank_count(crtc); ++ drm_crtc_accurate_vblank_count(crtc); spin_lock_irqsave(&crtc->dev->event_lock, flags); - drm_crtc_send_vblank_event(crtc, crtc->state->event); + drm_crtc_send_vblank_event(crtc, new_crtc_state->event); spin_unlock_irqrestore(&crtc->dev->event_lock, flags); - crtc->state->event = NULL; + new_crtc_state->event = NULL; - drm_crtc_vblank_put(crtc); + if (crtc->state->active) + drm_crtc_vblank_put(crtc); } }