[PATCH 03/13] drm: add Makefile support for drm buddy
Thomas Zimmermann
tzimmermann at suse.de
Wed Oct 20 08:21:11 UTC 2021
Hi
Am 20.10.21 um 00:53 schrieb Arunpravin:
> - Include drm buddy to DRM root Makefile
> - Add drm buddy init and exit function calls
> to drm core
Is there a hard requirement to have this code in the core?
IMHO there's already too much code in the DRM core that should rather go
into helpers. The allocator should live in it's own module and driver
should init it if needed.
>
> Signed-off-by: Arunpravin <Arunpravin.PaneerSelvam at amd.com>
> ---
> drivers/gpu/drm/Makefile | 2 +-
> drivers/gpu/drm/drm_drv.c | 3 +++
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
> index 0dff40bb863c..dc61e91a3154 100644
> --- a/drivers/gpu/drm/Makefile
> +++ b/drivers/gpu/drm/Makefile
> @@ -18,7 +18,7 @@ drm-y := drm_aperture.o drm_auth.o drm_cache.o \
> drm_dumb_buffers.o drm_mode_config.o drm_vblank.o \
> drm_syncobj.o drm_lease.o drm_writeback.o drm_client.o \
> drm_client_modeset.o drm_atomic_uapi.o drm_hdcp.o \
> - drm_managed.o drm_vblank_work.o
> + drm_managed.o drm_vblank_work.o drm_buddy.o
>
> drm-$(CONFIG_DRM_LEGACY) += drm_agpsupport.o drm_bufs.o drm_context.o drm_dma.o \
> drm_legacy_misc.o drm_lock.o drm_memory.o drm_scatter.o \
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 7a5097467ba5..6707eec21bef 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -43,6 +43,7 @@
> #include <drm/drm_managed.h>
> #include <drm/drm_mode_object.h>
> #include <drm/drm_print.h>
> +#include <drm/drm_buddy.h>
In alphabetical order please. Here and everywhere else.
Best regards
Thomas
>
> #include "drm_crtc_internal.h"
> #include "drm_internal.h"
> @@ -1034,6 +1035,7 @@ static void drm_core_exit(void)
> drm_sysfs_destroy();
> idr_destroy(&drm_minors_idr);
> drm_connector_ida_destroy();
> + drm_buddy_module_exit();
> }
>
> static int __init drm_core_init(void)
> @@ -1043,6 +1045,7 @@ static int __init drm_core_init(void)
> drm_connector_ida_init();
> idr_init(&drm_minors_idr);
> drm_memcpy_init_early();
> + drm_buddy_module_init();
>
> ret = drm_sysfs_init();
> if (ret < 0) {
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20211020/ea661189/attachment.sig>
More information about the amd-gfx
mailing list