Message ID | 20211213093650.19598-1-tzimmermann@suse.de (mailing list archive) |
---|---|
Headers | show |
Series | drm/dp: Move DisplayPort helpers into own module | expand |
On Mon, 13 Dec 2021, Thomas Zimmermann <tzimmermann@suse.de> wrote: > Split-off DisplayPort functions from KMS helper library and move them > into their own module. Reduces the size of drm_kms_helper.ko by ~50%. > > This patchset is part of an on-going effort to reduce the minimum > binary size of the DRM core and helpers. It's helpful for systems with > early-boot DRM graphics, which requires DRM to be linked into the > kernel image. Would it be time to add a subdirectory for each non-driver, non-core drm module? We've touched this topic before. I find it increasingly hard to remember which files are part of helpers. This would also help with the arbitrary drm_dp_helper_mod.c naming. Perhaps drivers/gpu/drm/drm_dp/? BR, Jani. > > Thomas Zimmermann (3): > drm/dp_mst: Remove trailing whitespace. > drm/dp: Move DP declarations into separate header file > drm/dp: Move DisplayPort helpers into separate helper module > > drivers/gpu/drm/Kconfig | 8 ++++++ > drivers/gpu/drm/Makefile | 14 ++++++---- > drivers/gpu/drm/bridge/Kconfig | 4 +++ > drivers/gpu/drm/bridge/analogix/Kconfig | 2 ++ > drivers/gpu/drm/bridge/cadence/Kconfig | 1 + > drivers/gpu/drm/drm_crtc_helper_internal.h | 27 ------------------ > drivers/gpu/drm/{drm_dp_helper.c => drm_dp.c} | 2 +- > drivers/gpu/drm/drm_dp_aux_dev.c | 2 +- > drivers/gpu/drm/drm_dp_helper_internal.h | 28 +++++++++++++++++++ > drivers/gpu/drm/drm_dp_helper_mod.c | 22 +++++++++++++++ > drivers/gpu/drm/drm_dp_mst_topology.c | 4 +-- > drivers/gpu/drm/drm_kms_helper_common.c | 14 ---------- > drivers/gpu/drm/i915/Kconfig | 1 + > drivers/gpu/drm/msm/Kconfig | 1 + > drivers/gpu/drm/nouveau/Kconfig | 1 + > drivers/gpu/drm/rockchip/Kconfig | 1 + > drivers/gpu/drm/tegra/Kconfig | 1 + > drivers/gpu/drm/xlnx/Kconfig | 1 + > 18 files changed, 83 insertions(+), 51 deletions(-) > rename drivers/gpu/drm/{drm_dp_helper.c => drm_dp.c} (99%) > create mode 100644 drivers/gpu/drm/drm_dp_helper_internal.h > create mode 100644 drivers/gpu/drm/drm_dp_helper_mod.c > > > base-commit: 3f422828221d9ceefcddef0be33561b1646a1cbe > prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d > prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24 > -- > 2.34.1 >
Hi Am 13.12.21 um 14:34 schrieb Jani Nikula: > On Mon, 13 Dec 2021, Thomas Zimmermann <tzimmermann@suse.de> wrote: >> Split-off DisplayPort functions from KMS helper library and move them >> into their own module. Reduces the size of drm_kms_helper.ko by ~50%. >> >> This patchset is part of an on-going effort to reduce the minimum >> binary size of the DRM core and helpers. It's helpful for systems with >> early-boot DRM graphics, which requires DRM to be linked into the >> kernel image. > > Would it be time to add a subdirectory for each non-driver, non-core drm > module? We've touched this topic before. I find it increasingly hard to > remember which files are part of helpers. This would also help with the > arbitrary drm_dp_helper_mod.c naming. > > Perhaps drivers/gpu/drm/drm_dp/? It's probably worth it, but I'd prefer a separate patchset and discussion over this. It affects several modules. If adding drm_dp_helper_mod.c is overkill, that module code can also be added to drm_dp.c for now. Best regards Thomas > > BR, > Jani. > > > >> >> Thomas Zimmermann (3): >> drm/dp_mst: Remove trailing whitespace. >> drm/dp: Move DP declarations into separate header file >> drm/dp: Move DisplayPort helpers into separate helper module >> >> drivers/gpu/drm/Kconfig | 8 ++++++ >> drivers/gpu/drm/Makefile | 14 ++++++---- >> drivers/gpu/drm/bridge/Kconfig | 4 +++ >> drivers/gpu/drm/bridge/analogix/Kconfig | 2 ++ >> drivers/gpu/drm/bridge/cadence/Kconfig | 1 + >> drivers/gpu/drm/drm_crtc_helper_internal.h | 27 ------------------ >> drivers/gpu/drm/{drm_dp_helper.c => drm_dp.c} | 2 +- >> drivers/gpu/drm/drm_dp_aux_dev.c | 2 +- >> drivers/gpu/drm/drm_dp_helper_internal.h | 28 +++++++++++++++++++ >> drivers/gpu/drm/drm_dp_helper_mod.c | 22 +++++++++++++++ >> drivers/gpu/drm/drm_dp_mst_topology.c | 4 +-- >> drivers/gpu/drm/drm_kms_helper_common.c | 14 ---------- >> drivers/gpu/drm/i915/Kconfig | 1 + >> drivers/gpu/drm/msm/Kconfig | 1 + >> drivers/gpu/drm/nouveau/Kconfig | 1 + >> drivers/gpu/drm/rockchip/Kconfig | 1 + >> drivers/gpu/drm/tegra/Kconfig | 1 + >> drivers/gpu/drm/xlnx/Kconfig | 1 + >> 18 files changed, 83 insertions(+), 51 deletions(-) >> rename drivers/gpu/drm/{drm_dp_helper.c => drm_dp.c} (99%) >> create mode 100644 drivers/gpu/drm/drm_dp_helper_internal.h >> create mode 100644 drivers/gpu/drm/drm_dp_helper_mod.c >> >> >> base-commit: 3f422828221d9ceefcddef0be33561b1646a1cbe >> prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d >> prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24 >> -- >> 2.34.1 >> >
On Mon, 13 Dec 2021, Thomas Zimmermann <tzimmermann@suse.de> wrote: > Hi > > Am 13.12.21 um 14:34 schrieb Jani Nikula: >> On Mon, 13 Dec 2021, Thomas Zimmermann <tzimmermann@suse.de> wrote: >>> Split-off DisplayPort functions from KMS helper library and move them >>> into their own module. Reduces the size of drm_kms_helper.ko by ~50%. >>> >>> This patchset is part of an on-going effort to reduce the minimum >>> binary size of the DRM core and helpers. It's helpful for systems with >>> early-boot DRM graphics, which requires DRM to be linked into the >>> kernel image. >> >> Would it be time to add a subdirectory for each non-driver, non-core drm >> module? We've touched this topic before. I find it increasingly hard to >> remember which files are part of helpers. This would also help with the >> arbitrary drm_dp_helper_mod.c naming. >> >> Perhaps drivers/gpu/drm/drm_dp/? > > It's probably worth it, but I'd prefer a separate patchset and > discussion over this. It affects several modules. I guess the only thing here that we need to get right from the start is the new module name, everything else is relatively easy to change later. drm_dp_helper.ko seems fine by me. Note that this will also affect the drm_kms_helper.ko module parameters dp_aux_i2c_speed_khz, dp_aux_i2c_transfer_size and drm_dp_cec_unregister_delay, which will move to drm_dp_helper.ko. See the monstrosity near the top of drm_kms_helper_common.c I had to add for backward compatibility when I moved drm_edid_load.c from drm_kms_helper.ko to drm.ko. That was perhaps different, as these seem more like debug knobs, but at a minimum this needs to be mentioned in the commit message, and certainly needs acks from Dave and/or Daniel. BR, Jani.