Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/radeon Apply preceeding change:



details:   https://anonhg.NetBSD.org/src/rev/e02ab9bbbc16
branches:  trunk
changeset: 339941:e02ab9bbbc16
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Mon Aug 17 15:12:37 2015 +0000

description:
Apply preceeding change:

Don't reserve if atomic -- caller must have pre-pinned the buffer.

to avivo_crtc_do_set_base() as well.

diffstat:

 sys/external/bsd/drm2/dist/drm/radeon/atombios_crtc.c |  16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diffs (37 lines):

diff -r 681f30ec4340 -r e02ab9bbbc16 sys/external/bsd/drm2/dist/drm/radeon/atombios_crtc.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/atombios_crtc.c     Mon Aug 17 13:26:04 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/atombios_crtc.c     Mon Aug 17 15:12:37 2015 +0000
@@ -1382,24 +1382,26 @@
 
        obj = radeon_fb->obj;
        rbo = gem_to_radeon_bo(obj);
-       r = radeon_bo_reserve(rbo, false);
-       if (unlikely(r != 0))
-               return r;
 
        /* If atomic, assume fb object is pinned & idle & fenced and
         * just update base pointers
         */
-       if (atomic)
+       if (atomic) {
+               BUG_ON(rbo->pin_count == 0);
                fb_location = radeon_bo_gpu_offset(rbo);
-       else {
+               tiling_flags = 0;
+       } else {
+               r = radeon_bo_reserve(rbo, false);
+               if (unlikely(r != 0))
+                       return r;
                r = radeon_bo_pin(rbo, RADEON_GEM_DOMAIN_VRAM, &fb_location);
                if (unlikely(r != 0)) {
                        radeon_bo_unreserve(rbo);
                        return -EINVAL;
                }
+               radeon_bo_get_tiling_flags(rbo, &tiling_flags, NULL);
+               radeon_bo_unreserve(rbo);
        }
-       radeon_bo_get_tiling_flags(rbo, &tiling_flags, NULL);
-       radeon_bo_unreserve(rbo);
 
        switch (target_fb->bits_per_pixel) {
        case 8:



Home | Main Index | Thread Index | Old Index