.. | .. |
---|
25 | 25 | * Alex Deucher |
---|
26 | 26 | * Jerome Glisse |
---|
27 | 27 | */ |
---|
28 | | -#include <linux/seq_file.h> |
---|
29 | | -#include <linux/slab.h> |
---|
30 | | -#include <drm/drmP.h> |
---|
31 | | -#include <drm/radeon_drm.h> |
---|
32 | | -#include "radeon_reg.h" |
---|
33 | | -#include "radeon.h" |
---|
34 | | -#include "radeon_asic.h" |
---|
35 | | -#include "r100d.h" |
---|
36 | | -#include "rs100d.h" |
---|
37 | | -#include "rv200d.h" |
---|
38 | | -#include "rv250d.h" |
---|
39 | | -#include "atom.h" |
---|
40 | 28 | |
---|
41 | 29 | #include <linux/firmware.h> |
---|
42 | 30 | #include <linux/module.h> |
---|
| 31 | +#include <linux/pci.h> |
---|
| 32 | +#include <linux/seq_file.h> |
---|
| 33 | +#include <linux/slab.h> |
---|
43 | 34 | |
---|
| 35 | +#include <drm/drm_debugfs.h> |
---|
| 36 | +#include <drm/drm_device.h> |
---|
| 37 | +#include <drm/drm_file.h> |
---|
| 38 | +#include <drm/drm_fourcc.h> |
---|
| 39 | +#include <drm/drm_vblank.h> |
---|
| 40 | +#include <drm/radeon_drm.h> |
---|
| 41 | + |
---|
| 42 | +#include "atom.h" |
---|
44 | 43 | #include "r100_reg_safe.h" |
---|
| 44 | +#include "r100d.h" |
---|
| 45 | +#include "radeon.h" |
---|
| 46 | +#include "radeon_asic.h" |
---|
| 47 | +#include "radeon_reg.h" |
---|
45 | 48 | #include "rn50_reg_safe.h" |
---|
| 49 | +#include "rs100d.h" |
---|
| 50 | +#include "rv200d.h" |
---|
| 51 | +#include "rv250d.h" |
---|
46 | 52 | |
---|
47 | 53 | /* Firmware Names */ |
---|
48 | 54 | #define FIRMWARE_R100 "radeon/R100_cp.bin" |
---|
.. | .. |
---|
885 | 891 | uint64_t src_offset, |
---|
886 | 892 | uint64_t dst_offset, |
---|
887 | 893 | unsigned num_gpu_pages, |
---|
888 | | - struct reservation_object *resv) |
---|
| 894 | + struct dma_resv *resv) |
---|
889 | 895 | { |
---|
890 | 896 | struct radeon_ring *ring = &rdev->ring[RADEON_RING_TYPE_GFX_INDEX]; |
---|
891 | 897 | struct radeon_fence *fence; |
---|
.. | .. |
---|
1817 | 1823 | case RADEON_PP_TXFORMAT_2: |
---|
1818 | 1824 | i = (reg - RADEON_PP_TXFORMAT_0) / 24; |
---|
1819 | 1825 | if (idx_value & RADEON_TXFORMAT_NON_POWER2) { |
---|
1820 | | - track->textures[i].use_pitch = 1; |
---|
| 1826 | + track->textures[i].use_pitch = true; |
---|
1821 | 1827 | } else { |
---|
1822 | | - track->textures[i].use_pitch = 0; |
---|
| 1828 | + track->textures[i].use_pitch = false; |
---|
1823 | 1829 | track->textures[i].width = 1 << ((idx_value & RADEON_TXFORMAT_WIDTH_MASK) >> RADEON_TXFORMAT_WIDTH_SHIFT); |
---|
1824 | 1830 | track->textures[i].height = 1 << ((idx_value & RADEON_TXFORMAT_HEIGHT_MASK) >> RADEON_TXFORMAT_HEIGHT_SHIFT); |
---|
1825 | 1831 | } |
---|
.. | .. |
---|
2381 | 2387 | else |
---|
2382 | 2388 | track->num_texture = 6; |
---|
2383 | 2389 | track->maxy = 2048; |
---|
2384 | | - track->separate_cube = 1; |
---|
| 2390 | + track->separate_cube = true; |
---|
2385 | 2391 | } else { |
---|
2386 | 2392 | track->num_cb = 4; |
---|
2387 | 2393 | track->num_texture = 16; |
---|
2388 | 2394 | track->maxy = 4096; |
---|
2389 | | - track->separate_cube = 0; |
---|
| 2395 | + track->separate_cube = false; |
---|
2390 | 2396 | track->aaresolve = false; |
---|
2391 | 2397 | track->aa.robj = NULL; |
---|
2392 | 2398 | } |
---|
.. | .. |
---|
2470 | 2476 | if (tmp >= n) { |
---|
2471 | 2477 | return 0; |
---|
2472 | 2478 | } |
---|
2473 | | - DRM_UDELAY(1); |
---|
| 2479 | + udelay(1); |
---|
2474 | 2480 | } |
---|
2475 | 2481 | return -1; |
---|
2476 | 2482 | } |
---|
.. | .. |
---|
2488 | 2494 | if (!(tmp & RADEON_RBBM_ACTIVE)) { |
---|
2489 | 2495 | return 0; |
---|
2490 | 2496 | } |
---|
2491 | | - DRM_UDELAY(1); |
---|
| 2497 | + udelay(1); |
---|
2492 | 2498 | } |
---|
2493 | 2499 | return -1; |
---|
2494 | 2500 | } |
---|
.. | .. |
---|
2504 | 2510 | if (tmp & RADEON_MC_IDLE) { |
---|
2505 | 2511 | return 0; |
---|
2506 | 2512 | } |
---|
2507 | | - DRM_UDELAY(1); |
---|
| 2513 | + udelay(1); |
---|
2508 | 2514 | } |
---|
2509 | 2515 | return -1; |
---|
2510 | 2516 | } |
---|
.. | .. |
---|
2809 | 2815 | uint32_t temp; |
---|
2810 | 2816 | |
---|
2811 | 2817 | temp = RREG32(RADEON_CONFIG_CNTL); |
---|
2812 | | - if (state == false) { |
---|
| 2818 | + if (!state) { |
---|
2813 | 2819 | temp &= ~RADEON_CFG_VGA_RAM_EN; |
---|
2814 | 2820 | temp |= RADEON_CFG_VGA_IO_DIS; |
---|
2815 | 2821 | } else { |
---|
.. | .. |
---|
3669 | 3675 | if (tmp == 0xDEADBEEF) { |
---|
3670 | 3676 | break; |
---|
3671 | 3677 | } |
---|
3672 | | - DRM_UDELAY(1); |
---|
| 3678 | + udelay(1); |
---|
3673 | 3679 | } |
---|
3674 | 3680 | if (i < rdev->usec_timeout) { |
---|
3675 | 3681 | DRM_INFO("ring test succeeded in %d usecs\n", i); |
---|
.. | .. |
---|
3746 | 3752 | if (tmp == 0xDEADBEEF) { |
---|
3747 | 3753 | break; |
---|
3748 | 3754 | } |
---|
3749 | | - DRM_UDELAY(1); |
---|
| 3755 | + udelay(1); |
---|
3750 | 3756 | } |
---|
3751 | 3757 | if (i < rdev->usec_timeout) { |
---|
3752 | 3758 | DRM_INFO("ib test succeeded in %u usecs\n", i); |
---|