public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Piotr Wilczek <p.wilczek@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 03/12] video:exynos_fb:fdt: add additional fdt data
Date: Fri, 28 Feb 2014 09:54:05 +0100	[thread overview]
Message-ID: <53104EAD.7040006@samsung.com> (raw)
In-Reply-To: <CAEC9eQOLNBvWGXGGvsPugHnm6--LubHdsVLPA+++5-wO9J_Ldg@mail.gmail.com>

Hi Ajay,

Thank you for review. Please see answers below.

On 02/27/2014 03:10 PM, Ajay kumar wrote:
> Piotr,
>
> Adding more comments.
>
> On Thu, Feb 27, 2014 at 10:50 PM, Ajay kumar <ajaynumb@gmail.com> wrote:
>
>> Hi Piotr,
>> Find my comments inline.
>>
>>
>> On Tue, Feb 25, 2014 at 11:33 PM, Piotr Wilczek <p.wilczek@samsung.com>wrote:
>>
>>> This patch adds additional data parsing from DTB and adds the new
>>> exynos_lcd_panel_init() function for panel specific initialisation
>>> from the board file.
>>>
>>> Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
>>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>>> Cc: Minkyu Kang <mk7.kang@samsung.com>
>>> ---
>>> Changes for v3:
>>>   - none
>>>
>>> Changes for v2:
>>>   - removed duplicate DTB node parsing for panel_info.logo_on
>>>   - added (weak) exynos_lcd_panel_init function for panel specific
>>>          initialisation from board file
>>>
>>>   drivers/video/exynos_fb.c | 21 +++++++++++++++++++++
>>>   1 file changed, 21 insertions(+)
>>>
>>> diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
>>> index 00a0a11..88d9037 100644
>>> --- a/drivers/video/exynos_fb.c
>>> +++ b/drivers/video/exynos_fb.c
>>> @@ -104,6 +104,13 @@ void __exynos_backlight_reset(void)
>>>   void exynos_backlight_reset(void)
>>>          __attribute__((weak, alias("__exynos_backlight_reset")));
>>>
>>> +int __exynos_lcd_panel_init(vidinfo_t *vid)
>>> +{
>>> +       return 0;
>>> +}
>>> +int exynos_lcd_panel_init(vidinfo_t *vid)
>>> +       __attribute__((weak, alias("__exynos_lcd_panel_init")));
>>> +
>>>
>> This is redundant! We already have exynos_cfg_lcd_gpio, exynos_lcd_power_on
>> and other similar functions to support "panel init".
The 'init_panel_info' is used to init lcd panel from he board file. It 
is called when CONFIG_OF_CONTROL is not defined. When CONFIG_OF_CONTROL 
is defined then we init panel from DTB data in exynos_fimd_parse_dt 
function.

However, it may be necessary to do some additional initializations that 
are optional and board specific. That?s what 'exynos_lcd_panel_init' 
function is for.

>> Please check board/samsung/smdk5250.c
smdk5250.c is compiled when CONFIG_OF_CONTROL is not defined.
With CONFIG_OF_CONTROL enabled, the exynos5-dt.c is used but it does not 
implement 'init_panel_info' so I would get undefined reference to 
'init_panel_info'. Tahts another reason that I introduced the above 
function.

>>
>>>   static void lcd_panel_on(vidinfo_t *vid)
>>>   {
>>>          udelay(vid->init_delay);
>>> @@ -269,6 +276,15 @@ int exynos_fimd_parse_dt(const void *blob)
>>>          panel_info.dual_lcd_enabled = fdtdec_get_int(blob, node,
>>>
>>> "samsung,dual-lcd-enabled", 0);
>>>
>>> +       panel_info.resolution = fdtdec_get_int(blob, node,
>>> +                                               "samsung,resolution", 0);
>>> +
>>> +       panel_info.rgb_mode = fdtdec_get_int(blob, node,
>>> +                                               "samsung,rgb-mode", 0);
>>> +
>>> +       panel_info.power_on_delay = fdtdec_get_int(blob, node,
>>> +                                               "samsung,power-on-delay",
>>> 0);
>>> +
>>>
>> All the above DT properties are already present in the same file!
>> This are definitely duplicate entries.
Right, rgb_mode and power_on_delay I was supposed to remove in the 
previous version but overlooked that, thanks.

>> For passing resolution, please use "samsung,vl-col" and "samsung,vl-row"
Previously HD_RESOLUTION was assigned to panel_info.resolution. It is 
defined as 0 in libtizen.h.

>>
>>>          return 0;
>>>   }
>>>   #endif
>>> @@ -281,10 +297,15 @@ void lcd_ctrl_init(void *lcdbase)
>>>   #ifdef CONFIG_OF_CONTROL
>>>          if (exynos_fimd_parse_dt(gd->fdt_blob))
>>>                  debug("Can't get proper panel info\n");
>>> +#ifdef CONFIG_EXYNOS_MIPI_DSIM
>>> +       exynos_init_dsim_platform_data(&panel_info);
>>> +#endif
>>> +       exynos_lcd_panel_init(&panel_info);
>>>
>> This is already present as part of lcd_enable in same file!
>> Please check it.
>>
> Ok. I just heard from MIPI-DSI engineer that MIPI-DSI should
> usually be initialized before FIMD video output starts.
>
> Is that the reason why you are trying to do panel_init here?
> That seems ok, but definitely you should not be using a new
> function for that.
exynos_lcd_panel_init function is supposed to do only additional (to 
exynos_fimd_parse_dt) initializations like ex: get_tizen_logo_info.

>
> Use something like below snippet:
> ====================
> /* exynos_fb.c */
> .
> lcd_ctrl_init()
> {.
> .
> .
> if(CONFIG_EXYNOS_MIPI...)
> call lcd_panel_on  /* MIPI-DSI to be initialized before FIMD init */
> .
> do exynos_lcd_init() /* FIMD init */
> .
> }
> .
> .
> .
> .
> lcd_enable()
> {
> .
> .
> if(CONFIG_EXYNOS_DP...)
> call lcd_panel_on /* DP to be initialized after FIMD init */
> .
> .
> }
>
>>    #else
>>>          /* initialize parameters which is specific to panel. */
>>>          init_panel_info(&panel_info);
>>>   #endif
>>> +
>>>          panel_width = panel_info.vl_width;
>>>          panel_height = panel_info.vl_height;
>>>
>>> --
>>> 1.8.3.2
>>>
>>> _______________________________________________
>>> U-Boot mailing list
>>> U-Boot at lists.denx.de
>>> http://lists.denx.de/mailman/listinfo/u-boot
>>>
>>
>>
>> Regards,
>> Ajay Kumar
>>
>
> Regards,
> Ajay Kumar
>
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

Best regards,
Piotr Wilczek

  reply	other threads:[~2014-02-28  8:54 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-27 14:15 [U-Boot] [PATCH 0/9] Exynos4: add support for device tree Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 1/9] exynos4:pinmux:fdt: decode peripheral id Piotr Wilczek
2014-01-28  8:54   ` Jaehoon Chung
2014-01-28 12:13     ` Piotr Wilczek
2014-01-29  8:03       ` Minkyu Kang
2014-01-27 14:15 ` [U-Boot] [PATCH 2/9] video:mipidsim:fdt: Add DT support for mipi dsim driver Piotr Wilczek
2014-02-07  7:53   ` Minkyu Kang
2014-02-07  8:43     ` Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 3/9] video:exynos_fb:fdt: add additional fdt data Piotr Wilczek
2014-02-07  7:53   ` Minkyu Kang
2014-02-07  8:19     ` Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 4/9] drivers:mmc:sdhci: enable support for DT Piotr Wilczek
2014-01-28  9:42   ` Jaehoon Chung
2014-01-28 12:31     ` Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 5/9] arm:exynos: add common board file for exynos 4 Piotr Wilczek
2014-02-07  7:52   ` Minkyu Kang
2014-02-07  8:40     ` Piotr Wilczek
2014-02-07  9:47       ` Minkyu Kang
2014-02-10  8:52         ` Piotr Wilczek
2014-02-10  9:09           ` Minkyu Kang
2014-01-27 14:15 ` [U-Boot] [PATCH 6/9] board:origen:fdt: Enable device tree on Origen Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 7/9] board:universal:fdt: Enable device tree on Universal Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 8/9] trats:fdt: Enable device tree on Trats Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 9/9] board:trats2:fdt: Enable device tree on Trats2 Piotr Wilczek
2014-01-28  9:47   ` Jaehoon Chung
2014-01-28 12:41     ` Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 00/12] Exynos4: add support for device tree Piotr Wilczek
2014-02-13 14:10   ` [U-Boot] [PATCH V2 01/12] exynos4:pinmux:fdt: decode peripheral id Piotr Wilczek
2014-02-13 14:10   ` [U-Boot] [PATCH V2 02/12] video:mipidsim:fdt: Add DT support for mipi dsim driver Piotr Wilczek
2014-02-13 14:10   ` [U-Boot] [PATCH V2 03/12] video:exynos_fb:fdt: add additional fdt data Piotr Wilczek
2014-02-13 14:10   ` [U-Boot] [PATCH V2 04/12] drivers:mmc:sdhci: enable support for DT Piotr Wilczek
2014-02-13 14:10   ` [U-Boot] [PATCH V2 05/12] board:samsung:common: remove unused max77686 init function Piotr Wilczek
2014-02-14  5:32     ` Rajeshwari Birje
2014-02-14  9:48       ` Piotr Wilczek
2014-02-14 11:40         ` Rajeshwari Birje
2014-02-22  7:37           ` Minkyu Kang
2014-02-24  6:39             ` Piotr Wilczek
2014-02-24 10:05               ` Minkyu Kang
2014-02-13 14:10   ` [U-Boot] [PATCH V2 06/12] board:samsung: move checkboard to common file Piotr Wilczek
2014-02-14  5:35     ` Rajeshwari Birje
2014-02-13 14:10   ` [U-Boot] [PATCH V2 07/12] arm:exynos: add common DTS file for exynos 4 Piotr Wilczek
2014-02-13 14:10   ` [U-Boot] [PATCH V2 08/12] arm:exynos: enble sdhci and misc_init to common board Piotr Wilczek
2014-02-13 14:10   ` [U-Boot] [PATCH V2 09/12] board:origen: Enable device tree on Origen Piotr Wilczek
2014-02-13 14:10   ` [U-Boot] [PATCH V2 10/12] board:universal: Enable device tree on Universal Piotr Wilczek
2014-02-14  8:53     ` Przemyslaw Marczak
2014-02-13 14:10   ` [U-Boot] [PATCH V2 11/12] board:trats: Enable device tree on Trats Piotr Wilczek
2014-02-13 14:10   ` [U-Boot] [PATCH V2 12/12] board:trats2: Enable device tree on Trats2 Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 00/12] Exynos4: add support for device tree Piotr Wilczek
2014-02-25 14:33   ` [U-Boot] [PATCH V3 01/12] exynos4:pinmux:fdt: decode peripheral id Piotr Wilczek
2014-02-25 14:33   ` [U-Boot] [PATCH V3 02/12] video:mipidsim:fdt: Add DT support for mipi dsim driver Piotr Wilczek
2014-02-27 14:59     ` Ajay kumar
2014-02-28  7:48       ` Piotr Wilczek
2014-02-25 14:33   ` [U-Boot] [PATCH V3 03/12] video:exynos_fb:fdt: add additional fdt data Piotr Wilczek
2014-02-27 13:50     ` Ajay kumar
2014-02-27 14:10       ` Ajay kumar
2014-02-28  8:54         ` Piotr Wilczek [this message]
2014-02-25 14:33   ` [U-Boot] [PATCH V3 04/12] drivers:mmc:sdhci: enable support for DT Piotr Wilczek
2014-02-25 14:33   ` [U-Boot] [PATCH V3 05/12] board:samsung: move checkboard to common file Piotr Wilczek
2014-02-25 14:33   ` [U-Boot] [PATCH V3 06/12] arm:exynos: add common DTS file for exynos 4 Piotr Wilczek
2014-02-25 14:33   ` [U-Boot] [PATCH V3 07/12] board:samsung:common: move max77686 init function Piotr Wilczek
2014-02-25 14:33   ` [U-Boot] [PATCH V3 08/12] arm:exynos: enable sdhci and misc_init to common board Piotr Wilczek
2014-02-25 14:33   ` [U-Boot] [PATCH V3 09/12] board:origen: Enable device tree on Origen Piotr Wilczek
2014-02-26  2:47     ` Minkyu Kang
2014-02-25 14:33   ` [U-Boot] [PATCH V3 10/12] board:universal: Enable device tree on Universal Piotr Wilczek
2014-02-25 14:33   ` [U-Boot] [PATCH V3 11/12] board:trats: Enable device tree on Trats Piotr Wilczek
2014-02-25 14:33   ` [U-Boot] [PATCH V3 12/12] board:trats2: Enable device tree on Trats2 Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 00/12] Exynos4: add support for device tree Piotr Wilczek
2014-03-04 13:55   ` [U-Boot] [PATCH V4 01/12] exynos4:pinmux:fdt: decode peripheral id Piotr Wilczek
2014-03-04 13:55   ` [U-Boot] [PATCH V4 02/12] video:mipidsim:fdt: Add DT support for mipi dsim driver Piotr Wilczek
2014-03-05  6:16     ` Ajay kumar
2014-03-05  6:57       ` Piotr Wilczek
2014-03-04 13:55   ` [U-Boot] [PATCH V4 03/12] video:exynos_fb:fdt: add additional fdt data Piotr Wilczek
2014-03-05  6:06     ` Ajay kumar
2014-03-05  7:11       ` Piotr Wilczek
2014-03-04 13:55   ` [U-Boot] [PATCH V4 04/12] drivers:mmc:sdhci: enable support for DT Piotr Wilczek
2014-03-04 13:55   ` [U-Boot] [PATCH V4 05/12] board:samsung: move checkboard to common file Piotr Wilczek
2014-03-04 13:55   ` [U-Boot] [PATCH V4 06/12] arm:exynos: add common DTS file for exynos 4 Piotr Wilczek
2014-03-04 13:55   ` [U-Boot] [PATCH V4 07/12] board:samsung:common: move max77686 init function Piotr Wilczek
2014-03-04 13:55   ` [U-Boot] [PATCH V4 08/12] arm:exynos: enable sdhci and misc_init to common board Piotr Wilczek
2014-03-04 13:55   ` [U-Boot] [PATCH V4 09/12] board:origen: Enable device tree on Origen Piotr Wilczek
2014-03-04 13:55   ` [U-Boot] [PATCH V4 10/12] board:universal: Enable device tree on Universal Piotr Wilczek
2014-03-04 13:55   ` [U-Boot] [PATCH V4 11/12] board:trats: Enable device tree on Trats Piotr Wilczek
2014-03-04 13:55   ` [U-Boot] [PATCH V4 12/12] board:trats2: Enable device tree on Trats2 Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 00/12] Exynos4: add support for device tree Piotr Wilczek
2014-03-07 13:59   ` [U-Boot] [PATCH V5 01/12] exynos4:pinmux:fdt: decode peripheral id Piotr Wilczek
2014-03-07 13:59   ` [U-Boot] [PATCH V5 02/12] video:mipidsim:fdt: Add DT support for mipi dsim driver Piotr Wilczek
2014-03-07 13:59   ` [U-Boot] [PATCH V5 03/12] video:exynos_fb:fdt: add additional fdt data Piotr Wilczek
2014-03-07 13:59   ` [U-Boot] [PATCH V5 04/12] drivers:mmc:sdhci: enable support for DT Piotr Wilczek
2014-03-07 13:59   ` [U-Boot] [PATCH V5 05/12] board:samsung: move checkboard to common file Piotr Wilczek
2014-03-07 13:59   ` [U-Boot] [PATCH V5 06/12] arm:exynos: add common DTS file for exynos 4 Piotr Wilczek
2014-03-07 13:59   ` [U-Boot] [PATCH V5 07/12] board:samsung:common: move max77686 init function Piotr Wilczek
2014-03-07 13:59   ` [U-Boot] [PATCH V5 08/12] arm:exynos: enable sdhci and misc_init to common board Piotr Wilczek
2014-03-07 13:59   ` [U-Boot] [PATCH V5 09/12] board:origen: Enable device tree on Origen Piotr Wilczek
2014-03-07 13:59   ` [U-Boot] [PATCH V5 10/12] board:universal: Enable device tree on Universal Piotr Wilczek
2014-03-07 13:59   ` [U-Boot] [PATCH V5 11/12] board:trats: Enable device tree on Trats Piotr Wilczek
2014-03-07 13:59   ` [U-Boot] [PATCH V5 12/12] board:trats2: Enable device tree on Trats2 Piotr Wilczek
2014-03-12 11:59   ` [U-Boot] [PATCH V5 00/12] Exynos4: add support for device tree Minkyu Kang

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=53104EAD.7040006@samsung.com \
    --to=p.wilczek@samsung.com \
    --cc=u-boot@lists.denx.de \
    /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