From: 李晨阳 <lichenyang@loongson.cn>
To: "Huacai Chen" <chenhuacai@kernel.org>
Cc: "Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@linux.ie>,
"Daniel Vetter" <daniel@ffwll.ch>,
LKML <linux-kernel@vger.kernel.org>,
"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>,
"Huacai Chen" <chenhuacai@loongson.cn>,
"Tiezhu Yang" <yangtiezhu@loongson.cn>
Subject: Reply: Re: [PATCH v5] drm/loongson: Add DRM Driver for Loongson 7A1000 bridge chip
Date: Sat, 6 Mar 2021 14:48:26 +0800 (GMT+08:00) [thread overview]
Message-ID: <42da178.aba.178064b600d.Coremail.lichenyang@loongson.cn> (raw)
In-Reply-To: <CAAhV-H5pv7aSEgGqCwOFHYQ7OH1dPa59XO4YEC7mFunhasrwgQ@mail.gmail.com>
> > +void ls7a_mm_wreg_locked(struct loongson_device *ldev, u32 offset, u32 val)
> > +{
> > + unsigned long flags;
> > +
> > + spin_lock_irqsave(&ldev->mmio_lock, flags);
> > + writel(val, ldev->mmio + offset);
> > + spin_unlock_irqrestore(&ldev->mmio_lock, flags);
> > +}
> Why lock and disable irq? To workaround the hw issue from the first
> revision of LS7A? If so, I suggest to remove the workaround. Because:
> 1, mmio r/w will be used in irq context; 2, newer revision of LS7A
> doesn't need workaround.
Yes,the lock is to workaround the hw issue,I have decided to remove the lock.
>
> > +
> > + /* DC IO */
> > + ldev->io = (void *)TO_UNCAC(LS7A_CHIPCFG_REG_BASE);
> TO_UNCAC() is a MIPS-specific macro, I think ioremap() is better.
OK.I have switched to ioremap, and the test passed.
>
> > +#define LS7A_CHIPCFG_REG_BASE (0x10010000)
> > +#define PCI_DEVICE_ID_LOONGSON_DC 0x7a06
> > +#define PCI_DEVICE_ID_LOONGSON_GPU 0x7a15
> They are already defined in include/linux/pci_ids.h.
In include/linux/pci_ids.h only defined PCI_VENDOR_ID_LOONGSON.
------------------------------
Loongson LiChenyang
prev parent reply other threads:[~2021-03-06 6:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210219091146.75364-1-lichenyang@loongson.cn>
2021-02-20 9:53 ` Huacai Chen
2021-03-06 6:48 ` 李晨阳 [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=42da178.aba.178064b600d.Coremail.lichenyang@loongson.cn \
--to=lichenyang@loongson.cn \
--cc=airlied@linux.ie \
--cc=chenhuacai@kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
--cc=yangtiezhu@loongson.cn \
/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®