[PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-10-03 Thread Leela Krishna Amudala
On Mon, Oct 1, 2012 at 9:50 PM, Stephen Warren  wrote:
> On 09/30/2012 11:29 PM, Leela Krishna Amudala wrote:
>> Hello Stephen Warren,
>>
>> The binding names that I use in my dts file should match with the
>> names given in 
>> http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
>> right?
>
> I don't think so; the binding in that link is for example:
>
>> + - xres, yres: Display resolution
>> + - left-margin, right-margin, hsync-len: Horizontal Display timing 
>> parameters
>> +   in pixels
>> +   upper-margin, lower-margin, vsync-len: Vertical display timing 
>> parameters in
>> +   lines
>> + - clock: displayclock in Hz
>
> i.e. a bunch of separate properties, one for each value needed to
> describe the display timing. However, your patch contains:
>

I mean to say that even I have to use separate properties for each one
instead of grouping them.
Also the names should match with the ones given in the example..?

 + - samsung,fimd-display: This property should specify the phandle of the
 +   display device node which holds the video interface timing with the
 +   below mentioned properties.
 +
 +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
 + horizontal timing includes four parameters in the following order.
 +
 + - horizontal back porch (in number of lcd clocks)
 + - horizontal front porch (in number of lcd clocks)
 + - hsync pulse width (in number of lcd clocks)
 + - Display panels X resolution.
>
> A single lcd-htiming property, which contains 4 values. (and a similar
> construct for the vertical timing).
>
> That seems entirely different to me...
> ___
> devicetree-discuss mailing list
> devicetree-discuss at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss


[PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-10-03 Thread Stephen Warren
On 10/02/2012 10:06 PM, Leela Krishna Amudala wrote:
> On Mon, Oct 1, 2012 at 9:50 PM, Stephen Warren  
> wrote:
>> On 09/30/2012 11:29 PM, Leela Krishna Amudala wrote:
>>> Hello Stephen Warren,
>>>
>>> The binding names that I use in my dts file should match with the
>>> names given in 
>>> http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
>>> right?
>>
>> I don't think so; the binding in that link is for example:
>>
>>> + - xres, yres: Display resolution
>>> + - left-margin, right-margin, hsync-len: Horizontal Display timing 
>>> parameters
>>> +   in pixels
>>> +   upper-margin, lower-margin, vsync-len: Vertical display timing 
>>> parameters in
>>> +   lines
>>> + - clock: displayclock in Hz
>>
>> i.e. a bunch of separate properties, one for each value needed to
>> describe the display timing. However, your patch contains:
> 
> I mean to say that even I have to use separate properties for each one
> instead of grouping them.
> Also the names should match with the ones given in the example..?

Yes. The patch I pointed to isn't supposed to be just an example, but
/the/ standard way of representing display timings.



Re: [PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-10-03 Thread Stephen Warren
On 10/02/2012 10:06 PM, Leela Krishna Amudala wrote:
 On Mon, Oct 1, 2012 at 9:50 PM, Stephen Warren swar...@wwwdotorg.org wrote:
 On 09/30/2012 11:29 PM, Leela Krishna Amudala wrote:
 Hello Stephen Warren,

 The binding names that I use in my dts file should match with the
 names given in 
 http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
 right?

 I don't think so; the binding in that link is for example:

 + - xres, yres: Display resolution
 + - left-margin, right-margin, hsync-len: Horizontal Display timing 
 parameters
 +   in pixels
 +   upper-margin, lower-margin, vsync-len: Vertical display timing 
 parameters in
 +   lines
 + - clock: displayclock in Hz

 i.e. a bunch of separate properties, one for each value needed to
 describe the display timing. However, your patch contains:
 
 I mean to say that even I have to use separate properties for each one
 instead of grouping them.
 Also the names should match with the ones given in the example..?

Yes. The patch I pointed to isn't supposed to be just an example, but
/the/ standard way of representing display timings.

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-10-02 Thread Leela Krishna Amudala
On Mon, Oct 1, 2012 at 9:50 PM, Stephen Warren swar...@wwwdotorg.org wrote:
 On 09/30/2012 11:29 PM, Leela Krishna Amudala wrote:
 Hello Stephen Warren,

 The binding names that I use in my dts file should match with the
 names given in 
 http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
 right?

 I don't think so; the binding in that link is for example:

 + - xres, yres: Display resolution
 + - left-margin, right-margin, hsync-len: Horizontal Display timing 
 parameters
 +   in pixels
 +   upper-margin, lower-margin, vsync-len: Vertical display timing 
 parameters in
 +   lines
 + - clock: displayclock in Hz

 i.e. a bunch of separate properties, one for each value needed to
 describe the display timing. However, your patch contains:


I mean to say that even I have to use separate properties for each one
instead of grouping them.
Also the names should match with the ones given in the example..?

 + - samsung,fimd-display: This property should specify the phandle of the
 +   display device node which holds the video interface timing with the
 +   below mentioned properties.
 +
 +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
 + horizontal timing includes four parameters in the following order.
 +
 + - horizontal back porch (in number of lcd clocks)
 + - horizontal front porch (in number of lcd clocks)
 + - hsync pulse width (in number of lcd clocks)
 + - Display panels X resolution.

 A single lcd-htiming property, which contains 4 values. (and a similar
 construct for the vertical timing).

 That seems entirely different to me...
 ___
 devicetree-discuss mailing list
 devicetree-disc...@lists.ozlabs.org
 https://lists.ozlabs.org/listinfo/devicetree-discuss
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-10-01 Thread Leela Krishna Amudala
Hello Stephen Warren,

The binding names that I use in my dts file should match with the
names given in 
http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
right?
I think that is the only thing I have to take care, and as I'm not
using "struct drm_display_mode"  in my driver its my wish whether to
use the helper function or not.
Please clarify me if I miss something.

Best Regards,
Leela Krishna Amudala.

On Fri, Sep 21, 2012 at 10:44 AM, Stephen Warren  
wrote:
> On 09/21/2012 05:22 AM, Leela Krishna Amudala wrote:
>> This patch adds device tree based discovery support for exynos DRM-FIMD
>> driver which includes driver modification to handle platform data in
>> both the cases with DT and non-DT, Also adds the documentation for bindings.
>
>> diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt 
>> b/Documentation/devicetree/bindings/drm/exynos/fimd.txt
> ...
>> + - samsung,fimd-display: This property should specify the phandle of the
>> +   display device node which holds the video interface timing with the
>> +   below mentioned properties.
>> +
>> +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
>> + horizontal timing includes four parameters in the following order.
>> +
>> + - horizontal back porch (in number of lcd clocks)
>> + - horizontal front porch (in number of lcd clocks)
>> + - hsync pulse width (in number of lcd clocks)
>> + - Display panels X resolution.
>> +
>> +   - lcd-vtiming: Specifies the vertical timing for the overlay. The
>> + vertical timing includes four parameters in the following order.
>> +
>> + - vertical back porch (in number of lcd lines)
>> + - vertical front porch (in number of lcd lines)
>> + - vsync pulse width (in number of lcd clocks)
>> + - Display panels Y resolution.
>
> Should this not use the new videomode timings that are under discussion at:
>
> http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-10-01 Thread Stephen Warren
On 09/30/2012 11:29 PM, Leela Krishna Amudala wrote:
> Hello Stephen Warren,
> 
> The binding names that I use in my dts file should match with the
> names given in 
> http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
> right?

I don't think so; the binding in that link is for example:

> + - xres, yres: Display resolution
> + - left-margin, right-margin, hsync-len: Horizontal Display timing parameters
> +   in pixels
> +   upper-margin, lower-margin, vsync-len: Vertical display timing parameters 
> in
> +   lines
> + - clock: displayclock in Hz

i.e. a bunch of separate properties, one for each value needed to
describe the display timing. However, your patch contains:

>>> + - samsung,fimd-display: This property should specify the phandle of the
>>> +   display device node which holds the video interface timing with the
>>> +   below mentioned properties.
>>> +
>>> +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
>>> + horizontal timing includes four parameters in the following order.
>>> +
>>> + - horizontal back porch (in number of lcd clocks)
>>> + - horizontal front porch (in number of lcd clocks)
>>> + - hsync pulse width (in number of lcd clocks)
>>> + - Display panels X resolution.

A single lcd-htiming property, which contains 4 values. (and a similar
construct for the vertical timing).

That seems entirely different to me...


Re: [PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-10-01 Thread Leela Krishna Amudala
Hello Stephen Warren,

The binding names that I use in my dts file should match with the
names given in 
http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
right?
I think that is the only thing I have to take care, and as I'm not
using struct drm_display_mode  in my driver its my wish whether to
use the helper function or not.
Please clarify me if I miss something.

Best Regards,
Leela Krishna Amudala.

On Fri, Sep 21, 2012 at 10:44 AM, Stephen Warren swar...@wwwdotorg.org wrote:
 On 09/21/2012 05:22 AM, Leela Krishna Amudala wrote:
 This patch adds device tree based discovery support for exynos DRM-FIMD
 driver which includes driver modification to handle platform data in
 both the cases with DT and non-DT, Also adds the documentation for bindings.

 diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt 
 b/Documentation/devicetree/bindings/drm/exynos/fimd.txt
 ...
 + - samsung,fimd-display: This property should specify the phandle of the
 +   display device node which holds the video interface timing with the
 +   below mentioned properties.
 +
 +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
 + horizontal timing includes four parameters in the following order.
 +
 + - horizontal back porch (in number of lcd clocks)
 + - horizontal front porch (in number of lcd clocks)
 + - hsync pulse width (in number of lcd clocks)
 + - Display panels X resolution.
 +
 +   - lcd-vtiming: Specifies the vertical timing for the overlay. The
 + vertical timing includes four parameters in the following order.
 +
 + - vertical back porch (in number of lcd lines)
 + - vertical front porch (in number of lcd lines)
 + - vsync pulse width (in number of lcd clocks)
 + - Display panels Y resolution.

 Should this not use the new videomode timings that are under discussion at:

 http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
 --
 To unsubscribe from this list: send the line unsubscribe linux-samsung-soc 
 in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-10-01 Thread Stephen Warren
On 09/30/2012 11:29 PM, Leela Krishna Amudala wrote:
 Hello Stephen Warren,
 
 The binding names that I use in my dts file should match with the
 names given in 
 http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
 right?

I don't think so; the binding in that link is for example:

 + - xres, yres: Display resolution
 + - left-margin, right-margin, hsync-len: Horizontal Display timing parameters
 +   in pixels
 +   upper-margin, lower-margin, vsync-len: Vertical display timing parameters 
 in
 +   lines
 + - clock: displayclock in Hz

i.e. a bunch of separate properties, one for each value needed to
describe the display timing. However, your patch contains:

 + - samsung,fimd-display: This property should specify the phandle of the
 +   display device node which holds the video interface timing with the
 +   below mentioned properties.
 +
 +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
 + horizontal timing includes four parameters in the following order.
 +
 + - horizontal back porch (in number of lcd clocks)
 + - horizontal front porch (in number of lcd clocks)
 + - hsync pulse width (in number of lcd clocks)
 + - Display panels X resolution.

A single lcd-htiming property, which contains 4 values. (and a similar
construct for the vertical timing).

That seems entirely different to me...
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-26 Thread Inki Dae
2012/9/26 Mark Brown :
> On Wed, Sep 26, 2012 at 12:03:44AM +0900, Inki Dae wrote:
>> 2012/9/25 Laurent Pinchart :
>
>> > Aren't DT bindings considered as an ABI, and required to be supported more 
>> > or
>> > less forever ? If you merge this DT binding you'll have to keep supporting 
>> > it.
>> > That's why DT bindings should not be rushed in.
>
>> is ABI required for DT binding?  I know DT binding parses just lcd
>> timing data from device tree file so ABI isn't needed. but when it
>> comes to DT, I'm novice yet so there may be my missing point. could
>> you tell me why DT bindings are considered as an ABI? if there is my
>> missing point, will consider it again.
>
> It's supposed to be possible to ship a DT with a board and then boot any
> OS or OS version on the board.  If the meaning of the DT keeps changing
> then this becomes impossible, you need to keep changing the DT when you
> change the thing that parses it (rendering the whole exercise pointless).
>

thank you for your comments. got it. DT is built as an binary(dtb) and
the dtb file should be re-used without any modifications. will keep
this patch until the videomode helper will be merged to mainline so
that this could be modified based on videomode helper later.

> ___
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


[PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-26 Thread Inki Dae
2012/9/25 Laurent Pinchart :
> On Monday 24 September 2012 21:35:46 Inki Dae wrote:
>> 2012/9/22 Stephen Warren :
>> > On 09/21/2012 01:22 AM, Inki Dae wrote:
>> >> 2012/9/21 Stephen Warren :
>> >>> On 09/21/2012 05:22 AM, Leela Krishna Amudala wrote:
>>  This patch adds device tree based discovery support for exynos DRM-FIMD
>>  driver which includes driver modification to handle platform data in
>>  both the cases with DT and non-DT, Also adds the documentation for
>>  bindings.
>> 
>>  diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt
>>  b/Documentation/devicetree/bindings/drm/exynos/fimd.txt>>>
>> >>> ...
>> >>>
>>  + - samsung,fimd-display: This property should specify the phandle of
>>  the
>>  +   display device node which holds the video interface timing with the
>>  +   below mentioned properties.
>>  +
>>  +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
>>  + horizontal timing includes four parameters in the following
>>  order.
>>  +
>>  + - horizontal back porch (in number of lcd clocks)
>>  + - horizontal front porch (in number of lcd clocks)
>>  + - hsync pulse width (in number of lcd clocks)
>>  + - Display panels X resolution.
>>  +
>>  +   - lcd-vtiming: Specifies the vertical timing for the overlay. The
>>  + vertical timing includes four parameters in the following order.
>>  +
>>  + - vertical back porch (in number of lcd lines)
>>  + - vertical front porch (in number of lcd lines)
>>  + - vsync pulse width (in number of lcd clocks)
>>  + - Display panels Y resolution.
>> >>>
>> >>> Should this not use the new videomode timings that are under discussion
>> >>> at:
>> >>>
>> >>> http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
>> >>
>> >> ok, I agree with you. then the videomode helper is going to be merged
>> >> to mainline(3.6)? if so, this patch should be reworked based on the
>> >> videomode helper.
>> >
>> > I think the videomode helpers would be merged for 3.7 at the very
>> > earliest; 3.6 is cooked already. Given there are still some comments on
>> > the binding, perhaps it won't happen until 3.8, but it'd be best to ask
>> > on that thread so that people more directly involved with the status can
>> > answer.
>>
>> as I mentioned before, it's better to use videomode helper instead but
>> for this, we should wait for that the videomode helper are merged to
>> mainline so I think it's better to merge it as is and then modify it
>> for videomode helper to be used later.
>
> Aren't DT bindings considered as an ABI, and required to be supported more or
> less forever ? If you merge this DT binding you'll have to keep supporting it.
> That's why DT bindings should not be rushed in.
>

is ABI required for DT binding?  I know DT binding parses just lcd
timing data from device tree file so ABI isn't needed. but when it
comes to DT, I'm novice yet so there may be my missing point. could
you tell me why DT bindings are considered as an ABI? if there is my
missing point, will consider it again.

Thanks,
Inki Dae

> --
> Regards,
>
> Laurent Pinchart
>
> ___
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-26 Thread Mark Brown
On Wed, Sep 26, 2012 at 12:03:44AM +0900, Inki Dae wrote:
 2012/9/25 Laurent Pinchart laurent.pinch...@ideasonboard.com:

  Aren't DT bindings considered as an ABI, and required to be supported more 
  or
  less forever ? If you merge this DT binding you'll have to keep supporting 
  it.
  That's why DT bindings should not be rushed in.

 is ABI required for DT binding?  I know DT binding parses just lcd
 timing data from device tree file so ABI isn't needed. but when it
 comes to DT, I'm novice yet so there may be my missing point. could
 you tell me why DT bindings are considered as an ABI? if there is my
 missing point, will consider it again.

It's supposed to be possible to ship a DT with a board and then boot any
OS or OS version on the board.  If the meaning of the DT keeps changing
then this becomes impossible, you need to keep changing the DT when you
change the thing that parses it (rendering the whole exercise pointless).
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-25 Thread Mark Brown
On Wed, Sep 26, 2012 at 12:03:44AM +0900, Inki Dae wrote:
> 2012/9/25 Laurent Pinchart :

> > Aren't DT bindings considered as an ABI, and required to be supported more 
> > or
> > less forever ? If you merge this DT binding you'll have to keep supporting 
> > it.
> > That's why DT bindings should not be rushed in.

> is ABI required for DT binding?  I know DT binding parses just lcd
> timing data from device tree file so ABI isn't needed. but when it
> comes to DT, I'm novice yet so there may be my missing point. could
> you tell me why DT bindings are considered as an ABI? if there is my
> missing point, will consider it again.

It's supposed to be possible to ship a DT with a board and then boot any
OS or OS version on the board.  If the meaning of the DT keeps changing
then this becomes impossible, you need to keep changing the DT when you
change the thing that parses it (rendering the whole exercise pointless).


[PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-25 Thread Laurent Pinchart
On Monday 24 September 2012 21:35:46 Inki Dae wrote:
> 2012/9/22 Stephen Warren :
> > On 09/21/2012 01:22 AM, Inki Dae wrote:
> >> 2012/9/21 Stephen Warren :
> >>> On 09/21/2012 05:22 AM, Leela Krishna Amudala wrote:
>  This patch adds device tree based discovery support for exynos DRM-FIMD
>  driver which includes driver modification to handle platform data in
>  both the cases with DT and non-DT, Also adds the documentation for
>  bindings.
>  
>  diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt
>  b/Documentation/devicetree/bindings/drm/exynos/fimd.txt>>> 
> >>> ...
> >>> 
>  + - samsung,fimd-display: This property should specify the phandle of
>  the
>  +   display device node which holds the video interface timing with the
>  +   below mentioned properties.
>  +
>  +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
>  + horizontal timing includes four parameters in the following
>  order.
>  +
>  + - horizontal back porch (in number of lcd clocks)
>  + - horizontal front porch (in number of lcd clocks)
>  + - hsync pulse width (in number of lcd clocks)
>  + - Display panels X resolution.
>  +
>  +   - lcd-vtiming: Specifies the vertical timing for the overlay. The
>  + vertical timing includes four parameters in the following order.
>  +
>  + - vertical back porch (in number of lcd lines)
>  + - vertical front porch (in number of lcd lines)
>  + - vsync pulse width (in number of lcd clocks)
>  + - Display panels Y resolution.
> >>> 
> >>> Should this not use the new videomode timings that are under discussion
> >>> at:
> >>> 
> >>> http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
> >> 
> >> ok, I agree with you. then the videomode helper is going to be merged
> >> to mainline(3.6)? if so, this patch should be reworked based on the
> >> videomode helper.
> > 
> > I think the videomode helpers would be merged for 3.7 at the very
> > earliest; 3.6 is cooked already. Given there are still some comments on
> > the binding, perhaps it won't happen until 3.8, but it'd be best to ask
> > on that thread so that people more directly involved with the status can
> > answer.
> 
> as I mentioned before, it's better to use videomode helper instead but
> for this, we should wait for that the videomode helper are merged to
> mainline so I think it's better to merge it as is and then modify it
> for videomode helper to be used later.

Aren't DT bindings considered as an ABI, and required to be supported more or 
less forever ? If you merge this DT binding you'll have to keep supporting it. 
That's why DT bindings should not be rushed in.

-- 
Regards,

Laurent Pinchart



Re: [PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-25 Thread Laurent Pinchart
On Monday 24 September 2012 21:35:46 Inki Dae wrote:
 2012/9/22 Stephen Warren swar...@wwwdotorg.org:
  On 09/21/2012 01:22 AM, Inki Dae wrote:
  2012/9/21 Stephen Warren swar...@wwwdotorg.org:
  On 09/21/2012 05:22 AM, Leela Krishna Amudala wrote:
  This patch adds device tree based discovery support for exynos DRM-FIMD
  driver which includes driver modification to handle platform data in
  both the cases with DT and non-DT, Also adds the documentation for
  bindings.
  
  diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt
  b/Documentation/devicetree/bindings/drm/exynos/fimd.txt 
  ...
  
  + - samsung,fimd-display: This property should specify the phandle of
  the
  +   display device node which holds the video interface timing with the
  +   below mentioned properties.
  +
  +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
  + horizontal timing includes four parameters in the following
  order.
  +
  + - horizontal back porch (in number of lcd clocks)
  + - horizontal front porch (in number of lcd clocks)
  + - hsync pulse width (in number of lcd clocks)
  + - Display panels X resolution.
  +
  +   - lcd-vtiming: Specifies the vertical timing for the overlay. The
  + vertical timing includes four parameters in the following order.
  +
  + - vertical back porch (in number of lcd lines)
  + - vertical front porch (in number of lcd lines)
  + - vsync pulse width (in number of lcd clocks)
  + - Display panels Y resolution.
  
  Should this not use the new videomode timings that are under discussion
  at:
  
  http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
  
  ok, I agree with you. then the videomode helper is going to be merged
  to mainline(3.6)? if so, this patch should be reworked based on the
  videomode helper.
  
  I think the videomode helpers would be merged for 3.7 at the very
  earliest; 3.6 is cooked already. Given there are still some comments on
  the binding, perhaps it won't happen until 3.8, but it'd be best to ask
  on that thread so that people more directly involved with the status can
  answer.
 
 as I mentioned before, it's better to use videomode helper instead but
 for this, we should wait for that the videomode helper are merged to
 mainline so I think it's better to merge it as is and then modify it
 for videomode helper to be used later.

Aren't DT bindings considered as an ABI, and required to be supported more or 
less forever ? If you merge this DT binding you'll have to keep supporting it. 
That's why DT bindings should not be rushed in.

-- 
Regards,

Laurent Pinchart

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-25 Thread Inki Dae
2012/9/25 Laurent Pinchart laurent.pinch...@ideasonboard.com:
 On Monday 24 September 2012 21:35:46 Inki Dae wrote:
 2012/9/22 Stephen Warren swar...@wwwdotorg.org:
  On 09/21/2012 01:22 AM, Inki Dae wrote:
  2012/9/21 Stephen Warren swar...@wwwdotorg.org:
  On 09/21/2012 05:22 AM, Leela Krishna Amudala wrote:
  This patch adds device tree based discovery support for exynos DRM-FIMD
  driver which includes driver modification to handle platform data in
  both the cases with DT and non-DT, Also adds the documentation for
  bindings.
 
  diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt
  b/Documentation/devicetree/bindings/drm/exynos/fimd.txt
  ...
 
  + - samsung,fimd-display: This property should specify the phandle of
  the
  +   display device node which holds the video interface timing with the
  +   below mentioned properties.
  +
  +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
  + horizontal timing includes four parameters in the following
  order.
  +
  + - horizontal back porch (in number of lcd clocks)
  + - horizontal front porch (in number of lcd clocks)
  + - hsync pulse width (in number of lcd clocks)
  + - Display panels X resolution.
  +
  +   - lcd-vtiming: Specifies the vertical timing for the overlay. The
  + vertical timing includes four parameters in the following order.
  +
  + - vertical back porch (in number of lcd lines)
  + - vertical front porch (in number of lcd lines)
  + - vsync pulse width (in number of lcd clocks)
  + - Display panels Y resolution.
 
  Should this not use the new videomode timings that are under discussion
  at:
 
  http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
 
  ok, I agree with you. then the videomode helper is going to be merged
  to mainline(3.6)? if so, this patch should be reworked based on the
  videomode helper.
 
  I think the videomode helpers would be merged for 3.7 at the very
  earliest; 3.6 is cooked already. Given there are still some comments on
  the binding, perhaps it won't happen until 3.8, but it'd be best to ask
  on that thread so that people more directly involved with the status can
  answer.

 as I mentioned before, it's better to use videomode helper instead but
 for this, we should wait for that the videomode helper are merged to
 mainline so I think it's better to merge it as is and then modify it
 for videomode helper to be used later.

 Aren't DT bindings considered as an ABI, and required to be supported more or
 less forever ? If you merge this DT binding you'll have to keep supporting it.
 That's why DT bindings should not be rushed in.


is ABI required for DT binding?  I know DT binding parses just lcd
timing data from device tree file so ABI isn't needed. but when it
comes to DT, I'm novice yet so there may be my missing point. could
you tell me why DT bindings are considered as an ABI? if there is my
missing point, will consider it again.

Thanks,
Inki Dae

 --
 Regards,

 Laurent Pinchart

 ___
 dri-devel mailing list
 dri-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/dri-devel
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-25 Thread Inki Dae
2012/9/26 Mark Brown broo...@opensource.wolfsonmicro.com:
 On Wed, Sep 26, 2012 at 12:03:44AM +0900, Inki Dae wrote:
 2012/9/25 Laurent Pinchart laurent.pinch...@ideasonboard.com:

  Aren't DT bindings considered as an ABI, and required to be supported more 
  or
  less forever ? If you merge this DT binding you'll have to keep supporting 
  it.
  That's why DT bindings should not be rushed in.

 is ABI required for DT binding?  I know DT binding parses just lcd
 timing data from device tree file so ABI isn't needed. but when it
 comes to DT, I'm novice yet so there may be my missing point. could
 you tell me why DT bindings are considered as an ABI? if there is my
 missing point, will consider it again.

 It's supposed to be possible to ship a DT with a board and then boot any
 OS or OS version on the board.  If the meaning of the DT keeps changing
 then this becomes impossible, you need to keep changing the DT when you
 change the thing that parses it (rendering the whole exercise pointless).


thank you for your comments. got it. DT is built as an binary(dtb) and
the dtb file should be re-used without any modifications. will keep
this patch until the videomode helper will be merged to mainline so
that this could be modified based on videomode helper later.

 ___
 linux-arm-kernel mailing list
 linux-arm-ker...@lists.infradead.org
 http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-24 Thread Inki Dae
2012/9/22 Stephen Warren :
> On 09/21/2012 01:22 AM, Inki Dae wrote:
>> 2012/9/21 Stephen Warren :
>>> On 09/21/2012 05:22 AM, Leela Krishna Amudala wrote:
 This patch adds device tree based discovery support for exynos DRM-FIMD
 driver which includes driver modification to handle platform data in
 both the cases with DT and non-DT, Also adds the documentation for 
 bindings.
>>>
 diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt 
 b/Documentation/devicetree/bindings/drm/exynos/fimd.txt
>>> ...
 + - samsung,fimd-display: This property should specify the phandle of the
 +   display device node which holds the video interface timing with the
 +   below mentioned properties.
 +
 +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
 + horizontal timing includes four parameters in the following order.
 +
 + - horizontal back porch (in number of lcd clocks)
 + - horizontal front porch (in number of lcd clocks)
 + - hsync pulse width (in number of lcd clocks)
 + - Display panels X resolution.
 +
 +   - lcd-vtiming: Specifies the vertical timing for the overlay. The
 + vertical timing includes four parameters in the following order.
 +
 + - vertical back porch (in number of lcd lines)
 + - vertical front porch (in number of lcd lines)
 + - vsync pulse width (in number of lcd clocks)
 + - Display panels Y resolution.
>>>
>>> Should this not use the new videomode timings that are under discussion at:
>>>
>>> http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
>>>
>>
>> ok, I agree with you. then the videomode helper is going to be merged
>> to mainline(3.6)? if so, this patch should be reworked based on the
>> videomode helper.
>
> I think the videomode helpers would be merged for 3.7 at the very
> earliest; 3.6 is cooked already. Given there are still some comments on
> the binding, perhaps it won't happen until 3.8, but it'd be best to ask
> on that thread so that people more directly involved with the status can
> answer.
>

as I mentioned before, it's better to use videomode helper instead but
for this, we should wait for that the videomode helper are merged to
mainline so I think it's better to merge it as is and then modify it
for videomode helper to be used later.

Thanks,
Inki Dae

> ___
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


Re: [PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-24 Thread Inki Dae
2012/9/22 Stephen Warren swar...@wwwdotorg.org:
 On 09/21/2012 01:22 AM, Inki Dae wrote:
 2012/9/21 Stephen Warren swar...@wwwdotorg.org:
 On 09/21/2012 05:22 AM, Leela Krishna Amudala wrote:
 This patch adds device tree based discovery support for exynos DRM-FIMD
 driver which includes driver modification to handle platform data in
 both the cases with DT and non-DT, Also adds the documentation for 
 bindings.

 diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt 
 b/Documentation/devicetree/bindings/drm/exynos/fimd.txt
 ...
 + - samsung,fimd-display: This property should specify the phandle of the
 +   display device node which holds the video interface timing with the
 +   below mentioned properties.
 +
 +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
 + horizontal timing includes four parameters in the following order.
 +
 + - horizontal back porch (in number of lcd clocks)
 + - horizontal front porch (in number of lcd clocks)
 + - hsync pulse width (in number of lcd clocks)
 + - Display panels X resolution.
 +
 +   - lcd-vtiming: Specifies the vertical timing for the overlay. The
 + vertical timing includes four parameters in the following order.
 +
 + - vertical back porch (in number of lcd lines)
 + - vertical front porch (in number of lcd lines)
 + - vsync pulse width (in number of lcd clocks)
 + - Display panels Y resolution.

 Should this not use the new videomode timings that are under discussion at:

 http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html


 ok, I agree with you. then the videomode helper is going to be merged
 to mainline(3.6)? if so, this patch should be reworked based on the
 videomode helper.

 I think the videomode helpers would be merged for 3.7 at the very
 earliest; 3.6 is cooked already. Given there are still some comments on
 the binding, perhaps it won't happen until 3.8, but it'd be best to ask
 on that thread so that people more directly involved with the status can
 answer.


as I mentioned before, it's better to use videomode helper instead but
for this, we should wait for that the videomode helper are merged to
mainline so I think it's better to merge it as is and then modify it
for videomode helper to be used later.

Thanks,
Inki Dae

 ___
 linux-arm-kernel mailing list
 linux-arm-ker...@lists.infradead.org
 http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-21 Thread Leela Krishna Amudala
This patch adds device tree based discovery support for exynos DRM-FIMD
driver which includes driver modification to handle platform data in
both the cases with DT and non-DT, Also adds the documentation for bindings.

Signed-off-by: Leela Krishna Amudala 
---
 .../devicetree/bindings/drm/exynos/fimd.txt|   80 
 drivers/gpu/drm/exynos/exynos_drm_fimd.c   |   95 +++-
 2 files changed, 173 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/drm/exynos/fimd.txt

diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt 
b/Documentation/devicetree/bindings/drm/exynos/fimd.txt
new file mode 100644
index 000..e94120c
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/exynos/fimd.txt
@@ -0,0 +1,80 @@
+* Samsung Display Controller using DRM frame work
+
+The display controller is used to transfer image data from memory to an
+external LCD driver interface. It supports various color formats such as
+rgb and yuv.
+
+Required properties:
+ - compatible: Should be "samsung,exynos5-fimd" or "samsung,exynos4-fimd" for
+   fimd using DRM frame work.
+ - reg: physical base address of the controller and length of memory
+   mapped region.
+ - interrupts: Three interrupts should be specified. The interrupts should be
+   specified in the following order.
+   - VSYNC interrupt
+   - FIFO level interrupt
+   - FIMD System Interrupt
+
+ - samsung,fimd-display: This property should specify the phandle of the
+   display device node which holds the video interface timing with the
+   below mentioned properties.
+
+   - lcd-htiming: Specifies the horizontal timing for the overlay. The
+ horizontal timing includes four parameters in the following order.
+
+ - horizontal back porch (in number of lcd clocks)
+ - horizontal front porch (in number of lcd clocks)
+ - hsync pulse width (in number of lcd clocks)
+ - Display panels X resolution.
+
+   - lcd-vtiming: Specifies the vertical timing for the overlay. The
+ vertical timing includes four parameters in the following order.
+
+ - vertical back porch (in number of lcd lines)
+ - vertical front porch (in number of lcd lines)
+ - vsync pulse width (in number of lcd clocks)
+ - Display panels Y resolution.
+
+
+ - samsung,default-window: Specifies the default window number of the fimd 
controller.
+
+ - samsung,fimd-win-bpp: Specifies the bits per pixel.
+
+Optional properties:
+ - samsung,fimd-vidout-rgb: Video output format is RGB.
+ - samsung,fimd-inv-vclk: invert video clock polarity.
+ - samsung,fimd-frame-rate: Number of video frames per second.
+
+Example:
+
+   The following is an example for the fimd controller is split into
+   two portions. The SoC specific portion can be specified in the SoC
+   specific dts file. The board specific portion can be specified in the
+   board specific dts file.
+
+   - SoC Specific portion
+
+   fimd {
+   compatible = "samsung,exynos5-fimd";
+   interrupt-parent = <>;
+   reg = <0x1440 0x4>;
+   interrupts = <18 5>, <18 4>, <18 6>;
+   };
+
+   - Board Specific portion
+
+   lcd_fimd0: lcd_panel0 {
+   lcd-htiming = <4 4 4 480>;
+   lcd-vtiming = <4 4 4 320>;
+   supports-mipi-panel;
+   };
+
+   fimd {
+   samsung,fimd-display = <_fimd0>;
+   samsung,fimd-vidout-rgb;
+   samsung,fimd-inv-vclk;
+   samsung,fimd-frame-rate = <60>;
+   samsung,default-window = <0>;
+   samsung,fimd-win-bpp = <32>;
+   };
+
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c 
b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 1ad10b6..b2d22ac 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 

 #include 
 #include 
@@ -103,9 +104,18 @@ struct fimd_context {
struct exynos_drm_panel_info *panel;
 };

+static const struct of_device_id fimd_dt_match[];
+
 static inline struct fimd_driver_data *drm_fimd_get_driver_data(
struct platform_device *pdev)
 {
+#ifdef CONFIG_OF
+   if (pdev->dev.of_node) {
+   const struct of_device_id *match;
+   match = of_match_ptr(fimd_dt_match);
+   return (struct fimd_driver_data *)match->data;
+   }
+#endif
return (struct fimd_driver_data *)
platform_get_device_id(pdev)->driver_data;
 }
@@ -809,12 +819,77 @@ static int fimd_power_on(struct fimd_context *ctx, bool 
enable)
return 0;
 }

+#ifdef CONFIG_OF
+static struct exynos_drm_fimd_pdata *drm_fimd_dt_parse_pdata(struct device 
*dev)
+{
+   struct device_node *np = dev->of_node;
+   struct device_node *disp_np;
+   struct exynos_drm_fimd_pdata *pd;
+   u32 data[4];
+
+   pd = 

[PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-21 Thread Inki Dae
2012/9/21 Stephen Warren :
> On 09/21/2012 05:22 AM, Leela Krishna Amudala wrote:
>> This patch adds device tree based discovery support for exynos DRM-FIMD
>> driver which includes driver modification to handle platform data in
>> both the cases with DT and non-DT, Also adds the documentation for bindings.
>
>> diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt 
>> b/Documentation/devicetree/bindings/drm/exynos/fimd.txt
> ...
>> + - samsung,fimd-display: This property should specify the phandle of the
>> +   display device node which holds the video interface timing with the
>> +   below mentioned properties.
>> +
>> +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
>> + horizontal timing includes four parameters in the following order.
>> +
>> + - horizontal back porch (in number of lcd clocks)
>> + - horizontal front porch (in number of lcd clocks)
>> + - hsync pulse width (in number of lcd clocks)
>> + - Display panels X resolution.
>> +
>> +   - lcd-vtiming: Specifies the vertical timing for the overlay. The
>> + vertical timing includes four parameters in the following order.
>> +
>> + - vertical back porch (in number of lcd lines)
>> + - vertical front porch (in number of lcd lines)
>> + - vsync pulse width (in number of lcd clocks)
>> + - Display panels Y resolution.
>
> Should this not use the new videomode timings that are under discussion at:
>
> http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
>

ok, I agree with you. then the videomode helper is going to be merged
to mainline(3.6)? if so, this patch should be reworked based on the
videomode helper.


> ___
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


[PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-21 Thread Stephen Warren
On 09/21/2012 01:22 AM, Inki Dae wrote:
> 2012/9/21 Stephen Warren :
>> On 09/21/2012 05:22 AM, Leela Krishna Amudala wrote:
>>> This patch adds device tree based discovery support for exynos DRM-FIMD
>>> driver which includes driver modification to handle platform data in
>>> both the cases with DT and non-DT, Also adds the documentation for bindings.
>>
>>> diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt 
>>> b/Documentation/devicetree/bindings/drm/exynos/fimd.txt
>> ...
>>> + - samsung,fimd-display: This property should specify the phandle of the
>>> +   display device node which holds the video interface timing with the
>>> +   below mentioned properties.
>>> +
>>> +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
>>> + horizontal timing includes four parameters in the following order.
>>> +
>>> + - horizontal back porch (in number of lcd clocks)
>>> + - horizontal front porch (in number of lcd clocks)
>>> + - hsync pulse width (in number of lcd clocks)
>>> + - Display panels X resolution.
>>> +
>>> +   - lcd-vtiming: Specifies the vertical timing for the overlay. The
>>> + vertical timing includes four parameters in the following order.
>>> +
>>> + - vertical back porch (in number of lcd lines)
>>> + - vertical front porch (in number of lcd lines)
>>> + - vsync pulse width (in number of lcd clocks)
>>> + - Display panels Y resolution.
>>
>> Should this not use the new videomode timings that are under discussion at:
>>
>> http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
>>
> 
> ok, I agree with you. then the videomode helper is going to be merged
> to mainline(3.6)? if so, this patch should be reworked based on the
> videomode helper.

I think the videomode helpers would be merged for 3.7 at the very
earliest; 3.6 is cooked already. Given there are still some comments on
the binding, perhaps it won't happen until 3.8, but it'd be best to ask
on that thread so that people more directly involved with the status can
answer.


[PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-21 Thread Stephen Warren
On 09/21/2012 05:22 AM, Leela Krishna Amudala wrote:
> This patch adds device tree based discovery support for exynos DRM-FIMD
> driver which includes driver modification to handle platform data in
> both the cases with DT and non-DT, Also adds the documentation for bindings.

> diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt 
> b/Documentation/devicetree/bindings/drm/exynos/fimd.txt
...
> + - samsung,fimd-display: This property should specify the phandle of the
> +   display device node which holds the video interface timing with the
> +   below mentioned properties.
> +
> +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
> + horizontal timing includes four parameters in the following order.
> +
> + - horizontal back porch (in number of lcd clocks)
> + - horizontal front porch (in number of lcd clocks)
> + - hsync pulse width (in number of lcd clocks)
> + - Display panels X resolution.
> +
> +   - lcd-vtiming: Specifies the vertical timing for the overlay. The
> + vertical timing includes four parameters in the following order.
> +
> + - vertical back porch (in number of lcd lines)
> + - vertical front porch (in number of lcd lines)
> + - vsync pulse width (in number of lcd clocks)
> + - Display panels Y resolution.

Should this not use the new videomode timings that are under discussion at:

http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html


Re: [PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-21 Thread Inki Dae
2012/9/21 Stephen Warren swar...@wwwdotorg.org:
 On 09/21/2012 05:22 AM, Leela Krishna Amudala wrote:
 This patch adds device tree based discovery support for exynos DRM-FIMD
 driver which includes driver modification to handle platform data in
 both the cases with DT and non-DT, Also adds the documentation for bindings.

 diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt 
 b/Documentation/devicetree/bindings/drm/exynos/fimd.txt
 ...
 + - samsung,fimd-display: This property should specify the phandle of the
 +   display device node which holds the video interface timing with the
 +   below mentioned properties.
 +
 +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
 + horizontal timing includes four parameters in the following order.
 +
 + - horizontal back porch (in number of lcd clocks)
 + - horizontal front porch (in number of lcd clocks)
 + - hsync pulse width (in number of lcd clocks)
 + - Display panels X resolution.
 +
 +   - lcd-vtiming: Specifies the vertical timing for the overlay. The
 + vertical timing includes four parameters in the following order.
 +
 + - vertical back porch (in number of lcd lines)
 + - vertical front porch (in number of lcd lines)
 + - vsync pulse width (in number of lcd clocks)
 + - Display panels Y resolution.

 Should this not use the new videomode timings that are under discussion at:

 http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html


ok, I agree with you. then the videomode helper is going to be merged
to mainline(3.6)? if so, this patch should be reworked based on the
videomode helper.


 ___
 linux-arm-kernel mailing list
 linux-arm-ker...@lists.infradead.org
 http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-21 Thread Leela Krishna Amudala
This patch adds device tree based discovery support for exynos DRM-FIMD
driver which includes driver modification to handle platform data in
both the cases with DT and non-DT, Also adds the documentation for bindings.

Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com
---
 .../devicetree/bindings/drm/exynos/fimd.txt|   80 
 drivers/gpu/drm/exynos/exynos_drm_fimd.c   |   95 +++-
 2 files changed, 173 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/drm/exynos/fimd.txt

diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt 
b/Documentation/devicetree/bindings/drm/exynos/fimd.txt
new file mode 100644
index 000..e94120c
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/exynos/fimd.txt
@@ -0,0 +1,80 @@
+* Samsung Display Controller using DRM frame work
+
+The display controller is used to transfer image data from memory to an
+external LCD driver interface. It supports various color formats such as
+rgb and yuv.
+
+Required properties:
+ - compatible: Should be samsung,exynos5-fimd or samsung,exynos4-fimd for
+   fimd using DRM frame work.
+ - reg: physical base address of the controller and length of memory
+   mapped region.
+ - interrupts: Three interrupts should be specified. The interrupts should be
+   specified in the following order.
+   - VSYNC interrupt
+   - FIFO level interrupt
+   - FIMD System Interrupt
+
+ - samsung,fimd-display: This property should specify the phandle of the
+   display device node which holds the video interface timing with the
+   below mentioned properties.
+
+   - lcd-htiming: Specifies the horizontal timing for the overlay. The
+ horizontal timing includes four parameters in the following order.
+
+ - horizontal back porch (in number of lcd clocks)
+ - horizontal front porch (in number of lcd clocks)
+ - hsync pulse width (in number of lcd clocks)
+ - Display panels X resolution.
+
+   - lcd-vtiming: Specifies the vertical timing for the overlay. The
+ vertical timing includes four parameters in the following order.
+
+ - vertical back porch (in number of lcd lines)
+ - vertical front porch (in number of lcd lines)
+ - vsync pulse width (in number of lcd clocks)
+ - Display panels Y resolution.
+
+
+ - samsung,default-window: Specifies the default window number of the fimd 
controller.
+
+ - samsung,fimd-win-bpp: Specifies the bits per pixel.
+
+Optional properties:
+ - samsung,fimd-vidout-rgb: Video output format is RGB.
+ - samsung,fimd-inv-vclk: invert video clock polarity.
+ - samsung,fimd-frame-rate: Number of video frames per second.
+
+Example:
+
+   The following is an example for the fimd controller is split into
+   two portions. The SoC specific portion can be specified in the SoC
+   specific dts file. The board specific portion can be specified in the
+   board specific dts file.
+
+   - SoC Specific portion
+
+   fimd {
+   compatible = samsung,exynos5-fimd;
+   interrupt-parent = combiner;
+   reg = 0x1440 0x4;
+   interrupts = 18 5, 18 4, 18 6;
+   };
+
+   - Board Specific portion
+
+   lcd_fimd0: lcd_panel0 {
+   lcd-htiming = 4 4 4 480;
+   lcd-vtiming = 4 4 4 320;
+   supports-mipi-panel;
+   };
+
+   fimd {
+   samsung,fimd-display = lcd_fimd0;
+   samsung,fimd-vidout-rgb;
+   samsung,fimd-inv-vclk;
+   samsung,fimd-frame-rate = 60;
+   samsung,default-window = 0;
+   samsung,fimd-win-bpp = 32;
+   };
+
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c 
b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 1ad10b6..b2d22ac 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -18,6 +18,7 @@
 #include linux/platform_device.h
 #include linux/clk.h
 #include linux/pm_runtime.h
+#include linux/of.h
 
 #include video/samsung_fimd.h
 #include drm/exynos_drm.h
@@ -103,9 +104,18 @@ struct fimd_context {
struct exynos_drm_panel_info *panel;
 };
 
+static const struct of_device_id fimd_dt_match[];
+
 static inline struct fimd_driver_data *drm_fimd_get_driver_data(
struct platform_device *pdev)
 {
+#ifdef CONFIG_OF
+   if (pdev-dev.of_node) {
+   const struct of_device_id *match;
+   match = of_match_ptr(fimd_dt_match);
+   return (struct fimd_driver_data *)match-data;
+   }
+#endif
return (struct fimd_driver_data *)
platform_get_device_id(pdev)-driver_data;
 }
@@ -809,12 +819,77 @@ static int fimd_power_on(struct fimd_context *ctx, bool 
enable)
return 0;
 }
 
+#ifdef CONFIG_OF
+static struct exynos_drm_fimd_pdata *drm_fimd_dt_parse_pdata(struct device 
*dev)
+{
+   struct device_node *np = dev-of_node;
+   struct device_node 

Re: [PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-21 Thread Stephen Warren
On 09/21/2012 05:22 AM, Leela Krishna Amudala wrote:
 This patch adds device tree based discovery support for exynos DRM-FIMD
 driver which includes driver modification to handle platform data in
 both the cases with DT and non-DT, Also adds the documentation for bindings.

 diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt 
 b/Documentation/devicetree/bindings/drm/exynos/fimd.txt
...
 + - samsung,fimd-display: This property should specify the phandle of the
 +   display device node which holds the video interface timing with the
 +   below mentioned properties.
 +
 +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
 + horizontal timing includes four parameters in the following order.
 +
 + - horizontal back porch (in number of lcd clocks)
 + - horizontal front porch (in number of lcd clocks)
 + - hsync pulse width (in number of lcd clocks)
 + - Display panels X resolution.
 +
 +   - lcd-vtiming: Specifies the vertical timing for the overlay. The
 + vertical timing includes four parameters in the following order.
 +
 + - vertical back porch (in number of lcd lines)
 + - vertical front porch (in number of lcd lines)
 + - vsync pulse width (in number of lcd clocks)
 + - Display panels Y resolution.

Should this not use the new videomode timings that are under discussion at:

http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH V6 2/2] video: drm: exynos: Add device tree support

2012-09-21 Thread Stephen Warren
On 09/21/2012 01:22 AM, Inki Dae wrote:
 2012/9/21 Stephen Warren swar...@wwwdotorg.org:
 On 09/21/2012 05:22 AM, Leela Krishna Amudala wrote:
 This patch adds device tree based discovery support for exynos DRM-FIMD
 driver which includes driver modification to handle platform data in
 both the cases with DT and non-DT, Also adds the documentation for bindings.

 diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt 
 b/Documentation/devicetree/bindings/drm/exynos/fimd.txt
 ...
 + - samsung,fimd-display: This property should specify the phandle of the
 +   display device node which holds the video interface timing with the
 +   below mentioned properties.
 +
 +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
 + horizontal timing includes four parameters in the following order.
 +
 + - horizontal back porch (in number of lcd clocks)
 + - horizontal front porch (in number of lcd clocks)
 + - hsync pulse width (in number of lcd clocks)
 + - Display panels X resolution.
 +
 +   - lcd-vtiming: Specifies the vertical timing for the overlay. The
 + vertical timing includes four parameters in the following order.
 +
 + - vertical back porch (in number of lcd lines)
 + - vertical front porch (in number of lcd lines)
 + - vsync pulse width (in number of lcd clocks)
 + - Display panels Y resolution.

 Should this not use the new videomode timings that are under discussion at:

 http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html

 
 ok, I agree with you. then the videomode helper is going to be merged
 to mainline(3.6)? if so, this patch should be reworked based on the
 videomode helper.

I think the videomode helpers would be merged for 3.7 at the very
earliest; 3.6 is cooked already. Given there are still some comments on
the binding, perhaps it won't happen until 3.8, but it'd be best to ask
on that thread so that people more directly involved with the status can
answer.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel