From patchwork Sat Jul 20 08:45:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 11050817 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 97E0113B1 for ; Sat, 20 Jul 2019 08:46:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87C332898C for ; Sat, 20 Jul 2019 08:46:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 793162898E; Sat, 20 Jul 2019 08:46:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 22DA82898C for ; Sat, 20 Jul 2019 08:46:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A6E16E895; Sat, 20 Jul 2019 08:46:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0488F6E888; Sat, 20 Jul 2019 08:45:54 +0000 (UTC) Received: by mail-lj1-x241.google.com with SMTP id i21so32931526ljj.3; Sat, 20 Jul 2019 01:45:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=5bCKsoONVp9v/i0uE4V+7JVM6Ep6Ht+p5Byht1Y7c+M=; b=ezmj/lWYZ2w+g7NjAth3BjLR0nYbqX6TmiOd8GAJ0Tp2NbOBwdAM9I3jWdsfVWOnxX y+IxHzNQzgmLs62/9LEUhRlAZ4HIr700LoCv4UV/R3q7AHdYoJUfocdAiRhaBLB3z8VL /yVquGbbK7+lQdCC8IjoSNNWzvEKDFj1po7wacUoWUS5axw7Hu5j3qeQ2PeOT9ckSDQQ eaYaRNIw6SeHSxP0OGZ6jzs+TxiFj7/vDtXkvsiPb8trh1/p/lK/1EVbPIBzS7czip6L 5KQlWdaY3hnAz/Unju8sx9UqGUdAyZNGEfqI0X5q7bQCH7kPVRLPiR3erVGwq4WA5Vum zQGA== X-Gm-Message-State: APjAAAX1BWFz+CMFJ9hZv19fpP32yykHug+jhetLrgv3fufzAyeteaHt 69wC4NqAFgYLBdpDHW0LpanNm8VE3zs= X-Google-Smtp-Source: APXvYqzLmICwVJI0xuFdgtgJSFdzktOhdrpDLnrbrMd8ylnft4HiMlbf7I+U6N4rZQJfY4RI+gPrzA== X-Received: by 2002:a2e:720b:: with SMTP id n11mr30523480ljc.213.1563612352224; Sat, 20 Jul 2019 01:45:52 -0700 (PDT) Received: from saturn.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id o3sm5047022lfb.40.2019.07.20.01.45.51 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 20 Jul 2019 01:45:51 -0700 (PDT) From: Sam Ravnborg To: dri-devel@lists.freedesktop.org, openchrome-devel@lists.freedesktop.org Subject: [PATCH v2 1/4] drm/via: drop use of DRM(READ|WRITE) macros Date: Sat, 20 Jul 2019 10:45:24 +0200 Message-Id: <20190720084527.12593-2-sam@ravnborg.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190720084527.12593-1-sam@ravnborg.org> References: <20190720084527.12593-1-sam@ravnborg.org> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5bCKsoONVp9v/i0uE4V+7JVM6Ep6Ht+p5Byht1Y7c+M=; b=WwfrwhCCzIVz3MO7knrE0Y65hmceYpNrU9T1mpKSvSWVDBNU1CPPVCFQ5TwY79Rpro b9GvV3SjyOh6e5zQwjt4HjLAoVMXvP8tDSHAjcCySM/Fx0NPqOZ2lT9MNhp7aKou8kBF znrJIgg6rU0axYsoQrPEMtf0f5tZRwbC4aUpozNEUvh8NT8SdbSrSAGE0EpUAF4FE8cG HaXhGmy0dwLoGMGioA7clwg5Ck/EEwLgl7anEae1WPgK6+OGiqyudP6VVOkGDwZ3RUJZ KKazzPGLy7kDgVU4J14iYjd29EUNK0YYQ/nxGBOv9nf07DxHJPZ5mhn7+DK82GkJWVBa ARYA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Hellstrom , Sam Ravnborg , "Gustavo A. R. Silva" , David Airlie , Daniel Vetter , =?utf-8?q?Michel_D=C3=A4nzer?= , Kevin Brace , Mike Marshall , Ira Weiny , Emil Velikov Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The DRM_READ, DRM_WRITE macros comes from the deprecated drm_os_linux.h header file. Remove their use to remove this dependency. Replace the use of the macros with open coded variants. Signed-off-by: Sam Ravnborg Cc: Kevin Brace Cc: Thomas Hellstrom Cc: "Gustavo A. R. Silva" Cc: Mike Marshall Cc: Ira Weiny Cc: Daniel Vetter Cc: Emil Velikov Cc: Michel Dänzer --- drivers/gpu/drm/via/via_drv.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/via/via_drv.h b/drivers/gpu/drm/via/via_drv.h index 6d1ae834484c..d5a2b1ffd8c1 100644 --- a/drivers/gpu/drm/via/via_drv.h +++ b/drivers/gpu/drm/via/via_drv.h @@ -115,10 +115,17 @@ enum via_family { /* VIA MMIO register access */ #define VIA_BASE ((dev_priv->mmio)) -#define VIA_READ(reg) DRM_READ32(VIA_BASE, reg) -#define VIA_WRITE(reg, val) DRM_WRITE32(VIA_BASE, reg, val) -#define VIA_READ8(reg) DRM_READ8(VIA_BASE, reg) -#define VIA_WRITE8(reg, val) DRM_WRITE8(VIA_BASE, reg, val) +#define VIA_READ(reg) \ + readl(((void __iomem *)VIA_BASE->handle) + (reg)) + +#define VIA_WRITE(reg, val) \ + writel(val, ((void __iomem *)VIA_BASE->handle) + (reg)) + +#define VIA_READ8(reg) \ + readb(((void __iomem *)VIA_BASE->handle) + (reg)) + +#define VIA_WRITE8(reg, val) \ + writeb(val, ((void __iomem *)VIA_BASE->handle) + (reg)) extern const struct drm_ioctl_desc via_ioctls[]; extern int via_max_ioctl;