]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Move legacy device list out of drm_driver
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 20 Feb 2020 15:16:28 +0000 (17:16 +0200)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 5 Jan 2021 05:20:29 +0000 (07:20 +0200)
commite2c0e10b450fd9b2e90f41d47f2dbc8bde1038a5
treea9c5577798d630be49656861d6dee0bea6d2bfc8
parentf152e92d687e147b86f5f500de15783d6ffa1b9b
drm: Move legacy device list out of drm_driver

The drm_driver structure contains a single field (legacy_dev_list) that
is modified by the DRM core, used to store a linked list of legacy DRM
devices associated with the driver. In order to make the structure
const, move the field out to a global variable. This requires locking
access to the global where the local field didn't require serialization,
but this only affects legacy drivers, and isn't in any hot path.

While at it, compile-out the legacy_dev_list field when DRM_LEGACY isn't
defined.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
drivers/gpu/drm/drm_pci.c
include/drm/drm_device.h
include/drm/drm_drv.h