public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] drm/loongson: Introduce component framework support
@ 2024-05-13  0:12 Sui Jingfeng
  2024-05-13  0:12 ` [PATCH 1/3] drm/loongson: Add helpers for creating subdevice Sui Jingfeng
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Sui Jingfeng @ 2024-05-13  0:12 UTC (permalink / raw)
  To: Maxime Ripard, Thomas Zimmermann
  Cc: Sui Jingfeng, linux-kernel, dri-devel, Sui Jingfeng

Introduce the component framework to bind childs and siblings, for better
modularity and paper over the deferral probe problems if it need to attach
exterinal module someday. Hardware units come with PCI(e) are actually all
ready to drive, but there has some board specific modules will return
-EPROBE_DEFER. We need all other submodules ready to attach before we can
register the drm device to userspace.

The idea is to devide the exterinal module dependent part and exterinal
module independent part clearly, for example, the display controller and
the builtin GPIO-I2C just belong to exterinal module independent part.
While the output is belong to exterinal module dependent part.

Also for better reflecting the hardware, we intend to abstract the output
ports as child devices. The output ports may consists of encoder phy and
level shift, while the GPU and VPU are standalone siblings. As those units
are relative separate hardware units from display controller itself.

By design, the display controller PCI(e) is selected as the component
master, gpio-i2c go with master. The manually created virtual child device
are functional as agents for the master, it could return the -EPROBE_DEFER
back to the component core. This allows the master don't have to tear down
everything, the majority setups work can be preserved. The potential cyclic
dependency problem can be solved with such framework.
Sui Jingfeng (3):
  drm/loongson: Add helpers for creating subdevice
  drm/loongson: Introduce component framework support
  drm/loongson: Refactor lsdc device initialize and the output port

 drivers/gpu/drm/loongson/Makefile             |   1 +
 drivers/gpu/drm/loongson/loongson_device.c    |  42 ++++
 drivers/gpu/drm/loongson/loongson_module.c    |  17 +-
 drivers/gpu/drm/loongson/loongson_module.h    |   1 +
 drivers/gpu/drm/loongson/lsdc_drv.c           | 208 +++++++++++-------
 drivers/gpu/drm/loongson/lsdc_drv.h           |  34 +--
 drivers/gpu/drm/loongson/lsdc_output.c        | 183 +++++++++++++++
 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 |  15 +-
 10 files changed, 422 insertions(+), 120 deletions(-)
 create mode 100644 drivers/gpu/drm/loongson/lsdc_output.c

-- 
2.34.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-05-16 15:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-13  0:12 [PATCH 0/3] drm/loongson: Introduce component framework support Sui Jingfeng
2024-05-13  0:12 ` [PATCH 1/3] drm/loongson: Add helpers for creating subdevice Sui Jingfeng
2024-05-15 20:30   ` Markus Elfring
2024-05-16  2:29     ` Sui Jingfeng
2024-05-13  0:12 ` [PATCH 2/3] drm/loongson: Introduce component framework support Sui Jingfeng
2024-05-15 19:20   ` kernel test robot
2024-05-16  6:01   ` Markus Elfring
2024-05-13  0:12 ` [PATCH 3/3] drm/loongson: Refactor lsdc device initialize and the output port Sui Jingfeng
2024-05-16  6:26   ` Markus Elfring
2024-05-16  9:50     ` Sui Jingfeng
2024-05-16 15:05     ` Sui Jingfeng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox