Re: [v1,1/3] drm/panel: ili9341: Correct use of device property APIs

From: Sui Jingfeng
Date: Tue Apr 30 2024 - 12:27:39 EST



On 2024/4/30 22:13, Andy Shevchenko wrote:
On Fri, Apr 26, 2024 at 05:13:43AM +0800, Sui Jingfeng wrote:
On 2024/4/26 03:12, Andy Shevchenko wrote:
On Fri, Apr 26, 2024 at 02:53:22AM +0800, Sui Jingfeng wrote:
On 2024/4/26 02:08, Sui Jingfeng wrote:
...

Are you speaking to yourself? I'm totally lost.

Please, if you want to give a constructive feedback, try to understand
the topic from different aspects and then clearly express it.
OK,

The previous email analysis the non-DT cases exhaustively, this email intend to
demonstrate the more frequently use case.

That is, in the *DT('OF')* based systems,
device_get_match_data() is completely equivalent to
of_device_get_match_data().
So the net results of applying this patch are "no gains and no lost".
This is not true.

Yes, I'm true.

I have mentionedin previous(earlier) paragraph with "in the DT(OF) based systems" or similar words.


It's only part of the cases, i.e. DT. So, I assume you meant

"So the net results of applying this patch are "no gains and no lost" in DT case".


Yeah,it is true that this patch are "no gains and no lost" in DT case.


Things will become clear if we divide the whole problem into two cases(DT and non-DT)
to discuss, that's it. That's all I can tell.
Not really.


I'm very clear before our conversation, really!


non-DT cases can also be divided to "fwnode backed or not",

For non fwnode backed case of non-DT cases, there is not decent way to acquire
large set of device properties. And is out of the scope of "Correct use of
device property APIs".


and
the former might be subdivided to "is it swnode backed or real fwnode one?"

Yeah,
On non-DT cases, it can be subdivided to swnode backed case and ACPI fwnode backed case.

- For swnode backed case: the device_get_match_data() don't has a implemented backend.
- For ACPI fwnode backed case: the device_get_match_data() has a implemented backend.

But the driver has *neither* software node support nor ACPI support, so that the rotation
property can not get and ili9341_dpi_probe() will fails. So in total, this is not a 100%
correct use of device property APIs.

But I'm fine that if you want to leave(ignore) those less frequent use cases temporarily,
there may have programmers want to post patches, to complete the missing in the future.


So, there do have some gains on non-DT cases.

- As you make it be able to compiled on X86 with the drm-misc-defconfig.
- You cleanup the code up (at least patch 2 in this series is no obvious problem).
- You allow people to modprobe it, and maybe half right and half undefined.

But you do helps moving something forward, so congratulations for the wake up.

--
Best regards,
Sui