From: Jammy Huang <jammy_huang@aspeedtech.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
"eajames@linux.ibm.com" <eajames@linux.ibm.com>,
"mchehab@kernel.org" <mchehab@kernel.org>,
"joel@jms.id.au" <joel@jms.id.au>,
"andrew@aj.id.au" <andrew@aj.id.au>,
"pmenzel@molgen.mpg.de" <pmenzel@molgen.mpg.de>
Cc: "linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v3] media: aspeed: Allow to capture from SoC display (GFX)
Date: Tue, 13 Aug 2024 08:07:09 +0000 [thread overview]
Message-ID: <TYZPR06MB6568CEAB1891D1AB158B96F3F1862@TYZPR06MB6568.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <323f5038-f9d5-459a-a5e2-f1e4dbd4c386@kernel.org>
Hi Krzysztof,
Got it. Thanks for your help.
I will have another updated patch.
Regards,
Jammy Huang
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: Monday, August 12, 2024 8:18 PM
> To: Jammy Huang <jammy_huang@aspeedtech.com>;
> eajames@linux.ibm.com; mchehab@kernel.org; joel@jms.id.au;
> andrew@aj.id.au; pmenzel@molgen.mpg.de
> Cc: linux-media@vger.kernel.org; openbmc@lists.ozlabs.org;
> linux-arm-kernel@lists.infradead.org; linux-aspeed@lists.ozlabs.org;
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v3] media: aspeed: Allow to capture from SoC display (GFX)
>
> On 12/08/2024 11:16, Jammy Huang wrote:
> > ASPEED BMC IC has 2 different display engines. Please find AST2600's
> > datasheet to get detailed information.
> >
> > 1. VGA on PCIe
> > 2. SoC Display (GFX)
>
> ...
>
> >
> > +/*
> > + * Get regmap without checking res, such as clk/reset, that could
> > +lead to
> > + * conflict.
> > + */
> > +static struct regmap *aspeed_regmap_lookup(struct device_node *np,
> > +const char *property) {
> > + struct device_node *syscon_np;
> > + struct regmap *regmap;
>
> Drop...
>
> > +
> > + syscon_np = of_parse_phandle(np, property, 0);
>
> This joins first line and then use scoped/cleanup to make everything simpler.
>
> > + if (!syscon_np)
> > + return ERR_PTR(-ENODEV);
> > +
> > + regmap = device_node_to_regmap(syscon_np);
> > + of_node_put(syscon_np);
> > +
> > + return regmap;
> > +}
> > +
> > static int aspeed_video_init(struct aspeed_video *video) {
> > int irq;
> > int rc;
> > struct device *dev = video->dev;
> >
> > + video->scu = aspeed_regmap_lookup(dev->of_node, "aspeed,scu");
> > + video->gfx = aspeed_regmap_lookup(dev->of_node, "aspeed,gfx");
>
> This looks undocumented.
>
> You will need to convert the bindings to DT Schema first.
>
> Anyway, you miss here error checking.
>
> Best regards,
> Krzysztof
************* Email Confidentiality Notice ********************
免責聲明:
本信件(或其附件)可能包含機密資訊,並受法律保護。如 台端非指定之收件者,請以電子郵件通知本電子郵件之發送者, 並請立即刪除本電子郵件及其附件和銷毀所有複印件。謝謝您的合作!
DISCLAIMER:
This message (and any attachments) may contain legally privileged and/or other confidential information. If you have received it in error, please notify the sender by reply e-mail and immediately delete the e-mail and any attachments without copying or disclosing the contents. Thank you.
prev parent reply other threads:[~2024-08-13 8:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-12 9:16 Jammy Huang
2024-08-12 12:17 ` Krzysztof Kozlowski
2024-08-13 8:07 ` 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=TYZPR06MB6568CEAB1891D1AB158B96F3F1862@TYZPR06MB6568.apcprd06.prod.outlook.com \
--to=jammy_huang@aspeedtech.com \
--cc=andrew@aj.id.au \
--cc=eajames@linux.ibm.com \
--cc=joel@jms.id.au \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=pmenzel@molgen.mpg.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®