drm: Enable module autoloading
Subsystems (6)
cover drm: Enable module autoloading
This patch enables the autoloading feature of drm module. By registering MDT, the kernel is allowed to automatically bind modules to devices that match the specified compatible strings.
Liao Chen (3):
drm/bridge: it6505: Enable module autoloading
drm/tegra: Enable module autoloading
drm/mcde: Enable module autoloading
drivers/gpu/drm/bridge/ite-it6505.c | 1 + drivers/gpu/drm/mcde/mcde_drv.c | 1 + drivers/gpu/drm/tegra/drm.c | 1 + 3 files changed, 3 insertions(+)
Signature · 1 line
2.34.1
PATCH 1/3 drm/bridge: it6505: Enable module autoloading
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.
--- drivers/gpu/drm/bridge/ite-it6505.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/bridge/ite-it6505.c +1 -0
@@ -3498,6 +3498,7 @@ static const struct of_device_id it6505_of_match[] = { { .compatible = "ite,it6505" }, { } }; +MODULE_DEVICE_TABLE (of, it6505_of_match);static struct i2c_driver it6505_i2c_driver = { .driver = {
Signature · 1 line
2.34.1
Re: [PATCH -next 1/3] drm/bridge: it6505: Enable module autoloading
Quoted 13 lines · Liao Chen
Add
MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias fromof_device_idtable.Signed-off-by Liao Chen <[email protected]>--- drivers/gpu/drm/bridge/ite-it6505.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/bridge/ite-it6505.c +0
-0
drivers/gpu/drm/bridge/ite-it6505.c static const struct of_device_id it6505_of_match[] = { · line 3504
Quoted 7 lines
drivers/gpu/drm/bridge/ite-it6505.c +1
-0@@ -3498,6 +3498,7 @@ static const struct of_device_id it6505_of_match[] = { { .compatible = "ite,it6505" }, { } }; +MODULE_DEVICE_TABLE (of, it6505_of_match);static struct i2c_driver it6505_i2c_driver = { .driver = {
PATCH 2/3 drm/tegra: Enable module autoloading
In reply to Liao ChenAdd MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.
--- drivers/gpu/drm/tegra/drm.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/tegra/drm.c +1 -0
@@ -1390,6 +1390,7 @@ static const struct of_device_id host1x_drm_subdevs[] = { { .compatible = "nvidia,tegra234-nvdec", }, {/* sentinel */ } }; +MODULE_DEVICE_TABLE (of, host1x_drm_subdevs);static struct host1x_driver host1x_drm_driver = { .driver = {
Signature · 1 line
2.34.1
Re: [PATCH -next 2/3] drm/tegra: Enable module autoloading
Quoted 13 lines · Liao Chen
Add
MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias fromof_device_idtable.Signed-off-by Liao Chen <[email protected]>--- drivers/gpu/drm/tegra/drm.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/tegra/drm.c +0
-0
drivers/gpu/drm/tegra/drm.c static const struct of_device_id host1x_drm_subdevs[] = { · line 1393
Quoted 4 lines
drivers/gpu/drm/tegra/drm.c +1
-0@@ -1390,6 +1390,7 @@ static const struct of_device_id host1x_drm_subdevs[] = { { .compatible = "nvidia,tegra234-nvdec", }, {/* sentinel */ } }; +MODULE_DEVICE_TABLE (of, host1x_drm_subdevs);
I don't think it is correct. See how subdevs are handled in host1x_device_parse_dt(). I'll pick up two other patches though.
Quoted 6 lines
drivers/gpu/drm/tegra/drm.c +0
-0static struct host1x_driver host1x_drm_driver = { .driver = {Signature · 1 line
2.34.1
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH -next 2/3] drm/tegra: Enable module autoloading
Quoted 9 lines · Dmitry Baryshkov
Quoted 8 lines · Liao Chen
Add
MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias fromof_device_idtable.Signed-off-by Liao Chen <[email protected]>--- drivers/gpu/drm/tegra/drm.c | 1 + 1 file changed, 1 insertion(+)
Quoted 12 lines
drivers/gpu/drm/tegra/drm.c static const struct of_device_id host1x_drm_subdevs[] = { · line 1393
Quoted 9 lines
drivers/gpu/drm/tegra/drm.c +1
-0@@ -1390,6 +1390,7 @@ static const struct of_device_id host1x_drm_subdevs[] = { { .compatible = "nvidia,tegra234-nvdec", }, {/* sentinel */ } }; +MODULE_DEVICE_TABLE (of, host1x_drm_subdevs);I don't think it is correct. See how subdevs are handled in
host1x_device_parse_dt(). I'll pick up two other patches though.
Agreed. This shouldn't be needed since all of these compatible strings should show up in the OF device ID table of their corresponding drivers, which is where the export should happen.
Thierry
PATCH 3/3 drm/mcde: Enable module autoloading
In reply to Liao ChenAdd MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.
--- drivers/gpu/drm/mcde/mcde_drv.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/mcde/mcde_drv.c +1 -0
@@ -473,6 +473,7 @@ static const struct of_device_id mcde_of_match[] = { }, {}, }; +MODULE_DEVICE_TABLE (of, mcde_of_match);static struct platform_driver mcde_driver = { .driver = {
Signature · 1 line
2.34.1
Re: [PATCH -next 3/3] drm/mcde: Enable module autoloading
Quoted 4 lines · Liao Chen
Add
MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias fromof_device_idtable.Signed-off-by Liao Chen <[email protected]>
Yours,
Linus Walleij
Re: (subset) [PATCH -next 0/3] drm: Enable module autoloading
In reply to Liao ChenHi,
Quoted 11 lines · Liao Chen
This patch enables the autoloading feature of drm module. By registering MDT, the kernel is allowed to automatically bind modules to devices that match the specified compatible strings.
Liao Chen (3):
drm/bridge: it6505: Enable module autoloading
drm/tegra: Enable module autoloading
drm/mcde: Enable module autoloading[...]
Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)
[1/3] drm/bridge: it6505: Enable module autoloading
https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/d9c12481f980bdad9cf6fdb742e49c5b50622795
Signature · 1 line
Neil