Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm refcounting fixes from Dave Airlie:
"Here is the complete set of i915 bug/warn/refcounting fixes"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
drm/i915: Fixup legacy plane->crtc link for initial fb config
drm/i915: Fix atomic state when reusing the firmware fb
drm/i915: Keep ring->active_list and ring->requests_list consistent
drm/i915: Don't try to reference the fb in get_initial_plane_config()
drm: Fixup racy refcounting in plane_force_disable

+35 -34
+1 -12
drivers/gpu/drm/drm_crtc.c
··· 525 525 } 526 526 EXPORT_SYMBOL(drm_framebuffer_reference); 527 527 528 - static void drm_framebuffer_free_bug(struct kref *kref) 529 - { 530 - BUG(); 531 - } 532 - 533 - static void __drm_framebuffer_unreference(struct drm_framebuffer *fb) 534 - { 535 - DRM_DEBUG("%p: FB ID: %d (%d)\n", fb, fb->base.id, atomic_read(&fb->refcount.refcount)); 536 - kref_put(&fb->refcount, drm_framebuffer_free_bug); 537 - } 538 - 539 528 /** 540 529 * drm_framebuffer_unregister_private - unregister a private fb from the lookup idr 541 530 * @fb: fb to unregister ··· 1309 1320 return; 1310 1321 } 1311 1322 /* disconnect the plane from the fb and crtc: */ 1312 - __drm_framebuffer_unreference(plane->old_fb); 1323 + drm_framebuffer_unreference(plane->old_fb); 1313 1324 plane->old_fb = NULL; 1314 1325 plane->fb = NULL; 1315 1326 plane->crtc = NULL;
+21 -17
drivers/gpu/drm/i915/i915_gem.c
··· 2737 2737 2738 2738 WARN_ON(i915_verify_lists(ring->dev)); 2739 2739 2740 - /* Move any buffers on the active list that are no longer referenced 2741 - * by the ringbuffer to the flushing/inactive lists as appropriate, 2742 - * before we free the context associated with the requests. 2740 + /* Retire requests first as we use it above for the early return. 2741 + * If we retire requests last, we may use a later seqno and so clear 2742 + * the requests lists without clearing the active list, leading to 2743 + * confusion. 2743 2744 */ 2744 - while (!list_empty(&ring->active_list)) { 2745 - struct drm_i915_gem_object *obj; 2746 - 2747 - obj = list_first_entry(&ring->active_list, 2748 - struct drm_i915_gem_object, 2749 - ring_list); 2750 - 2751 - if (!i915_gem_request_completed(obj->last_read_req, true)) 2752 - break; 2753 - 2754 - i915_gem_object_move_to_inactive(obj); 2755 - } 2756 - 2757 - 2758 2745 while (!list_empty(&ring->request_list)) { 2759 2746 struct drm_i915_gem_request *request; 2760 2747 struct intel_ringbuffer *ringbuf; ··· 2774 2787 ringbuf->last_retired_head = request->postfix; 2775 2788 2776 2789 i915_gem_free_request(request); 2790 + } 2791 + 2792 + /* Move any buffers on the active list that are no longer referenced 2793 + * by the ringbuffer to the flushing/inactive lists as appropriate, 2794 + * before we free the context associated with the requests. 2795 + */ 2796 + while (!list_empty(&ring->active_list)) { 2797 + struct drm_i915_gem_object *obj; 2798 + 2799 + obj = list_first_entry(&ring->active_list, 2800 + struct drm_i915_gem_object, 2801 + ring_list); 2802 + 2803 + if (!i915_gem_request_completed(obj->last_read_req, true)) 2804 + break; 2805 + 2806 + i915_gem_object_move_to_inactive(obj); 2777 2807 } 2778 2808 2779 2809 if (unlikely(ring->trace_irq_req &&
+13 -5
drivers/gpu/drm/i915/intel_display.c
··· 2438 2438 if (!intel_crtc->base.primary->fb) 2439 2439 return; 2440 2440 2441 - if (intel_alloc_plane_obj(intel_crtc, plane_config)) 2441 + if (intel_alloc_plane_obj(intel_crtc, plane_config)) { 2442 + struct drm_plane *primary = intel_crtc->base.primary; 2443 + 2444 + primary->state->crtc = &intel_crtc->base; 2445 + primary->crtc = &intel_crtc->base; 2446 + update_state_fb(primary); 2447 + 2442 2448 return; 2449 + } 2443 2450 2444 2451 kfree(intel_crtc->base.primary->fb); 2445 2452 intel_crtc->base.primary->fb = NULL; ··· 2469 2462 continue; 2470 2463 2471 2464 if (i915_gem_obj_ggtt_offset(obj) == plane_config->base) { 2465 + struct drm_plane *primary = intel_crtc->base.primary; 2466 + 2472 2467 if (obj->tiling_mode != I915_TILING_NONE) 2473 2468 dev_priv->preserve_bios_swizzle = true; 2474 2469 2475 2470 drm_framebuffer_reference(c->primary->fb); 2476 - intel_crtc->base.primary->fb = c->primary->fb; 2471 + primary->fb = c->primary->fb; 2472 + primary->state->crtc = &intel_crtc->base; 2473 + primary->crtc = &intel_crtc->base; 2477 2474 obj->frontbuffer_bits |= INTEL_FRONTBUFFER_PRIMARY(intel_crtc->pipe); 2478 2475 break; 2479 2476 } ··· 6674 6663 plane_config->size); 6675 6664 6676 6665 crtc->base.primary->fb = fb; 6677 - update_state_fb(crtc->base.primary); 6678 6666 } 6679 6667 6680 6668 static void chv_crtc_clock_get(struct intel_crtc *crtc, ··· 7714 7704 plane_config->size); 7715 7705 7716 7706 crtc->base.primary->fb = fb; 7717 - update_state_fb(crtc->base.primary); 7718 7707 return; 7719 7708 7720 7709 error: ··· 7807 7798 plane_config->size); 7808 7799 7809 7800 crtc->base.primary->fb = fb; 7810 - update_state_fb(crtc->base.primary); 7811 7801 } 7812 7802 7813 7803 static bool ironlake_get_pipe_config(struct intel_crtc *crtc,