All of lore.kernel.org
 help / color / mirror / Atom feed
* drm/exynos: probe deferral for sub drivers
@ 2016-09-20 22:07 ` Tobias Jakobi
  2016-09-22 13:51   ` Andrzej Hajda
  0 siblings, 1 reply; 3+ messages in thread
From: Tobias Jakobi @ 2016-09-20 22:07 UTC (permalink / raw)
  To: linux-samsung-soc, Maling list - DRI developers

Hello,

I'm currently facing the following problem.

I want to use a devfreq device in one of the Exynos sub drivers, namely
the G2D sub driver. My current approach is to use
devfreq_get_devfreq_by_phandle() in g2d_probe(). But at the G2D probing
time the devfreq subsystem isn't initialized yet, and I get EPROBE_DEFER
back.

Now I simply let g2d_probe() fail with EPROBE_DEFER in that case.
Eventually devfreq is online and g2d_probe() runs successfully.

So far, so good. However some debugging shows that g2d_subdrv_probe(),
which does IOMMU setup and allocates the cmdlist, never happens in that
case.

I've looked at exynos_drm_load() which issues
exynos_drm_device_subdrv_probe() at some point, which apparantly only
probes those devices which are registered at that time. Hence, if the
G2D probe hasn't happened until then, the Exynos DRM won't ever see it.

That made me wonder how the driver makes sure that the sub drivers are
all readily probed in that situation. I see that a component_bind_all()
is issued prior to subdrv probing, but both the G2D and the IPP subdrv
don't have bind/unbind calls. I guess subdrv != subdrv, eh?

At present it appears that it's merely luck that the G2D is probed when
sub drivers are probed?

Anyway, probe deferral seems to work correctly with Exynos HDMI, so I
was wondering if there is some way to also make it work with the G2D?

Thanks in advance!

With best wishes,
Tobias

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: drm/exynos: probe deferral for sub drivers
  2016-09-20 22:07 ` drm/exynos: probe deferral for sub drivers Tobias Jakobi
@ 2016-09-22 13:51   ` Andrzej Hajda
  2016-09-22 14:08     ` Tobias Jakobi
  0 siblings, 1 reply; 3+ messages in thread
From: Andrzej Hajda @ 2016-09-22 13:51 UTC (permalink / raw)
  To: Tobias Jakobi, linux-samsung-soc, Maling list - DRI developers

On 21.09.2016 00:07, Tobias Jakobi wrote:
> Hello,
>
> I'm currently facing the following problem.
>
> I want to use a devfreq device in one of the Exynos sub drivers, namely
> the G2D sub driver. My current approach is to use
> devfreq_get_devfreq_by_phandle() in g2d_probe(). But at the G2D probing
> time the devfreq subsystem isn't initialized yet, and I get EPROBE_DEFER
> back.
>
> Now I simply let g2d_probe() fail with EPROBE_DEFER in that case.
> Eventually devfreq is online and g2d_probe() runs successfully.
>
> So far, so good. However some debugging shows that g2d_subdrv_probe(),
> which does IOMMU setup and allocates the cmdlist, never happens in that
> case.
>
> I've looked at exynos_drm_load() which issues
> exynos_drm_device_subdrv_probe() at some point, which apparantly only
> probes those devices which are registered at that time. Hence, if the
> G2D probe hasn't happened until then, the Exynos DRM won't ever see it.
>
> That made me wonder how the driver makes sure that the sub drivers are
> all readily probed in that situation. I see that a component_bind_all()
> is issued prior to subdrv probing, but both the G2D and the IPP subdrv
> don't have bind/unbind calls. I guess subdrv != subdrv, eh?
>
> At present it appears that it's merely luck that the G2D is probed when
> sub drivers are probed?
>
> Anyway, probe deferral seems to work correctly with Exynos HDMI, so I
> was wondering if there is some way to also make it work with the G2D?

HDMI is componentized, G2D no, so it does not work with deferred probe.
The best solution at the moment is to componentize G2D, it should
not be difficult.

Regards
Andrzej

>
> Thanks in advance!
>
> With best wishes,
> Tobias
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: drm/exynos: probe deferral for sub drivers
  2016-09-22 13:51   ` Andrzej Hajda
@ 2016-09-22 14:08     ` Tobias Jakobi
  0 siblings, 0 replies; 3+ messages in thread
From: Tobias Jakobi @ 2016-09-22 14:08 UTC (permalink / raw)
  To: Andrzej Hajda, linux-samsung-soc, Maling list - DRI developers

Hey Andrzej,


Andrzej Hajda wrote:
> On 21.09.2016 00:07, Tobias Jakobi wrote:
>> Hello,
>>
>> I'm currently facing the following problem.
>>
>> I want to use a devfreq device in one of the Exynos sub drivers, namely
>> the G2D sub driver. My current approach is to use
>> devfreq_get_devfreq_by_phandle() in g2d_probe(). But at the G2D probing
>> time the devfreq subsystem isn't initialized yet, and I get EPROBE_DEFER
>> back.
>>
>> Now I simply let g2d_probe() fail with EPROBE_DEFER in that case.
>> Eventually devfreq is online and g2d_probe() runs successfully.
>>
>> So far, so good. However some debugging shows that g2d_subdrv_probe(),
>> which does IOMMU setup and allocates the cmdlist, never happens in that
>> case.
>>
>> I've looked at exynos_drm_load() which issues
>> exynos_drm_device_subdrv_probe() at some point, which apparantly only
>> probes those devices which are registered at that time. Hence, if the
>> G2D probe hasn't happened until then, the Exynos DRM won't ever see it.
>>
>> That made me wonder how the driver makes sure that the sub drivers are
>> all readily probed in that situation. I see that a component_bind_all()
>> is issued prior to subdrv probing, but both the G2D and the IPP subdrv
>> don't have bind/unbind calls. I guess subdrv != subdrv, eh?
>>
>> At present it appears that it's merely luck that the G2D is probed when
>> sub drivers are probed?
>>
>> Anyway, probe deferral seems to work correctly with Exynos HDMI, so I
>> was wondering if there is some way to also make it work with the G2D?
> 
> HDMI is componentized, G2D no, so it does not work with deferred probe.
> The best solution at the moment is to componentize G2D, it should
> not be difficult.
I see! I try to look into this, but probably I'm going to ask for help
again. If that's OK with you? ;-)


With best wishes,
Tobias

> 
> Regards
> Andrzej
> 
>>
>> Thanks in advance!
>>
>> With best wishes,
>> Tobias
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-22 14:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20160920220749eucas1p1b78ce2aea95e1f6fdd31b28091ba9faa@eucas1p1.samsung.com>
2016-09-20 22:07 ` drm/exynos: probe deferral for sub drivers Tobias Jakobi
2016-09-22 13:51   ` Andrzej Hajda
2016-09-22 14:08     ` Tobias Jakobi

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.