Re: [PATCH 0/3] drm: Move several files from DRM core into modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 20 Oct 2021, Thomas Zimmermann <tzimmermann@xxxxxxx> wrote:
> Move a number of files into modules and behind config options.
>
> So far, early boot graphics was provided by fbdev. With simpledrm, and
> possibly other generic DRM drivers, it's now possible to have general
> early-boot output with DRM. This requires the DRM core to be linked into
> the kernel binary image.
>
> The reduction in size here is only ~1%, but the patchset is part of a
> larger effort to reduce the size of the DRM core module.

I think the main problem is really that of organization. You have all of
the files under drivers/gpu/drm/ and the only way to know which module
the files belong to is to look at the Makefile and the Kconfig. It's not
obvious based on the file names or directory, at all. And there are
nearly a hundred drm_*.c files there!

We also seem to have stuff depend on DRM alone, while functionally they
should really depend on DRM_KMS_HELPER too.

The subdirectories under drm/ also don't have any distinction between
being part of drm core and helpers or drivers. We have lib, scheduler,
selftests, and ttm next to the drivers.

We should start adding drm_* subdirectories, and moving the modules
separate from drm core there. We should rename the current non-driver
directories drm_*. We need better structure.


BR,
Jani.




>
> Thomas Zimmermann (3):
>   drm: Build drm_irq.o only if CONFIG_DRM_LEGACY has been set
>   drm: Link several object files into drm_kms_helper.ko
>   drm: Move GEM memory managers into modules
>
>  drivers/gpu/drm/Kconfig                |  4 ++--
>  drivers/gpu/drm/Makefile               | 26 +++++++++++++++-----------
>  drivers/gpu/drm/drm_gem_cma_helper.c   |  4 ++++
>  drivers/gpu/drm/drm_gem_shmem_helper.c |  4 ++++
>  drivers/gpu/drm/drm_irq.c              |  2 --
>  5 files changed, 25 insertions(+), 15 deletions(-)
>
> --
> 2.33.0
>

-- 
Jani Nikula, Intel Open Source Graphics Center



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux