| .. | .. |
|---|
| 28 | 28 | * be very slow. |
|---|
| 29 | 29 | */ |
|---|
| 30 | 30 | |
|---|
| 31 | | -#include "via_3d_reg.h" |
|---|
| 32 | | -#include <drm/drmP.h> |
|---|
| 33 | | -#include <drm/via_drm.h> |
|---|
| 31 | +#include <drm/drm_device.h> |
|---|
| 34 | 32 | #include <drm/drm_legacy.h> |
|---|
| 35 | | -#include "via_verifier.h" |
|---|
| 33 | +#include <drm/via_drm.h> |
|---|
| 34 | + |
|---|
| 35 | +#include "via_3d_reg.h" |
|---|
| 36 | 36 | #include "via_drv.h" |
|---|
| 37 | | -#include <linux/kernel.h> |
|---|
| 37 | +#include "via_verifier.h" |
|---|
| 38 | 38 | |
|---|
| 39 | 39 | typedef enum { |
|---|
| 40 | 40 | state_command, |
|---|
| .. | .. |
|---|
| 725 | 725 | next_fire = dev_priv->fire_offsets[*fire_count]; |
|---|
| 726 | 726 | buf++; |
|---|
| 727 | 727 | cmd = (*buf & 0xFFFF0000) >> 16; |
|---|
| 728 | | - VIA_WRITE(HC_REG_TRANS_SET + HC_REG_BASE, *buf++); |
|---|
| 728 | + via_write(dev_priv, HC_REG_TRANS_SET + HC_REG_BASE, *buf++); |
|---|
| 729 | 729 | switch (cmd) { |
|---|
| 730 | 730 | case HC_ParaType_CmdVdata: |
|---|
| 731 | 731 | while ((buf < buf_end) && |
|---|
| 732 | 732 | (*fire_count < dev_priv->num_fire_offsets) && |
|---|
| 733 | 733 | (*buf & HC_ACMD_MASK) == HC_ACMD_HCmdB) { |
|---|
| 734 | 734 | while (buf <= next_fire) { |
|---|
| 735 | | - VIA_WRITE(HC_REG_TRANS_SPACE + HC_REG_BASE + |
|---|
| 735 | + via_write(dev_priv, HC_REG_TRANS_SPACE + HC_REG_BASE + |
|---|
| 736 | 736 | (burst & 63), *buf++); |
|---|
| 737 | 737 | burst += 4; |
|---|
| 738 | 738 | } |
|---|
| .. | .. |
|---|
| 753 | 753 | (*buf & VIA_VIDEOMASK) == VIA_VIDEO_HEADER6) |
|---|
| 754 | 754 | break; |
|---|
| 755 | 755 | |
|---|
| 756 | | - VIA_WRITE(HC_REG_TRANS_SPACE + HC_REG_BASE + |
|---|
| 756 | + via_write(dev_priv, HC_REG_TRANS_SPACE + HC_REG_BASE + |
|---|
| 757 | 757 | (burst & 63), *buf++); |
|---|
| 758 | 758 | burst += 4; |
|---|
| 759 | 759 | } |
|---|
| .. | .. |
|---|
| 843 | 843 | cmd = *buf; |
|---|
| 844 | 844 | if ((cmd & HALCYON_HEADER1MASK) != HALCYON_HEADER1) |
|---|
| 845 | 845 | break; |
|---|
| 846 | | - VIA_WRITE((cmd & ~HALCYON_HEADER1MASK) << 2, *++buf); |
|---|
| 846 | + via_write(dev_priv, (cmd & ~HALCYON_HEADER1MASK) << 2, *++buf); |
|---|
| 847 | 847 | buf++; |
|---|
| 848 | 848 | } |
|---|
| 849 | 849 | *buffer = buf; |
|---|
| .. | .. |
|---|
| 894 | 894 | i = count = *buf; |
|---|
| 895 | 895 | buf += 3; |
|---|
| 896 | 896 | while (i--) |
|---|
| 897 | | - VIA_WRITE(addr, *buf++); |
|---|
| 897 | + via_write(dev_priv, addr, *buf++); |
|---|
| 898 | 898 | if (count & 3) |
|---|
| 899 | 899 | buf += 4 - (count & 3); |
|---|
| 900 | 900 | *buffer = buf; |
|---|
| .. | .. |
|---|
| 950 | 950 | buf += 3; |
|---|
| 951 | 951 | while (i--) { |
|---|
| 952 | 952 | addr = *buf++; |
|---|
| 953 | | - VIA_WRITE(addr, *buf++); |
|---|
| 953 | + via_write(dev_priv, addr, *buf++); |
|---|
| 954 | 954 | } |
|---|
| 955 | 955 | count <<= 1; |
|---|
| 956 | 956 | if (count & 3) |
|---|