From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38002C76196 for ; Fri, 7 Apr 2023 02:12:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239785AbjDGCMo (ORCPT ); Thu, 6 Apr 2023 22:12:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240408AbjDGCM0 (ORCPT ); Thu, 6 Apr 2023 22:12:26 -0400 Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E80510B for ; Thu, 6 Apr 2023 19:12:18 -0700 (PDT) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 3371u0xM047933; Fri, 7 Apr 2023 09:56:00 +0800 (GMT-8) (envelope-from jammy_huang@aspeedtech.com) Received: from [192.168.2.115] (192.168.2.115) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 7 Apr 2023 10:11:35 +0800 Message-ID: Date: Fri, 7 Apr 2023 10:09:24 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] drm/ast: Fix ARM compatibility From: Jammy Huang To: , , , CC: , , References: <20230302021905.2777-1-jammy_huang@aspeedtech.com> Content-Language: en-US In-Reply-To: <20230302021905.2777-1-jammy_huang@aspeedtech.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [192.168.2.115] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 3371u0xM047933 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, Could you help review this patch?? We met some problem on nvidia's ARM platfrom and need this patch to fix it. On 2023/3/2 上午 10:19, Jammy Huang wrote: > ARM architecture only has 'memory', so all devices are accessed by MMIO. > > Signed-off-by: Jammy Huang > --- > drivers/gpu/drm/ast/ast_main.c | 17 +---------------- > 1 file changed, 1 insertion(+), 16 deletions(-) > > diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c > index 794ffd4a29c5..f86d01e9f024 100644 > --- a/drivers/gpu/drm/ast/ast_main.c > +++ b/drivers/gpu/drm/ast/ast_main.c > @@ -424,22 +424,7 @@ struct ast_device *ast_device_create(const struct drm_driver *drv, > if (!ast->regs) > return ERR_PTR(-EIO); > > - /* > - * If we don't have IO space at all, use MMIO now and > - * assume the chip has MMIO enabled by default (rev 0x20 > - * and higher). > - */ > - if (!(pci_resource_flags(pdev, 2) & IORESOURCE_IO)) { > - drm_info(dev, "platform has no IO space, trying MMIO\n"); > - ast->ioregs = ast->regs + AST_IO_MM_OFFSET; > - } > - > - /* "map" IO regs if the above hasn't done so already */ > - if (!ast->ioregs) { > - ast->ioregs = pcim_iomap(pdev, 2, 0); > - if (!ast->ioregs) > - return ERR_PTR(-EIO); > - } > + ast->ioregs = ast->regs + AST_IO_MM_OFFSET; > > ast_detect_chip(dev, &need_post); > > > base-commit: 254986e324add8a30d0019c6da59f81adc8b565f -- Best Regards Jammy