From 0289f4e4a26fb4041bed1a905dd9373369c58e14 Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Mon, 16 Apr 2012 10:29:08 -0400 Subject: [PATCH] DEBUG BEST FAILURE --- radeon/radeon_surface.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c index 6303c47..8b7a944 100644 --- a/radeon/radeon_surface.c +++ b/radeon/radeon_surface.c @@ -776,6 +776,7 @@ static int eg_surface_best(struct radeon_surface_manager *surf_man, unsigned mode, tileb, h_over_w; int r; +fprintf(stderr, "%s %d\n", __func__, __LINE__); /* tiling mode */ mode = (surf->flags >> RADEON_SURF_MODE_SHIFT) & RADEON_SURF_MODE_MASK; @@ -801,6 +802,7 @@ static int eg_surface_best(struct radeon_surface_manager *surf_man, r = eg_surface_sanity(surf_man, surf, mode); if (r) { +fprintf(stderr, "%s %d\n", __func__, __LINE__); return r; } @@ -914,17 +916,21 @@ static int radeon_surface_sanity(struct radeon_surface_manager *surf_man, unsigned mode) { if (surf_man == NULL || surf_man->surface_init == NULL || surf == NULL) { +fprintf(stderr, "%s %d\n", __func__, __LINE__); return -EINVAL; } /* all dimension must be at least 1 ! */ if (!surf->npix_x || !surf->npix_y || !surf->npix_z) { +fprintf(stderr, "%s %d (%d %d %d)\n", __func__, __LINE__, surf->npix_x, surf->npix_y, surf->npix_z); return -EINVAL; } if (!surf->blk_w || !surf->blk_h || !surf->blk_d) { +fprintf(stderr, "%s %d (%d %d %d)\n", __func__, __LINE__, surf->blk_w, surf->blk_h, surf->blk_d); return -EINVAL; } if (!surf->array_size) { +fprintf(stderr, "%s %d (%d)\n", __func__, __LINE__, surf->array_size); return -EINVAL; } /* array size must be a power of 2 */ @@ -937,9 +943,11 @@ static int radeon_surface_sanity(struct radeon_surface_manager *surf_man, case 8: break; default: +fprintf(stderr, "%s %d (%d)\n", __func__, __LINE__, surf->nsamples); return -EINVAL; } /* check type */ +fprintf(stderr, "%s %d (%d)\n", __func__, __LINE__, type); switch (type) { case RADEON_SURF_TYPE_1D: if (surf->npix_y > 1) { @@ -972,6 +980,7 @@ static int radeon_surface_sanity(struct radeon_surface_manager *surf_man, default: return -EINVAL; } +fprintf(stderr, "%s %d OK\n", __func__, __LINE__); return 0; } @@ -1002,6 +1011,7 @@ int radeon_surface_best(struct radeon_surface_manager *surf_man, r = radeon_surface_sanity(surf_man, surf, type, mode); if (r) { +fprintf(stderr, "%s %d\n", __func__, __LINE__); return r; } return surf_man->surface_best(surf_man, surf); -- 1.7.9.3