Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/savage: drop use of drm_os_linux

Drop use of macros from the deprecated drm_os_linux header.
Simple 1:1 replacements of
- DRM_UDELAY
- DRM_CURRENTPID
- DRM_READ
- DRM_WRITE

With this change we do not need to introduce the deprecated
drm_os_linux.h header when we drop use of drmP.h.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@linux.ie>
Link: https://patchwork.freedesktop.org/patch/msgid/20190605140313.13629-2-sam@ravnborg.org

+14 -9
+10 -7
drivers/gpu/drm/savage/savage_bci.c
··· 22 22 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 23 23 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 24 */ 25 + 26 + #include <linux/delay.h> 27 + 25 28 #include <drm/drmP.h> 26 29 #include <drm/savage_drm.h> 27 30 #include "savage_drv.h" ··· 56 53 status = dev_priv->status_ptr[0]; 57 54 if ((status & mask) < threshold) 58 55 return 0; 59 - DRM_UDELAY(1); 56 + udelay(1); 60 57 } 61 58 62 59 #if SAVAGE_BCI_DEBUG ··· 77 74 status = SAVAGE_READ(SAVAGE_STATUS_WORD0); 78 75 if ((status & SAVAGE_FIFO_USED_MASK_S3D) <= maxUsed) 79 76 return 0; 80 - DRM_UDELAY(1); 77 + udelay(1); 81 78 } 82 79 83 80 #if SAVAGE_BCI_DEBUG ··· 98 95 status = SAVAGE_READ(SAVAGE_ALT_STATUS_WORD0); 99 96 if ((status & SAVAGE_FIFO_USED_MASK_S4) <= maxUsed) 100 97 return 0; 101 - DRM_UDELAY(1); 98 + udelay(1); 102 99 } 103 100 104 101 #if SAVAGE_BCI_DEBUG ··· 131 128 if ((((status & 0xffff) - e) & 0xffff) <= 0x7fff || 132 129 (status & 0xffff) == 0) 133 130 return 0; 134 - DRM_UDELAY(1); 131 + udelay(1); 135 132 } 136 133 137 134 #if SAVAGE_BCI_DEBUG ··· 153 150 if ((((status & 0xffff) - e) & 0xffff) <= 0x7fff || 154 151 (status & 0xffff) == 0) 155 152 return 0; 156 - DRM_UDELAY(1); 153 + udelay(1); 157 154 } 158 155 159 156 #if SAVAGE_BCI_DEBUG ··· 1017 1014 */ 1018 1015 if (d->send_count != 0) { 1019 1016 DRM_ERROR("Process %d trying to send %d buffers via drmDMA\n", 1020 - DRM_CURRENTPID, d->send_count); 1017 + task_pid_nr(current), d->send_count); 1021 1018 return -EINVAL; 1022 1019 } 1023 1020 ··· 1025 1022 */ 1026 1023 if (d->request_count < 0 || d->request_count > dma->buf_count) { 1027 1024 DRM_ERROR("Process %d trying to get %d buffers (of %d max)\n", 1028 - DRM_CURRENTPID, d->request_count, dma->buf_count); 1025 + task_pid_nr(current), d->request_count, dma->buf_count); 1029 1026 return -EINVAL; 1030 1027 } 1031 1028
+4 -2
drivers/gpu/drm/savage/savage_drv.h
··· 484 484 /* 485 485 * access to MMIO 486 486 */ 487 - #define SAVAGE_READ(reg) DRM_READ32( dev_priv->mmio, (reg) ) 488 - #define SAVAGE_WRITE(reg) DRM_WRITE32( dev_priv->mmio, (reg) ) 487 + #define SAVAGE_READ(reg) \ 488 + readl(((void __iomem *)dev_priv->mmio->handle) + (reg)) 489 + #define SAVAGE_WRITE(reg) \ 490 + writel(val, ((void __iomem *)dev_priv->mmio->handle) + (reg)) 489 491 490 492 /* 491 493 * access to the burst command interface (BCI)