From: Maxime Ripard <maxime@cerno.tech>
To: Sui Jingfeng <15330273260@189.cn>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
Lucas Stach <l.stach@pengutronix.de>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Roland Scheidegger <sroland@vmware.com>,
Zack Rusin <zackr@vmware.com>,
Christian Gmeiner <christian.gmeiner@gmail.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Rob Herring <robh+dt@kernel.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Krzysztof Kozlowski <krzk@kernel.org>,
Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>,
Sam Ravnborg <sam@ravnborg.org>,
suijingfeng <suijingfeng@loongson.cn>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org,
Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH v6 1/3] drm/lsdc: add drm driver for loongson display controller
Date: Wed, 16 Feb 2022 15:08:31 +0100 [thread overview]
Message-ID: <20220216140831.gnevfwudj7635lj5@houat> (raw)
In-Reply-To: <8b7bcb57-4450-ed67-bd5f-d8e8f2e74510@189.cn>
[-- Attachment #1: Type: text/plain, Size: 4580 bytes --]
On Sun, Feb 13, 2022 at 02:11:30AM +0800, Sui Jingfeng wrote:
>
> On 2022/2/10 00:16, Maxime Ripard wrote:
> > On Wed, Feb 09, 2022 at 10:38:41PM +0800, Sui Jingfeng wrote:
> > > On 2022/2/9 16:49, Maxime Ripard wrote:
> > > > On Fri, Feb 04, 2022 at 12:04:19AM +0800, Sui Jingfeng wrote:
> > > > > > > +/* Get the simple EDID data from the device tree
> > > > > > > + * the length must be EDID_LENGTH, since it is simple.
> > > > > > > + *
> > > > > > > + * @np: device node contain edid data
> > > > > > > + * @edid_data: where the edid data to store to
> > > > > > > + */
> > > > > > > +static bool lsdc_get_edid_from_dtb(struct device_node *np,
> > > > > > > + unsigned char *edid_data)
> > > > > > > +{
> > > > > > > + int length;
> > > > > > > + const void *prop;
> > > > > > > +
> > > > > > > + if (np == NULL)
> > > > > > > + return false;
> > > > > > > +
> > > > > > > + prop = of_get_property(np, "edid", &length);
> > > > > > > + if (prop && (length == EDID_LENGTH)) {
> > > > > > > + memcpy(edid_data, prop, EDID_LENGTH);
> > > > > > > + return true;
> > > > > > > + }
> > > > > > > +
> > > > > > > + return false;
> > > > > > > +}
> > > > > > You don't have a device tree binding for that driver, this is something
> > > > > > that is required. And it's not clear to me why you'd want EDID in the
> > > > > > DTB?
> > > > > 1) It is left to the end user of this driver.
> > > > >
> > > > > The downstream motherboard maker may use a dpi(XRGB888) or LVDS panel
> > > > > which don't have DDC support either, doing this way allow them put a
> > > > > EDID property into the dc device node in the DTS. Then the entire system works.
> > > > > Note those panel usually support only one display mode.
> > > > I guess it depends on what we mean exactly by the user, but the DTB
> > > > usually isn't under the (end) user control. And the drm.edid_firmware is
> > > > here already to address exactly this issue.
> > > >
> > > > On the other end, if the board has a static panel without any DDC lines,
> > > > then just put the timings in the device tree, there's no need for an
> > > > EDID blob.
> > > Loongson have a long history of using PMON firmware, The PMON firmware
> > > support flush the dtb into the the firmware before grub loading the kernel.
> > > You press 'c' key, then the PMON will give you a shell. it is much like a
> > > UEFI shell. Suppose foo.dtb is what you want to pass to the vmlinuz.
> > > Then type the follow single command can flush the dtb into the PMON firmware.
> > >
> > > |load_dtb /dev/fs/fat@usb0/foo.dtb|
> > >
> > > For our PMON firmware, it**is** totally under developer/pc board maker's control.
> > > You can flush whatever dtb every time you bootup until you satisfied.
> > > It(the pmon firmware) is designed to let downstream motherboard maker and/or
> > > customers to play easily.
> > >
> > > Support of reading EDID from the dtb is really a feature which downstream
> > > motherboard maker or customer wanted. They sometimes using eDP also whose
> > > resolution is not 1024x768. This is out of control for a graphic driver
> > > developer like me.
> > And, to reinstate, we already have a mechanism to set an EDID, and if it
> > wasn't an option, the DT is not the place to store an EDID blob.
>
> I know, put edid blob in the dts maybe abuse, but i am not push dts
> with edid blob either.
>
> It is left to other people, and the
> ./arch/powerpc/boot/dts/ac14xx.dts already have edid blob.
There's one example across the entire tree, and that's not either
documented or used by any driver. I'm not sure it was really the point
you were trying to make, but the only thing it proves from my point of
view is that you don't need it.
> > > And drm.edid_firmware have only a few limited resolution which is weak.
> > You're wrong. There's no limitation, it's just as limited as your
> > solution. You put the same thing, you get the same thing out of it. The
> > only difference is where the data are coming from.
>
> It is extremely difficult to use, it have difficulty to specify which
> firmware edid is for which connector. because we have a 1024x600 panel
> and a 1920x1080 monitor.
>
> It require you to know the connector's name at first, it is not as
> intuitive as my method. I am exhausted by it.
Then you always have the option to implement DDC support, or get your
firmware to patch the DT at boot time with the proper display timing
node. Even more so if you have a single timing to provide.
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2022-02-16 14:08 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-03 8:25 [PATCH v6 0/3] drm/lsdc: add drm driver for loongson display controller Sui Jingfeng
2022-02-03 8:25 ` [PATCH v6 2/3] dt-bindings: ls2k1000: add the display controller device node Sui Jingfeng
2022-02-03 8:50 ` Krzysztof Kozlowski
2022-02-16 14:01 ` Sui Jingfeng
2022-02-17 8:38 ` Krzysztof Kozlowski
2022-02-03 8:25 ` [PATCH v6 3/3] dt-bindings: mips: loongson: introduce board specific dts Sui Jingfeng
2022-02-03 8:49 ` Krzysztof Kozlowski
[not found] ` <20220203082546.3099-2-15330273260@189.cn>
2022-02-03 8:53 ` [PATCH v6 1/3] drm/lsdc: add drm driver for loongson display controller Krzysztof Kozlowski
2022-02-03 11:07 ` Dan Carpenter
2022-02-03 11:29 ` Krzysztof Kozlowski
2022-02-03 13:34 ` Dan Carpenter
[not found] ` <20220203085851.yqstkfgt4dz7rcnw@houat>
2022-02-03 15:47 ` Sui Jingfeng
2022-02-09 8:52 ` Maxime Ripard
2022-02-09 11:56 ` Jiaxun Yang
2022-02-09 14:04 ` Maxime Ripard
2022-02-09 14:14 ` Jiaxun Yang
2023-02-03 3:25 ` suijingfeng
2022-02-03 16:04 ` Sui Jingfeng
2022-02-09 8:49 ` Maxime Ripard
2022-02-09 14:38 ` Sui Jingfeng
2022-02-09 16:16 ` Maxime Ripard
2022-02-12 18:11 ` Sui Jingfeng
2022-02-16 14:08 ` Maxime Ripard [this message]
2022-02-12 20:52 ` Ilia Mirkin
2022-02-16 13:34 ` Sui Jingfeng
2022-02-16 14:11 ` Maxime Ripard
2022-02-03 16:29 ` Sui Jingfeng
2022-02-09 8:43 ` Maxime Ripard
2022-02-09 15:41 ` Sui Jingfeng
2022-02-09 16:19 ` Maxime Ripard
2022-02-16 13:46 ` Daniel Stone
2022-02-16 14:13 ` Sui Jingfeng
2022-02-16 14:43 ` Daniel Stone
2022-02-03 16:41 ` Sui Jingfeng
2022-02-09 8:36 ` Maxime Ripard
2023-02-02 2:58 ` suijingfeng
2022-02-09 12:00 ` [PATCH v6 0/3] " Jiaxun Yang
2022-02-10 4:04 ` Sui Jingfeng
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=20220216140831.gnevfwudj7635lj5@houat \
--to=maxime@cerno.tech \
--cc=15330273260@189.cn \
--cc=airlied@linux.ie \
--cc=andrey.zhizhikin@leica-geosystems.com \
--cc=christian.gmeiner@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=krzk@kernel.org \
--cc=l.stach@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=rdunlap@infradead.org \
--cc=robh+dt@kernel.org \
--cc=sam@ravnborg.org \
--cc=sroland@vmware.com \
--cc=suijingfeng@loongson.cn \
--cc=tsbogend@alpha.franken.de \
--cc=zackr@vmware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox