From: Daniel Stone <daniel@fooishbar.org>
To: Hyungwon Hwang <human.hwang@samsung.com>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
dh09.lee@samsung.com, Seung-Woo Kim <sw0312.kim@samsung.com>,
dri-devel <dri-devel@lists.freedesktop.org>,
cw00.choi@samsung.com
Subject: Re: [PATCH v2 4/6] drm/exynos: dsi: add support for Exynos5433 SoC
Date: Wed, 18 Mar 2015 09:52:33 +0000 [thread overview]
Message-ID: <CAPj87rPBZ7rG8BScFhp4tyKfOOJVCYoW8pgCMvHttT=NAbma9Q@mail.gmail.com> (raw)
In-Reply-To: <1426666591-16103-5-git-send-email-human.hwang@samsung.com>
Hi,
On 18 March 2015 at 08:16, Hyungwon Hwang <human.hwang@samsung.com> wrote:
> +#define REG(dsi, reg) ((dsi)->reg_base + dsi->driver_data->regs[(reg)])
This seems like a good change in general, but please split it up: it
makes bisection much easier if you have one patch which adds no
functionality and should have exactly the same behaviour, and then
another patch which introduces your changes.
> @@ -431,15 +579,11 @@ static unsigned long exynos_dsi_set_pll(struct exynos_dsi *dsi,
> u16 m;
> u32 reg;
>
> - clk_set_rate(dsi->pll_clk, dsi->pll_clk_rate);
> -
> - fin = clk_get_rate(dsi->pll_clk);
> - if (!fin) {
> - dev_err(dsi->dev, "failed to get PLL clock frequency\n");
> - return 0;
> - }
> -
> - dev_dbg(dsi->dev, "PLL input frequency: %lu\n", fin);
> + /*
> + * The input PLL clock for MIPI DSI in Exynos5433 seems to be fixed
> + * by OSC CLK.
> + */
> + fin = 24 * MHZ;
Er, is this always true on other platforms as well? Shouldn't this be
a part of the DeviceTree description?
> @@ -509,7 +656,7 @@ static int exynos_dsi_enable_clock(struct exynos_dsi *dsi)
> dev_dbg(dsi->dev, "hs_clk = %lu, byte_clk = %lu, esc_clk = %lu\n",
> hs_clk, byte_clk, esc_clk);
>
> - reg = readl(dsi->reg_base + DSIM_CLKCTRL_REG);
> + reg = readl(REG(dsi, DSIM_CLKCTRL_REG));
Instead of this readl(REG()) pattern you have everywhere, maybe it
would be easier to introduce a dsi_read_reg(dsi, reg_enum_value)
helper, and the same for write_reg.
> @@ -1720,18 +1873,16 @@ static int exynos_dsi_probe(struct platform_device *pdev)
> return -EPROBE_DEFER;
> }
>
> - dsi->pll_clk = devm_clk_get(dev, "pll_clk");
> - if (IS_ERR(dsi->pll_clk)) {
> - dev_info(dev, "failed to get dsi pll input clock\n");
> - ret = PTR_ERR(dsi->pll_clk);
> - goto err_del_component;
> - }
> -
> - dsi->bus_clk = devm_clk_get(dev, "bus_clk");
> - if (IS_ERR(dsi->bus_clk)) {
> - dev_info(dev, "failed to get dsi bus clock\n");
> - ret = PTR_ERR(dsi->bus_clk);
> - goto err_del_component;
> + dsi->clks = devm_kzalloc(dev,
> + sizeof(*dsi->clks) * dsi->driver_data->num_clks,
> + GFP_KERNEL);
> + for (i = 0; i < dsi->driver_data->num_clks; i++) {
> + dsi->clks[i] = devm_clk_get(dev, clk_names[i]);
> + if (IS_ERR(dsi->clks[i])) {
> + dev_info(dev, "failed to get dsi pll input clock\n");
This error message seems wrong; it should contain the name of the
actual failing clock.
Cheers,
Daniel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-03-18 9:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-18 8:16 [PATCH v2 0/6] Add drivers for Exynos5433 display Hyungwon Hwang
2015-03-18 8:16 ` [PATCH v2 1/6] drm/exynos: add Exynos5433 decon driver Hyungwon Hwang
2015-03-18 12:24 ` Daniel Stone
2015-03-26 2:14 ` Hyungwon Hwang
2015-03-18 8:16 ` [PATCH v2 2/6] of: add helper for getting endpoint node of specific identifiers Hyungwon Hwang
2015-03-18 8:16 ` [PATCH v2 3/6] drm/exynos: mic: add MIC driver Hyungwon Hwang
2015-03-24 5:51 ` Inki Dae
2015-03-26 2:27 ` Hyungwon Hwang
2015-03-26 2:41 ` Hyungwon Hwang
2015-03-18 8:16 ` [PATCH v2 4/6] drm/exynos: dsi: add support for Exynos5433 SoC Hyungwon Hwang
2015-03-18 9:52 ` Daniel Stone [this message]
2015-03-19 1:02 ` Hyungwon Hwang
2015-03-19 1:13 ` Daniel Stone
[not found] ` <CAPj87rPeUS9h=GCBR7ccNhugaGoyHw3x6oZ3Spq6P8uEg4ZcUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-19 1:18 ` Hyungwon Hwang
2015-03-19 9:32 ` Andrzej Hajda
2015-03-20 5:15 ` Hyungwon Hwang
2015-03-23 9:31 ` Andrzej Hajda
2015-03-23 13:42 ` Hyungwon Hwang
2015-03-26 10:33 ` Hyungwon Hwang
2015-03-18 8:16 ` [PATCH v2 5/6] drm/exynos: dsi: add support for MIC driver as a bridge Hyungwon Hwang
2015-03-18 8:16 ` [PATCH v2 6/6] drm/exynos: dsi: do not set TE GPIO direction by input Hyungwon Hwang
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='CAPj87rPBZ7rG8BScFhp4tyKfOOJVCYoW8pgCMvHttT=NAbma9Q@mail.gmail.com' \
--to=daniel@fooishbar.org \
--cc=cw00.choi@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=dh09.lee@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=human.hwang@samsung.com \
--cc=sw0312.kim@samsung.com \
/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;
as well as URLs for NNTP newsgroup(s).