dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Eunchul Kim <chulspro.kim@samsung.com>
Cc: inki.dae@samsung.com, kyungmin.park@samsung.com,
	linux-samsung-soc@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org,
	dri-devel@lists.freedesktop.org, jaejoon.seo@samsung.com,
	jmock.shin@samsung.com, jy0.jeon@samsung.com,
	th908.kim@samsung.com, lsmin.lee@samsung.com
Subject: Re: [PATCH 3/3] drm/exynos: Add device tree support for fimc ipp driver
Date: Mon, 22 Apr 2013 17:57:13 +0200	[thread overview]
Message-ID: <51755DD9.4010004@samsung.com> (raw)
In-Reply-To: <51712CA5.4030206@samsung.com>

On 04/19/2013 01:38 PM, Eunchul Kim wrote:
>>   static void fimc_set_type_ctrl(struct fimc_context *ctx, enum fimc_wb wb)
>> @@ -1628,7 +1617,9 @@ static int fimc_ippdrv_start(struct device *dev, enum
>> drm_exynos_ipp_cmd cmd)
>>           fimc_handle_lastend(ctx, true);
>>
>>           /* setup FIMD */
>> -        fimc_set_camblk_fimd0_wb(ctx);
>> +        ret = fimc_set_camblk_fimd0_wb(ctx);
>> +        if (ret < 0)
> 
> - please adds error log information for indicating error.

OK, I'll add it.

>> +            return ret;
>>
>>           set_wb.enable = 1;
>>           set_wb.refresh = property->refresh_rate;
>> @@ -1784,26 +1775,50 @@ e_clk_free:
>>       return ret;
>>   }
>>
>> +static int fimc_parse_dt(struct fimc_context *ctx)
>> +{
>> +    struct device_node *node = ctx->dev->of_node;
>> +
>> +    if (!of_property_read_bool(node, "samsung,lcd-wb"))
> 
> - It also need error log ?

No, but it definitely deserves some comment why it is done like this.
Please see my other reply to Inki.

>> +        return -ENODEV;
>> +
>> +    if (of_property_read_u32(node, "clock-frequency",
>> +                    &ctx->clk_frequency))
>> +        ctx->clk_frequency = FIMC_DEFAULT_LCLK_FREQUENCY;
> 
> - We have many kind of H/W version of FIMC device. I think we need to use pdata
> instead of static value.

This is just a fallback value that will be used when "clock-frequency"
property is not found in fimc node in the device tree.

>> +    ctx->id = of_alias_get_id(node, "fimc");
>> +    if (ctx->id < 0)
>> +        return -EINVAL;
>> +
>> +    return 0;
>> +}
>> +
>>   static int fimc_probe(struct platform_device *pdev)
>>   {
>>       struct device *dev = &pdev->dev;
>>       struct fimc_context *ctx;
>>       struct resource *res;
>>       struct exynos_drm_ippdrv *ippdrv;
>> -    struct exynos_drm_fimc_pdata *pdata;
>> -    struct fimc_driverdata *ddata;
>>       int ret;
>>
>> -    pdata = pdev->dev.platform_data;
>> -    if (!pdata) {
>> -        dev_err(dev, "no platform data specified.\n");
>> -        return -EINVAL;
>> -    }
>> +    if (!dev->of_node)
> 
> - ditto.(error log)

Probably won't hurt, I'll add it.

>> +        return -ENODEV;
>>
>>       ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
>>       if (!ctx)
>>           return -ENOMEM;
>>
>> +    ctx->dev = dev;
>> +
>> +    ret = fimc_parse_dt(ctx);
>> +    if (ret < 0)
>> +        return ret;
>> +
>> +    ctx->sysreg = syscon_regmap_lookup_by_phandle(dev->of_node,
>> +                        "samsung,sysreg");
>> +    if (IS_ERR(ctx->sysreg))
> 
> - ditto.(error log)

OK. Will add here as well.

  reply	other threads:[~2013-04-22 15:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16 17:31 [PATCH 0/3] drm/exynos: Add device tree support for IPP driver Sylwester Nawrocki
2013-04-16 17:31 ` [PATCH 1/3] drm/exynos: Remove redundant devm_kfree() Sylwester Nawrocki
2013-04-16 17:31 ` [PATCH 2/3] drm/exynos: Rework fimc clocks handling Sylwester Nawrocki
2013-04-17  4:02   ` Sachin Kamat
2013-04-17  8:30     ` Sylwester Nawrocki
2013-04-16 17:31 ` [PATCH 3/3] drm/exynos: Add device tree support for fimc ipp driver Sylwester Nawrocki
2013-04-19 11:38   ` Eunchul Kim
2013-04-22 15:57     ` Sylwester Nawrocki [this message]
     [not found]   ` <1366133486-22973-4-git-send-email-s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-04-20 16:21     ` Inki Dae
2013-04-22 15:57       ` Sylwester Nawrocki

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=51755DD9.4010004@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=chulspro.kim@samsung.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=jaejoon.seo@samsung.com \
    --cc=jmock.shin@samsung.com \
    --cc=jy0.jeon@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=lsmin.lee@samsung.com \
    --cc=th908.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