Repository navigation
Commit ab8d667
drm/i915: Track old framebuffer instead of object
Daniel Vetter spotted a bug while reviewing some of my refactoring in this
are of the code. I'll quote:
"""
> @@ -9764,6 +9768,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
> work->event = event;
> work->crtc = crtc;
> work->old_fb_obj = intel_fb_obj(old_fb);
> + work->old_tiling_mode = to_intel_framebuffer(old_fb)->tiling_mode;
Hm, that's actually an interesting bugfix - currently userspace could be
sneaky and destroy the old fb immediately after the flip completes and the
change the tiling of the underlying object before the unpin work had a
chance to run (needs some fudgin with rt prios to starve workers to make
this work though).
Imo the right fix is to hold a reference onto the fb and not the
underlying gem object. With that tiling is guaranteed not to change.
"""
This patch tries to implement the above proposed change.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>1 parent 3f678c9 commit ab8d667
2 files changed
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9055 | 9055 | | |
9056 | 9056 | | |
9057 | 9057 | | |
9058 | | - | |
| 9058 | + | |
9059 | 9059 | | |
9060 | | - | |
| 9060 | + | |
9061 | 9061 | | |
9062 | 9062 | | |
9063 | 9063 | | |
| |||
9760 | 9760 | | |
9761 | 9761 | | |
9762 | 9762 | | |
9763 | | - | |
| 9763 | + | |
9764 | 9764 | | |
9765 | 9765 | | |
9766 | 9766 | | |
| |||
9796 | 9796 | | |
9797 | 9797 | | |
9798 | 9798 | | |
9799 | | - | |
| 9799 | + | |
9800 | 9800 | | |
9801 | 9801 | | |
9802 | 9802 | | |
| |||
9818 | 9818 | | |
9819 | 9819 | | |
9820 | 9820 | | |
9821 | | - | |
| 9821 | + | |
9822 | 9822 | | |
9823 | 9823 | | |
9824 | 9824 | | |
| |||
9859 | 9859 | | |
9860 | 9860 | | |
9861 | 9861 | | |
9862 | | - | |
| 9862 | + | |
9863 | 9863 | | |
9864 | 9864 | | |
9865 | 9865 | | |
| |||
9875 | 9875 | | |
9876 | 9876 | | |
9877 | 9877 | | |
9878 | | - | |
| 9878 | + | |
9879 | 9879 | | |
9880 | 9880 | | |
9881 | 9881 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
710 | 710 | | |
711 | 711 | | |
712 | 712 | | |
713 | | - | |
| 713 | + | |
714 | 714 | | |
715 | 715 | | |
716 | 716 | | |
| |||
0 commit comments