From patchwork Thu Jul 18 16:15:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 11049281 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 556A16C5 for ; Thu, 18 Jul 2019 16:15:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4612B283B2 for ; Thu, 18 Jul 2019 16:15:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39BAE28607; Thu, 18 Jul 2019 16:15:49 +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=unavailable 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 EB92E283B2 for ; Thu, 18 Jul 2019 16:15:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7162F6E442; Thu, 18 Jul 2019 16:15:40 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by gabe.freedesktop.org (Postfix) with ESMTPS id C6F4C6E431; Thu, 18 Jul 2019 16:15:32 +0000 (UTC) Received: by mail-lf1-x143.google.com with SMTP id p197so19602727lfa.2; Thu, 18 Jul 2019 09:15:32 -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=TBzEtdfCBC7JeGboomJdNlsAe05PLJaxt5wvtDjrcuc=; b=O/KQihKvdpoYqpoEE3MV6RGsi9hmb0NNG4hwZ4U/LhxItLPIhv/qaYVtvCxsh7eolm e+YNMMHNlZWYX7ZNZgFkn/HzEcBnBPTyEqxAcTxERWk4xFx+thlK9qhRoGO+5nNWtMi6 N/jnvy2wk6UisA0DYuEYncVg66XAUZKH+tiUGRQD+jDtoQ4vxqIXPpwCihWyI6Non9Ku 71D6uZKqhyaoGO91/fHh8/AhFceODjXpMFxiL0PptdSwfvDcT5LzCdPIQwdffi1vgn07 G6dT07XlguF8Casy80P2wCaSw7DeFiuj7c02Ztav9JqEVrkVgyaBdSBhoY1pU10YbohK 5zRA== X-Gm-Message-State: APjAAAXBCTxFwI/MYICdYvSfRE5a/n0yaGTAcuzciBdc6KoZxbxfKf0E ZMpswYvLb7f4exQRchC9NlCp6ifr2GwS2w== X-Google-Smtp-Source: APXvYqxR6UJvyzBrpoBKJ1t/MeC7+3uFD4fwDUCOIFsQ9De/62GDc97lhKJZ2LBIEMtYzSPi07yrWA== X-Received: by 2002:ac2:5a01:: with SMTP id q1mr7852749lfn.46.1563466530686; Thu, 18 Jul 2019 09:15:30 -0700 (PDT) Received: from saturn.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id d21sm4057995lfc.73.2019.07.18.09.15.29 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 18 Jul 2019 09:15:30 -0700 (PDT) From: Sam Ravnborg To: dri-devel@lists.freedesktop.org, Intel Graphics Development Date: Thu, 18 Jul 2019 18:15:00 +0200 Message-Id: <20190718161507.2047-5-sam@ravnborg.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190718161507.2047-1-sam@ravnborg.org> References: <20190718161507.2047-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=TBzEtdfCBC7JeGboomJdNlsAe05PLJaxt5wvtDjrcuc=; b=rCmwKJR0Ch/XIKuvX/iHVKTyWuto858/ULPTJNZuoxCPXol4vTi8kjxj+OdaXRHT2p 6X2P9wZze0CqOaL4cU4Fu+dF5nzao2U+If/3C1Ki+1MGinO/FNJEwAznmWmf3mgwZopF cjQJhUjrAaTQ7iESM5EOl8nbtN5Kd82P/bCbjr9z/u0JOwcVUoQoGQeIsjyTbQwtPb8x rzCup7ZkSowfDduPVWmrzvT/m59PrUV7GE6LkJD8zixS/9mAKNe5A+RJhaj0lUXzlkhN 2V+r1O1M7tPiHg09aIT6VLwMqOplw0dPGxu03kCzU5Too4xcj+CwW98qLmBs2roVk8GE 0sJQ== Subject: [Intel-gfx] [PATCH v1 04/11] drm/ati_pcigart: drop dependency on drm_os_linux.h X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Sam Ravnborg , Rob Herring , Maxime Ripard , CK Hu , Thierry Reding , Chunming Zhou , Jani Nikula , linux-mediatek@lists.infradead.org, Stefan Agner , Matthias Brugger , linux-arm-kernel@lists.infradead.org, Boris Brezillon , Thomas Zimmermann , =?utf-8?q?Noralf_Tr=C3=B8nnes?= , Philipp Zabel , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP The drm_os_linux.h header is deprecated. Just opencode the sole DRM_WRITE32(). Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Reviewed-by: Sean Paul --- drivers/gpu/drm/ati_pcigart.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/ati_pcigart.c b/drivers/gpu/drm/ati_pcigart.c index 2a413e291a60..580aa2676358 100644 --- a/drivers/gpu/drm/ati_pcigart.c +++ b/drivers/gpu/drm/ati_pcigart.c @@ -35,7 +35,6 @@ #include #include -#include #include #include @@ -169,6 +168,7 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga page_base = (u32) entry->busaddr[i]; for (j = 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) { + u32 offset; u32 val; switch(gart_info->gart_reg_if) { @@ -184,10 +184,12 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga break; } if (gart_info->gart_table_location == - DRM_ATI_GART_MAIN) + DRM_ATI_GART_MAIN) { pci_gart[gart_idx] = cpu_to_le32(val); - else - DRM_WRITE32(map, gart_idx * sizeof(u32), val); + } else { + offset = gart_idx * sizeof(u32); + writel(val, (void __iomem *)map->handle + offset); + } gart_idx++; page_base += ATI_PCIGART_PAGE_SIZE; }