All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Inki Dae <inki.dae@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>,
	linux-samsung-soc@vger.kernel.org,
	"devicetree-discuss@lists.ozlabs.org"
	<devicetree-discuss@lists.ozlabs.org>,
	DRI mailing list <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 3/3] drm/exynos: Add device tree support for fimc ipp driver
Date: Mon, 22 Apr 2013 17:57:06 +0200	[thread overview]
Message-ID: <51755DD2.6020604@samsung.com> (raw)
In-Reply-To: <CAAQKjZM_WmKHSrUgN9_PxoFt5BemTp113JEXzj1huu5B-V32=A@mail.gmail.com>

On 04/20/2013 06:21 PM, Inki Dae wrote:
>     +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"))
>     +               return -ENODEV;
> 
> 
> 
> Isn't the above property really needed? This makes the use of write-back
> feature to be forced. I think some machines might not need this feature so
> their dts files have no that property.
>  So in this case, drm fimc driver probing will be failed. is that correct
> action and your intention?

Sorry, I should have added a comment explaining why it is done like this.

"samsung,lcd-wb" is the hardware property, it should be in DT node of each
FIMC that has data path from LCD to its Writeback input. See [1] for full
binding description.
So for Exynos4, FIMC2, FIMC3 will be now bound to the DRM driver. And FIMC0,
FIMC1 will be bound to the V4L2 camera driver. There is complementary check
there:

if (of_property_read_bool(node, "samsung,lcd-wb"))
	return -ENODEV;

Ideally there should be just one core driver for FIMC IP block, which is
associated with the fimc DT nodes. And switching between DRM and V4L2
should be possible at run-time. I think Media Controller API could be
helpful in that (note it is not V4L2 specific at all).
But this is all not trivial, especially WRT power management.

Before we have that I assume we could stick with using the "samsung,lcd-wb"
property.

>     +       if (of_property_read_u32(node, "clock-frequency",
>     +                                       &ctx->clk_frequency))
>     +               ctx->clk_frequency = FIMC_DEFAULT_LCLK_FREQUENCY;
>     +
>     +       ctx->id = of_alias_get_id(node, "fimc");
>     +       if (ctx->id < 0)
>     +               return -EINVAL;
>     +
>     +       return 0;
>     +}


P.S. Html is frowned upon on the mailing lists, can please fix you mailer
to use plain text ?

[1]
http://git.linuxtv.org/media_tree.git/blob/master:/Documentation/devicetree/bindings/media/samsung-fimc.txt

      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
     [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 [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=51755DD2.6020604@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.