From: Sui Jingfeng <sui.jingfeng@linux.dev>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Markus Elfring <Markus.Elfring@web.de>,
Sui Jingfeng <sui.jingfeng@linux.dev>
Subject: [PATCH v2 0/3] drm/loongson: Introduce component framework support
Date: Mon, 27 May 2024 03:58:23 +0800 [thread overview]
Message-ID: <20240526195826.109008-1-sui.jingfeng@linux.dev> (raw)
Introduce component framework to bind child and sibling devices, for better
modularity and offload the deferral probe issue to submodule if it need to
attach exterinal module someday. Also for better reflect the hardware
layout.
Hardware units that come with PCIe are all ready to drive, but there are
some board specific modules will return -EPROBE_DEFER to us. We need all
submodules ready to use before we can register the drm device to userspace.
The idea is to device the exterinal module dependent part and exterinal
module independent part. For example, the display controller and the
GPIO-I2C just belong to exterinal module independent part. While the
outputs are just belong to exterinal module dependent part.
We abstract the output ports as child devices, the output ports may
consists of encoder phy and level shifter. Well, the GPU are standalone
siblings relative to the DC. Those units are relatively separated
hardware units from display controller itself.
By design, the display controller PCI(e) is selected as master, gpio-i2c
go with master. Manually created virtual subdevice functional as agents
for the master, it could return the -EPROBE_DEFER back to the drvier core.
This allows the master don't have to tear down everything, thereore
majority setups work can be preserved. The potential cyclic dependency
problem can be solved then.
v1 -> v2:
* Squash patch 0002 and patch 0003 into one
* Fill type and improve commit message
Sui Jingfeng (3):
drm/loongson: Add a helper for creating child devices
drm/loongson: Introduce component framework support
drm/loongson: Add dummy gpu driver as a subcomponent
drivers/gpu/drm/loongson/Makefile | 4 +
drivers/gpu/drm/loongson/loong_gpu_pci_drv.c | 90 ++++++++
drivers/gpu/drm/loongson/loong_gpu_pci_drv.h | 27 +++
drivers/gpu/drm/loongson/loongson_device.c | 42 ++++
drivers/gpu/drm/loongson/loongson_module.c | 26 ++-
drivers/gpu/drm/loongson/loongson_module.h | 8 +
drivers/gpu/drm/loongson/lsdc_drv.c | 217 +++++++++++-------
drivers/gpu/drm/loongson/lsdc_drv.h | 45 +---
drivers/gpu/drm/loongson/lsdc_i2c.c | 5 +-
drivers/gpu/drm/loongson/lsdc_i2c.h | 3 -
drivers/gpu/drm/loongson/lsdc_output.c | 176 ++++++++++++++
drivers/gpu/drm/loongson/lsdc_output.h | 38 ++-
drivers/gpu/drm/loongson/lsdc_output_7a1000.c | 3 +-
drivers/gpu/drm/loongson/lsdc_output_7a2000.c | 17 +-
14 files changed, 564 insertions(+), 137 deletions(-)
create mode 100644 drivers/gpu/drm/loongson/loong_gpu_pci_drv.c
create mode 100644 drivers/gpu/drm/loongson/loong_gpu_pci_drv.h
create mode 100644 drivers/gpu/drm/loongson/lsdc_output.c
--
2.34.1
next reply other threads:[~2024-05-26 19:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-26 19:58 Sui Jingfeng [this message]
2024-05-26 19:58 ` [PATCH v2 1/3] drm/loongson: Add a helper for creating child devices Sui Jingfeng
2024-05-26 20:47 ` Dmitry Baryshkov
2024-05-27 9:07 ` Markus Elfring
2024-05-26 19:58 ` [PATCH v2 2/3] drm/loongson: Introduce component framework support Sui Jingfeng
2024-05-27 9:22 ` Markus Elfring
2024-05-26 19:58 ` [PATCH v2 3/3] drm/loongson: Add dummy gpu driver as a subcomponent Sui Jingfeng
2024-05-27 9:45 ` Markus Elfring
2024-05-27 8:05 ` [PATCH v2 0/3] drm/loongson: Introduce component framework support Markus Elfring
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=20240526195826.109008-1-sui.jingfeng@linux.dev \
--to=sui.jingfeng@linux.dev \
--cc=Markus.Elfring@web.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
/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