[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<TYZPR06MB6568CEAB1891D1AB158B96F3F1862@TYZPR06MB6568.apcprd06.prod.outlook.com>
Date: Tue, 13 Aug 2024 08:07:09 +0000
From: Jammy Huang <jammy_huang@...eedtech.com>
To: Krzysztof Kozlowski <krzk@...nel.org>, "eajames@...ux.ibm.com"
<eajames@...ux.ibm.com>, "mchehab@...nel.org" <mchehab@...nel.org>,
"joel@....id.au" <joel@....id.au>, "andrew@...id.au" <andrew@...id.au>,
"pmenzel@...gen.mpg.de" <pmenzel@...gen.mpg.de>
CC: "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
"openbmc@...ts.ozlabs.org" <openbmc@...ts.ozlabs.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "linux-aspeed@...ts.ozlabs.org"
<linux-aspeed@...ts.ozlabs.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v3] media: aspeed: Allow to capture from SoC display (GFX)
Hi Krzysztof,
Got it. Thanks for your help.
I will have another updated patch.
Regards,
Jammy Huang
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@...nel.org>
> Sent: Monday, August 12, 2024 8:18 PM
> To: Jammy Huang <jammy_huang@...eedtech.com>;
> eajames@...ux.ibm.com; mchehab@...nel.org; joel@....id.au;
> andrew@...id.au; pmenzel@...gen.mpg.de
> Cc: linux-media@...r.kernel.org; openbmc@...ts.ozlabs.org;
> linux-arm-kernel@...ts.infradead.org; linux-aspeed@...ts.ozlabs.org;
> linux-kernel@...r.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.
Powered by blists - more mailing lists