[Letux-kernel] drm/omap: Remove panel-dpi driver
H. Nikolaus Schaller
hns at goldelico.com
Fri Apr 19 16:16:48 CEST 2019
Hi Laurent,
> Am 19.04.2019 um 15:07 schrieb Laurent Pinchart <laurent.pinchart at ideasonboard.com>:
>
> Hi Nikolaus,
>
> On Fri, Apr 19, 2019 at 12:12:02PM +0200, H. Nikolaus Schaller wrote:
>>> Am 18.04.2019 um 21:59 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>>>> Am 11.04.2019 um 09:19 schrieb Tomi Valkeinen <tomi.valkeinen at ti.com>:
>>>>
>>>>>>>> You will need the panel data to be added to the simple panel driver, as
>>>>>>>> it won't read the timings from the DT (unfortunately, in my opinion).
>>>>>>>
>>>>>>> Hm. How does this work? Is there a description? I have no experience with
>>>>>>> DRM simple panel.
>>>>>>
>>>>>> See drivers/gpu/drm/panel/panel-simple.c, it just has a list of
>>>>>> compatibles, and pointers to the (more or less) same data as is in the
>>>>>> DT. And see a commit that adds a new panel, e.g. "drm/panel: simple: Add
>>>>>> OSD070T1718-19TS panel support".
>>>>>
>>>>> Ok, I see. So the task is converting the nice and tested DTS properties to
>>>>> magic numbers in code... Let's hope without introducing new bugs.
>>>
>>> I have started with this and it was easy to add new panels to the database
>>> in panel-simple. But it seems not to probe successfully and omapdss does
>>> not initialize. Even if I modprobe panel_simple manually.
>>>
>>> The DTS looks like (is still working with 5.1 panel-dpi driver):
>>>
>>> / {
>>> model = "Goldelico GTA04b3/Letux 7004";
>>> lcd: lcd {
>>> compatible = "sharp,lq070y3dg3b",
>>> "panel-dpi";
>>> label = "lcd";
>>> enable-gpios = <&gpio1 12 0>;
>>>
>>> panel-timing {
>>> clock-frequency = <33260000>;
>>>
>>> hback-porch = <64>;
>>> hactive = <800>;
>>> hfront-porch = <64>;
>>> hsync-len = <128>;
>>>
>>> vback-porch = <35>;
>>> vactive = <480>;
>>> vfront-porch = <8>;
>>> vsync-len = <2>;
>>>
>>> hsync-active = <0>;
>>> vsync-active = <0>;
>>> de-active = <1>;
>>> pixelclk-active = <1>;
>>>
>>> };
>>>
>>> port {
>>> lcd_in: endpoint {
>>> remote-endpoint = <&dpi_out>;
>>> };
>>> };
>>> };
>>> };
>>>
>>> and the module database knows the compatible string:
>>>
>>> root at letux:~# modprobe -c | fgrep sharp,lq070y3dg3b
>>> alias of:N*T*Csharp,lq070y3dg3b panel_simple
>>> alias of:N*T*Csharp,lq070y3dg3bC* panel_simple
>>> root at letux:~#
>>>
>>> Next thing I plan do is to find out why the panel-simple driver is not matched
>>> by the panel DTS record.
>>
>> There is something strange:
>>
>> root at letux:/proc/device-tree/lcd# xxd compatible
>> 0000000: 6f6d 6170 6473 732c 7368 6172 702c 6c71 omapdss,sharp,lq
>> 0000010: 3037 3079 3364 6733 6200 6f6d 6170 6473 070y3dg3b.omapds
>> 0000020: 732c 7061 6e65 6c2d 6470 6900 s,panel-dpi.
>> root at letux:/proc/device-tree/lcd# fdtdump /sys/firmware/fdt | fgrep lq070
>> compatible = "sharp,lq070y3dg3b", "panel-dpi";
>> root at letux:/proc/device-tree/lcd#
>>
>> which means that somehow the device tree is rewritten to prefix the panel name
>> by "omapdss,".
>>
>> What I have done is to use 5.1-rc5, apply the "drm/omap: Remove panel-dpi driver"
>> patch and add database records to panel-simple.
>>
>> If I add to panel-simple
>> }, {
>> .compatible = "omapdss,sharp,lq070y3dg3b",
>> .data = &sharp_lq070y3dg3b,
>> }, {
>>
>> the driver is loaded during boot, but still not working. Probing of omapdss_dss
>> fails and I don't get a /dev/fb0.
>>
>> Am I missing another patch from linux-next to make panel-dpi removal completely work?
>
> You need to remove panel-dpi from the omapdss_of_fixups_whitelist[]
> array in drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c. It looks like
> I missed that. Would you like me to submit a patch or to do it yourself
> ?
Better you do that. I want to focus on getting my panels work again when 5.2 arrives...
But it is already removed from the list:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c?h=next-20190418#n187
On the other hand I do not find code that makes use of this table in my local tree.
Which I did build by just cherry-picking "drm/omap: Remove panel-dpi driver".
So it looks as if there is need for more patches to backport to 5.1-rc5.
A little "git blame" looks as if it also needs to pick "drm/omap: Whitelist DT nodes to fixup with omapdss, prefix", but this seems to depend on
other changes.
For some unknown reason, picking just "drm/omap: Remove panel-dpi driver" did merge in the omapdss_of_fixups_whitelist[] table but not the code...
Or did I get an older version from linux-next? Or something in a 3-way-merge did try to be clever?
Well, the ideal situation would be to run linux-next, but the system with this panel is not well supported by linux-next...
And a "git merge linux-next" ends in ca. 15 files with merge conflicts with local patches. And a "git rebase linux-next" stumbles even more.
So it is not a quick solution to roll the whole tree forward.
That is the reason why I would like to try it on 5.1-rc5 with a minimal set of backports from linux-next.
It seems that I should better wait until 5.2-rc1 (End of May) to work on this topic, to have a more stable basis for focussing on the panels.
And we do not need a fix before...
BR and thanks,
Nikolaus
More information about the Letux-kernel
mailing list