diff mbox

[2/3] video: fbdev: omap2: omapfb: add missing MODULE_ALIAS()

Message ID 1413311335-25083-2-git-send-email-balbi@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Felipe Balbi Oct. 14, 2014, 6:28 p.m. UTC
without MODULE_ALIAS(), omapfb won't get loaded
automatically.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Felipe Balbi Oct. 14, 2014, 6:34 p.m. UTC | #1
On Tue, Oct 14, 2014 at 01:28:54PM -0500, Felipe Balbi wrote:
> without MODULE_ALIAS(), omapfb won't get loaded
> automatically.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>

little note here. This makes omapfb load automatically, but display
still doesn't work with DSS as modules. Backlight is working and pixel
clock is running just fine. Still, nothing on display.

I thought I'd leave that for Tomi to deal with.
Tomi Valkeinen Oct. 15, 2014, 12:20 p.m. UTC | #2
On 14/10/14 21:28, Felipe Balbi wrote:
> without MODULE_ALIAS(), omapfb won't get loaded
> automatically.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>  drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
> index 9cbf1ce..b4b9244 100644
> --- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
> +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
> @@ -2651,6 +2651,7 @@ module_param_named(mirror, def_mirror, bool, 0);
>  
>  module_platform_driver(omapfb_driver);
>  
> +MODULE_ALIAS("platform:omapfb");
>  MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@nokia.com>");
>  MODULE_DESCRIPTION("OMAP2/3 Framebuffer");
>  MODULE_LICENSE("GPL v2");
> 

Thanks, I've queued this.

Unfortunately it's somewhat based on luck if the automatic loading works
correctly. We can't add more displays after omapfb has been probed, so
all the panel and encoder drivers have to be loaded before omapfb.

We have two workarounds there, which help the situation a bit. First is
that if omapfb finds no displays, it returns EPROBE_DEFER. The second is
that if there are displays, but no main display (display0), then omapfb
returns EPROBE_DEFER.

So even with these workarounds it is possible that drivers for secondary
displays are loaded after omapfb, causing them to be ignored.

 Tomi
Tomi Valkeinen Oct. 15, 2014, 12:46 p.m. UTC | #3
On 14/10/14 21:34, Felipe Balbi wrote:
> On Tue, Oct 14, 2014 at 01:28:54PM -0500, Felipe Balbi wrote:
>> without MODULE_ALIAS(), omapfb won't get loaded
>> automatically.
>>
>> Signed-off-by: Felipe Balbi <balbi@ti.com>
> 
> little note here. This makes omapfb load automatically, but display
> still doesn't work with DSS as modules. Backlight is working and pixel
> clock is running just fine. Still, nothing on display.
> 
> I thought I'd leave that for Tomi to deal with.

I presume this is about am437x-sk. I don't have the board, so there's
not too much I can do except send emails.

So the panel works fine if display drivers are built-in?

The compatible string seems to be wrong in the .dts file. It says
"osddisplays,osd057T0559-34ts" which is not the panel used. But that
shouldn't affect this.

What do you mean with "pixel clock is running"?

 Tomi
Felipe Balbi Oct. 15, 2014, 2:37 p.m. UTC | #4
HI,

On Wed, Oct 15, 2014 at 03:46:10PM +0300, Tomi Valkeinen wrote:
> On 14/10/14 21:34, Felipe Balbi wrote:
> > On Tue, Oct 14, 2014 at 01:28:54PM -0500, Felipe Balbi wrote:
> >> without MODULE_ALIAS(), omapfb won't get loaded
> >> automatically.
> >>
> >> Signed-off-by: Felipe Balbi <balbi@ti.com>
> > 
> > little note here. This makes omapfb load automatically, but display
> > still doesn't work with DSS as modules. Backlight is working and pixel
> > clock is running just fine. Still, nothing on display.
> > 
> > I thought I'd leave that for Tomi to deal with.
> 
> I presume this is about am437x-sk. I don't have the board, so there's
> not too much I can do except send emails.
> 
> So the panel works fine if display drivers are built-in?

yup.

> The compatible string seems to be wrong in the .dts file. It says
> "osddisplays,osd057T0559-34ts" which is not the panel used. But that
> shouldn't affect this.

I got that from Darren, IIRC. Still, if it's wrong, it's wrong. What
should it be ?

> What do you mean with "pixel clock is running"?

poking at the pixel clock with a scope, I can see it clocking.
Felipe Balbi Oct. 15, 2014, 2:38 p.m. UTC | #5
On Wed, Oct 15, 2014 at 03:20:19PM +0300, Tomi Valkeinen wrote:
> On 14/10/14 21:28, Felipe Balbi wrote:
> > without MODULE_ALIAS(), omapfb won't get loaded
> > automatically.
> > 
> > Signed-off-by: Felipe Balbi <balbi@ti.com>
> > ---
> >  drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
> > index 9cbf1ce..b4b9244 100644
> > --- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
> > +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
> > @@ -2651,6 +2651,7 @@ module_param_named(mirror, def_mirror, bool, 0);
> >  
> >  module_platform_driver(omapfb_driver);
> >  
> > +MODULE_ALIAS("platform:omapfb");
> >  MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@nokia.com>");
> >  MODULE_DESCRIPTION("OMAP2/3 Framebuffer");
> >  MODULE_LICENSE("GPL v2");
> > 
> 
> Thanks, I've queued this.
> 
> Unfortunately it's somewhat based on luck if the automatic loading works
> correctly. We can't add more displays after omapfb has been probed, so
> all the panel and encoder drivers have to be loaded before omapfb.
> 
> We have two workarounds there, which help the situation a bit. First is
> that if omapfb finds no displays, it returns EPROBE_DEFER. The second is
> that if there are displays, but no main display (display0), then omapfb
> returns EPROBE_DEFER.
> 
> So even with these workarounds it is possible that drivers for secondary
> displays are loaded after omapfb, causing them to be ignored.

then there is another case to fix, right ? :-)
Tomi Valkeinen Oct. 15, 2014, 3:45 p.m. UTC | #6
On 15/10/14 17:38, Felipe Balbi wrote:
> On Wed, Oct 15, 2014 at 03:20:19PM +0300, Tomi Valkeinen wrote:
>> On 14/10/14 21:28, Felipe Balbi wrote:
>>> without MODULE_ALIAS(), omapfb won't get loaded
>>> automatically.
>>>
>>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>>> ---
>>>  drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
>>> index 9cbf1ce..b4b9244 100644
>>> --- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
>>> +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
>>> @@ -2651,6 +2651,7 @@ module_param_named(mirror, def_mirror, bool, 0);
>>>  
>>>  module_platform_driver(omapfb_driver);
>>>  
>>> +MODULE_ALIAS("platform:omapfb");
>>>  MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@nokia.com>");
>>>  MODULE_DESCRIPTION("OMAP2/3 Framebuffer");
>>>  MODULE_LICENSE("GPL v2");
>>>
>>
>> Thanks, I've queued this.
>>
>> Unfortunately it's somewhat based on luck if the automatic loading works
>> correctly. We can't add more displays after omapfb has been probed, so
>> all the panel and encoder drivers have to be loaded before omapfb.
>>
>> We have two workarounds there, which help the situation a bit. First is
>> that if omapfb finds no displays, it returns EPROBE_DEFER. The second is
>> that if there are displays, but no main display (display0), then omapfb
>> returns EPROBE_DEFER.
>>
>> So even with these workarounds it is possible that drivers for secondary
>> displays are loaded after omapfb, causing them to be ignored.
> 
> then there is another case to fix, right ? :-)

Yes, but don't hold your breath. The issue's been there for ages and no
good solutions have been found. The same problem is there for omapdrm.

 Tomi
diff mbox

Patch

diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
index 9cbf1ce..b4b9244 100644
--- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
@@ -2651,6 +2651,7 @@  module_param_named(mirror, def_mirror, bool, 0);
 
 module_platform_driver(omapfb_driver);
 
+MODULE_ALIAS("platform:omapfb");
 MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@nokia.com>");
 MODULE_DESCRIPTION("OMAP2/3 Framebuffer");
 MODULE_LICENSE("GPL v2");