All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Hajda <a.hajda@samsung.com>
To: Inki Dae <inki.dae@samsung.com>
Cc: "Tomasz Stanisławski" <t.stanislaws@samsung.com>,
	"Stéphane Marchesin" <marcheu@chromium.org>,
	"DRI mailing list" <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v4 00/34] drm/exynos: Refactor parts of the exynos driver
Date: Thu, 06 Mar 2014 16:39:31 +0100	[thread overview]
Message-ID: <531896B3.1080408@samsung.com> (raw)
In-Reply-To: <CAAQKjZNvcdxBGiJuvxM_uad1v-nqC3bXaqKJ-ifZYoMmd2S7YA@mail.gmail.com>

On 03/04/2014 02:57 PM, Inki Dae wrote:
> Hi Andrzej,
>
>
> 2014-03-04 20:03 GMT+09:00 Andrzej Hajda <a.hajda@samsung.com>:
>> Hi Inki,
>>
>> On 02/28/2014 03:28 AM, Inki Dae wrote:
>> (...)
>>> Andrzej Hajda from our team is already working on addressing remaining
>>> issues with Sean's series, including fixing removed parallel display
>>> support. Earlier this month he sent a series restoring support for DSI
>>> panels: http://thread.gmane.org/gmane.
>>>
>>>  Already merged to internal kernel for test.
>>>
>>>> linux.kernel.samsung-soc/27044 . Now he's also trying to make the design
>>>> more modular. He will give you more information on Monday, as he's on
>>>> holiday for next two days.
>> Thanks Tomasz for pointing it out. I try to properly restore parallel
>> panel support.
>> I have come to the conclusion that the most natural way is to implement
>> crtc/encoder/connector in FIMD, as the FIMD directly produces
>> parallel RGB stream (or I80 in command mode).
>> I think implementing crtc/encoder/connector in FIMD in case of DSI and
>> eDP panel
>> is also more natural. In such case I would convert DSIM, eDP and ptn3460
>> to drm_panel
>> framework similarly as I already did for TC358764 DSI/LVDS bridge.
> In case of some machines without MIPI-DSI like below,
>         FIMD------>Parallel Panel
>
> There wouldn't be proper place for implementing a connector and a
> encoder. I guess your conclusion results from such cases.
Yes, this case has inspired me to re-think about proper placement for
drm_encoder and drm_connector in case of different HW pipelines.

Problem is that we can have arbitrary number of hw components
in the pipeline and we have only three drm components:
drm_crtc, drm_encoder, drm_connector. I skip drm_bridge as it is
in fact optional extra encoder, so it can be helpful in specific cases
but in
general it just complicates things IMHO.

The solution I see is to represent all encoders/bridges/image processors
present in the pipeline as a single drm_encoder, which encodes from
format provided to the
first element and produces format provided by the last one. The last
element of the pipeline
can be treated as drm_connector.

Additionally it would be nice to make possible to create all drm components
from video pipeline description provided by device tree.
If we start such pipeline creation from FIMD node, if code finds there
is any outgoing
video link from FIMD node it should create drm_encoder/drm_connector pair,
and attach device pointed by this link to that pair. Next attached
device should attach
devices pointed by its outgoing links and so on till there are no out links.
This is my rough idea, what do you think about it?
 
>
> But how should we handle eDP if connector and encoder are implemented
> only in FIMD driver?
> eDP can be hot-plugged and the hot-plug function will be handled by
> interrupt handler of eDP driver. This would mean that the hardware
> resource to the hot-plug belongs to eDP ip, and also its own connector
> should be implemented in eDP driver to detect the connection.
drm_panel has access to its connector and drm_dev, so after
extending drm_panel_funcs with 'detect' callback it should work.
>> Here are different scenarios of HW pipelines:
>> 1. Parallel panel:
>>     FIMD ---> Parallel Panel
>> 2. DSI panel:
>>     FIMD ---> DSIM ---> DSI Panel
>> 3. Arndale:
>>     FIMD ---> DSIM ---> DSI/LVDS bridge ---> LVDS panel
>> 4. Snow:
>>     FIMD ---> eDP ---> eDP/LVDS bridge ---> LVDS panel
>> 5. In case mobile image enhancer(MIE) will be used pipeline can be
>> extended to:
>>     FIMD ---> MIE ---> DSIM ---> .....
>>     or
>>     FIMD ---> MIE ---> eDP ---> .....
>>
> Other scenarios,
>       FIMD----->LVDS bridge----->LVDS panel
>
> Actually, I had used above machine, Geminus.
>
>
> And in case of Exynos4 series, it's more complicated,
>
>       FIMD----->mDNIe------>FIMD-Lite------>Parallel Panel
>       FIMD----->mDNIe------>FIMD-Lite------>MIPI-DSI------>DSI Panel
>       ...
>
> However, mDNIe ip isn't opened in public and also maybe continue so I
> think Exynos drm driver doesn't need to cover such cases.
It is available on some cyanogen repos, so theoretically it is possible
someone can try to implement it in mainline :)
>
>> Pros of implementing all drm components (crtc,encoder,connector) in
>> FIMD, and using
>> drm_panel framework for panels, DSIM, eDP and external bridges:
>> - it is natural, FIMD produces already encoded stream, DSIM and eDP are
>> just optional
>>   converters,
>> - easy to extend, adding/removing image processors or bridges will
>> require only changing
>>   video paths in DTS (in addition to adding device nodes),
>> - consistency.
>>
>> What do you think about it?
>>
> I think it's a good idea but corner case still exists as mentioned
> earlier. How about implementing connector and encoder in panel driver
> in case of machines not using MIPI-DSI and eDP? And in case of
> machines using MIPI-DSI and eDP, connector and encoder are implemented
> in their drivers as now.
For now it is OK for me, but I prefer to put the encoder/connector into
fimd, as drm_panel framework assumes connector is already created
when panel is attached to the drm.
>
> In case of using parallel panel, we could declare super device node
> for Exynos drm like below,
>
>         exynos-drm {
>                 compatible = "samsung,exynos-drm";
>                 crtcs = <&fimd>;
>                 connectors = <&panel>;
>         };
>
> connectors could be Panel, eDP, HDMI, and MIPI-DSI.
OK, it will allow avoid deferred probing.


Regards
Andrzej

  reply	other threads:[~2014-03-06 15:39 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-30 21:18 [PATCH v4 00/34] drm/exynos: Refactor parts of the exynos driver Sean Paul
2014-01-30 21:19 ` [PATCH v4 01/34] drm/exynos: Rename hdmi_infoframe to avoid collision Sean Paul
2014-01-30 21:19 ` [PATCH v4 02/34] drm/exynos: Remove useless slab.h include Sean Paul
2014-01-30 21:19 ` [PATCH v4 03/34] drm/exynos: Merge overlay_ops into manager_ops Sean Paul
2014-01-30 21:19 ` [PATCH v4 04/34] drm/exynos: Add an initialize function to manager and display Sean Paul
2014-01-30 21:19 ` [PATCH v4 05/34] drm/exynos: Use manager_op initialize in fimd Sean Paul
2014-01-30 21:19 ` [PATCH v4 06/34] drm/exynos: hdmi: Implement initialize op for hdmi Sean Paul
2014-01-30 21:19 ` [PATCH v4 07/34] drm/exynos: Pass exynos_drm_manager in manager ops instead of dev Sean Paul
2014-01-30 21:19 ` [PATCH v4 08/34] drm/exynos: Remove apply manager callback Sean Paul
2014-01-30 21:19 ` [PATCH v4 09/34] drm/exynos: Remove dpms link between encoder/connector Sean Paul
2014-01-30 21:19 ` [PATCH v4 10/34] drm/exynos: Rename display_op power_on to dpms Sean Paul
2014-01-30 21:19 ` [PATCH v4 11/34] drm/exynos: Don't keep dpms state in encoder Sean Paul
2014-01-30 21:19 ` [PATCH v4 12/34] drm/exynos: Use unsigned long for possible_crtcs Sean Paul
2014-01-30 21:19 ` [PATCH v4 13/34] drm/exynos: Split manager/display/subdrv Sean Paul
2014-01-30 21:19 ` [PATCH v4 14/34] drm/exynos: hdmi: remove the i2c drivers and use devtree Sean Paul
2014-02-08  2:52   ` Tomasz Figa
2014-02-10  7:30     ` Inki Dae
2014-02-11 14:13       ` Tomasz Figa
2014-02-11 23:02     ` Olof Johansson
2014-02-12  0:44       ` Tomasz Figa
2014-02-14 14:13   ` Tomasz Stanislawski
2014-02-19 11:14     ` Inki Dae
2014-04-04 14:04       ` Tomasz Stanislawski
2014-02-19 11:43   ` Inki Dae
2014-01-30 21:19 ` [PATCH v4 15/34] ARM: dts: exynos: Add i2c phandles to hdmi node Sean Paul
2014-01-30 21:19 ` [PATCH v4 16/34] drm/exynos: Remove exynos_drm_hdmi shim Sean Paul
2014-01-30 21:19 ` [PATCH v4 17/34] drm/exynos: Use drm_mode_copy to copy modes Sean Paul
2014-01-30 21:19 ` [PATCH v4 18/34] drm/exynos: Disable unused crtc planes from crtc Sean Paul
2014-01-30 21:19 ` [PATCH v4 19/34] drm/exynos: Add mode_set manager operation Sean Paul
2014-01-30 21:19 ` [PATCH v4 20/34] drm/exynos: Implement mode_fixup " Sean Paul
2014-01-30 21:19 ` [PATCH v4 21/34] drm/exynos: Use mode_set to configure fimd Sean Paul
2014-02-10 10:36   ` Andrzej Hajda
2014-01-30 21:19 ` [PATCH v4 22/34] drm/exynos: Remove unused/useless fimd_context members Sean Paul
2014-01-30 21:19 ` [PATCH v4 23/34] drm/exynos: Move dp driver from video/ to drm/ Sean Paul
2014-01-30 21:19 ` [PATCH v4 24/34] drm/exynos: Move display implementation into dp Sean Paul
2014-01-30 21:19 ` [PATCH v4 25/34] ARM: dts: Move display-timings node from fimd to dp Sean Paul
2014-01-30 21:19 ` [PATCH v4 26/34] drm/exynos: Implement dpms display callback in DP Sean Paul
2014-01-30 21:19 ` [PATCH v4 27/34] drm/exynos: Clean up FIMD power on/off routines Sean Paul
2014-01-30 21:19 ` [PATCH v4 28/34] drm/exynos: Consolidate suspend/resume in drm_drv Sean Paul
2014-01-30 21:19 ` [PATCH v4 29/34] drm/exynos: Add create_connector callback Sean Paul
2014-01-30 21:19 ` [PATCH v4 30/34] drm/exynos: Implement drm_connector in hdmi directly Sean Paul
2014-01-30 21:19 ` [PATCH v4 31/34] drm/exynos: Implement drm_connector directly in dp driver Sean Paul
2014-01-30 21:19 ` [PATCH v4 32/34] drm/exynos: Implement drm_connector directly in vidi driver Sean Paul
2014-01-30 21:38   ` [PATCH v5 " Sean Paul
2014-01-30 21:19 ` [PATCH v4 33/34] drm/exynos: Move lvds bridge discovery into DP driver Sean Paul
2014-01-30 21:19 ` [PATCH v4 34/34] drm/exynos: Remove the exynos_drm_connector shim Sean Paul
2014-02-06 19:54 ` [PATCH v4 00/34] drm/exynos: Refactor parts of the exynos driver Olof Johansson
2014-02-07  4:13   ` Inki Dae
2014-02-08  2:48   ` Tomasz Figa
2014-02-27  4:43     ` Inki Dae
2014-02-27 13:49       ` Tomasz Figa
2014-02-27 17:09         ` Inki Dae
2014-02-28  2:28           ` Inki Dae
2014-03-04 11:03             ` Andrzej Hajda
2014-03-04 13:57               ` Inki Dae
2014-03-06 15:39                 ` Andrzej Hajda [this message]
2014-02-07 10:29 ` Tomasz Figa
2014-03-13  7:33 ` Inki Dae
2014-03-13 14:05   ` Tomasz Figa
2014-03-13 15:48     ` Inki Dae
2014-03-13 18:10       ` Tomasz Figa
2014-03-14 11:02         ` Inki Dae

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=531896B3.1080408@samsung.com \
    --to=a.hajda@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=marcheu@chromium.org \
    --cc=t.stanislaws@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 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.