mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jammy Huang <jammy_huang@aspeedtech.com>
To: Thomas Zimmermann <tzimmermann@suse.de>, <airlied@redhat.com>
Cc: <airlied@gmail.com>, <daniel@ffwll.ch>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] drm/ast: Fix ARM compatibility
Date: Thu, 20 Apr 2023 17:37:01 +0800	[thread overview]
Message-ID: <325512ba-b468-bca0-d3ef-a1c9cf464d62@aspeedtech.com> (raw)
In-Reply-To: <61edb9d3-11f5-42de-633d-6e6253ce021f@suse.de>

Hi Thomas,

Thanks for help. I will update a new patch per your comments

On 2023/4/20 下午 04:57, Thomas Zimmermann wrote:
> Hi
>
> Am 20.04.23 um 10:09 schrieb Jammy Huang:
>> ARM architecture only has 'memory', so all devices are accessed by
>> MMIO if possible.
>>
>> Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
>> ---
>>   v2 changes:
>>    - Use MMIO after AST2500 which enable MMIO by default.
>> ---
>>   drivers/gpu/drm/ast/ast_main.c | 9 +++++----
>>   1 file changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/ast/ast_main.c 
>> b/drivers/gpu/drm/ast/ast_main.c
>> index f83ce77127cb..d384e810fa4d 100644
>> --- a/drivers/gpu/drm/ast/ast_main.c
>> +++ b/drivers/gpu/drm/ast/ast_main.c
>> @@ -425,11 +425,12 @@ struct ast_private *ast_device_create(const 
>> struct drm_driver *drv,
>>           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).
>> +     * After AST2500, MMIO is enabled by default, and it should be 
>> adapted
>
> By 'adapted', you mean 'adopted'?
>
> Apart from that:
>
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>
> I also ran this patch on an AST2100, which still works as before.
>
> Best regards
> Thomas
>
>> +     * to be compatible with Arm.
>>        */
>> -    if (!(pci_resource_flags(pdev, 2) & IORESOURCE_IO)) {
>> +    if (pdev->revision >= 0x40) {
>> +        ast->ioregs = ast->regs + AST_IO_MM_OFFSET;
>> +    } else 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;
>>       }
>>
>> base-commit: e62252bc55b6d4eddc6c2bdbf95a448180d6a08d
>
-- 
Best Regards
Jammy


      reply	other threads:[~2023-04-20  9:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20  8:09 Jammy Huang
2023-04-20  8:57 ` Thomas Zimmermann
2023-04-20  9:37   ` Jammy Huang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=325512ba-b468-bca0-d3ef-a1c9cf464d62@aspeedtech.com \
    --to=jammy_huang@aspeedtech.com \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®