drm/tegra: Convert fbdev to DRM client
cover drm/tegra: Convert fbdev to DRM client
Convert tegra's fbdev code to struct drm_client. Replaces the current ad-hoc integration. The conversion includes a number of cleanups. As with most other drivers' fbdev emulation, fbdev in tegra is now just another DRM client that runs after the DRM device has been registered.
Once all drivers' fbdev emulation has been converted to struct drm_client, we can attempt to add additional in-kernel clients. A DRM-based dmesg log or a bootsplash are commonly mentioned. DRM can then switch easily among the existing clients if/when required.
I did the conversion from similar experience with other drivers. But I don't have the hardware to test this. Any testing is welcome.
Thomas Zimmermann (7):
drm/tegra: Include <linux/of.h>
drm/tegra: Include <linux/i2c.h>
drm/tegra: Removed fb from struct tegra_fbdev drm/tegra: Remove struct tegra_fbdev
drm/tegra: Hide fbdev support behind config option drm/tegra: Initialize fbdev DRM client drm/tegra: Implement fbdev emulation as in-kernel client
drivers/gpu/drm/tegra/Makefile | 2 + drivers/gpu/drm/tegra/drm.c | 23 +--- drivers/gpu/drm/tegra/drm.h | 27 ++-- drivers/gpu/drm/tegra/fb.c | 242 +-------------------------------- drivers/gpu/drm/tegra/fbdev.c | 240 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/tegra/output.c | 3 + drivers/gpu/drm/tegra/rgb.c | 1 + 7 files changed, 265 insertions(+), 273 deletions(-) create mode 100644 drivers/gpu/drm/tegra/fbdev.c
Signature · 1 line
2.40.0
PATCH 1/7 drm/tegra: Include <linux/of.h>
Include <linux/of.h> to get the contained declarations. No functional changes.
--- drivers/gpu/drm/tegra/output.c | 2 ++ drivers/gpu/drm/tegra/rgb.c | 1 + 2 files changed, 3 insertions(+)
drivers/gpu/drm/tegra/output.c +2 -0
@@ -4,6 +4,8 @@* Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved. */ +#include <linux/of.h> +#include <drm/drm_atomic_helper.h> #include <drm/drm_of.h> #include <drm/drm_panel.h>
drivers/gpu/drm/tegra/rgb.c +1 -0
@@ -5,6 +5,7 @@*/ #include <linux/clk.h> +#include <linux/of.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge_connector.h>
Signature · 1 line
2.40.0
Re: [1/7] drm/tegra: Include <linux/of.h>
Quoted 34 lines · Thomas Zimmermann
Include <
linux/of.h> to get the contained declarations. No functional changes.Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/tegra/output.c | 2 ++ drivers/gpu/drm/tegra/rgb.c | 1 + 2 files changed, 3 insertions(+)drivers/gpu/drm/tegra/output.c +2
-0@@ -4,6 +4,8 @@* Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved. */ +#include <linux/of.h> +#include <drm/drm_atomic_helper.h> #include <drm/drm_of.h> #include <drm/drm_panel.h> drivers/gpu/drm/tegra/rgb.c +1
-0@@ -5,6 +5,7 @@*/ #include <linux/clk.h> +#include <linux/of.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge_connector.h>
Re: [1/7] drm/tegra: Include <linux/of.h>
Am 30.03.23 um 14:51 schrieb Sui Jingfeng:
Quoted 2 lines
Reviewed-by Sui Jingfeng <[email protected] <mailto:[email protected]>>
Thanks a lot.
Quoted 34 lines · Thomas Zimmermann
Quoted 31 lines
Include <
linux/of.h> to get the contained declarations. No functional changes.Signed-off-by Thomas Zimmermann <[email protected]>---
drivers/gpu/drm/tegra/output.c| 2 ++
drivers/gpu/drm/tegra/rgb.c | 1 +2 files changed, 3 insertions(+)drivers/gpu/drm/tegra/output.c +2
-0@@ -4,6 +4,8 @@* Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved. */ +#include <linux/of.h> + #include <drm/drm_atomic_helper.h> #include <drm/drm_of.h> #include <drm/drm_panel.h>drivers/gpu/drm/tegra/rgb.c +1
-0@@ -5,6 +5,7 @@*/ #include <linux/clk.h> +#include <linux/of.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge_connector.h>
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Sui Jingfeng
Reviewed-byRe: [1/7] drm/tegra: Include <linux/of.h>
Hi,
Quoted 8 lines · Thomas Zimmermann
Am 30.03.23 um 14:51 schrieb Sui Jingfeng:
Quoted 2 lines
Reviewed-by Sui Jingfeng <[email protected] <mailto:[email protected]>>Thanks a lot.
I send my mail with Thunderbird mail client, don't know this does this look like this.
Sorry about that. It should be:
Please correct it manually, others patches also look good to me.
Yet, it beyond my ability to review, I still digging your patch and learning from it. :)
Quoted 35 lines
Quoted 34 lines · Thomas Zimmermann
Quoted 31 lines
Include <
linux/of.h> to get the contained declarations. No functional changes.Signed-off-by Thomas Zimmermann <[email protected]>---
drivers/gpu/drm/tegra/output.c| 2 ++
drivers/gpu/drm/tegra/rgb.c | 1 +2 files changed, 3 insertions(+)drivers/gpu/drm/tegra/output.c +2
-0@@ -4,6 +4,8 @@* Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved. */ +#include <linux/of.h> + #include <drm/drm_atomic_helper.h> #include <drm/drm_of.h> #include <drm/drm_panel.h>drivers/gpu/drm/tegra/rgb.c +1
-0@@ -5,6 +5,7 @@*/ #include <linux/clk.h> +#include <linux/of.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge_connector.h>
PATCH 2/7 drm/tegra: Include <linux/i2c.h>
In reply to Thomas ZimmermannInclude <linux/i2c.h> to get the contained declarations. No functional changes.
--- drivers/gpu/drm/tegra/output.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/tegra/output.c +1 -0
@@ -4,6 +4,7 @@* Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved. */ +#include <linux/i2c.h> #include <linux/of.h> #include <drm/drm_atomic_helper.h>
Signature · 1 line
2.40.0
Re: [2/7] drm/tegra: Include <linux/i2c.h>
Quoted 20 lines · Thomas Zimmermann
Include <
linux/i2c.h> to get the contained declarations. No functional changes.Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/tegra/output.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/tegra/output.c +1
-0@@ -4,6 +4,7 @@* Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved. */ +#include <linux/i2c.h> #include <linux/of.h> #include <drm/drm_atomic_helper.h>
PATCH 3/7 drm/tegra: Removed fb from struct tegra_fbdev
In reply to Thomas ZimmermannFbdev's struct fb_helper stores a pointer to the framebuffer. Remove struct tegra_fbdev.fb, which contains the same value. No functional changes.
--- drivers/gpu/drm/tegra/drm.h | 1 - drivers/gpu/drm/tegra/fb.c | 23 ++++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-)
drivers/gpu/drm/tegra/drm.h +0 -1
@@ -32,7 +32,6 @@ struct reset_control;#ifdef CONFIG_DRM_FBDEV_EMULATION struct tegra_fbdev {struct drm_fb_helper base; -struct drm_framebuffer *fb; };#endif
drivers/gpu/drm/tegra/fb.c +12 -11
@@ -217,7 +217,6 @@ static const struct fb_ops tegra_fb_ops = {static int tegra_fbdev_probe (struct drm_fb_helper *helper,struct drm_fb_helper_surface_size *sizes) { -struct tegra_fbdev *fbdev =to_tegra_fbdev (helper);struct tegra_drm *tegra = helper->dev->dev_private;struct drm_device *drm = helper->dev;struct drm_mode_fb_cmd2 cmd = {0 };
@@ -252,16 +251,15 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,return PTR_ERR (info); } - fbdev->fb =tegra_fb_alloc (drm, &cmd, &bo,1 ); -if (IS_ERR (fbdev->fb)) { - err =PTR_ERR (fbdev->fb); + fb =tegra_fb_alloc (drm, &cmd, &bo,1 ); +if (IS_ERR (fb)) { + err =PTR_ERR (fb);dev_err (drm->dev,"failed to allocate DRM framebuffer: %d\n" , err);drm_gem_object_put (&bo->gem); -return PTR_ERR (fbdev->fb); +return PTR_ERR (fb); } - fb = fbdev->fb; helper->fb = fb; helper->info = info;
@@ -349,10 +347,13 @@ static int tegra_fbdev_init(struct tegra_fbdev *fbdev,static void tegra_fbdev_exit (struct tegra_fbdev *fbdev) { -drm_fb_helper_unregister_info (&fbdev->base); +struct drm_fb_helper *helper = &fbdev->base; +struct drm_framebuffer *fb = helper->fb; -if (fbdev->fb) { -struct tegra_bo *bo =tegra_fb_get_plane (fbdev->fb,0 ); +drm_fb_helper_unregister_info (helper); + +if (fb) { +struct tegra_bo *bo =tegra_fb_get_plane (fb,0 );/* Undo the special mapping we made in fbdev probe. */ if (bo && bo->pages) {
@@ -360,10 +361,10 @@ static void tegra_fbdev_exit(struct tegra_fbdev *fbdev) bo->vaddr = NULL; } -drm_framebuffer_remove (fbdev->fb); +drm_framebuffer_remove (fb); } -drm_fb_helper_fini (&fbdev->base); +drm_fb_helper_fini (helper);tegra_fbdev_free (fbdev); }#endif
Signature · 1 line
2.40.0
PATCH 4/7 drm/tegra: Remove struct tegra_fbdev
In reply to Thomas ZimmermannRemove struct tegra_fbdev, which is an empty wrapper around struct drm_fb_helper. Use the latter directly. No functional changes.
--- drivers/gpu/drm/tegra/drm.h | 10 ------- drivers/gpu/drm/tegra/fb.c | 59 ++++++++++++++----------------------- 2 files changed, 22 insertions(+), 47 deletions(-)
drivers/gpu/drm/tegra/drm.h +0 -10
@@ -29,12 +29,6 @@struct reset_control ; -#ifdef CONFIG_DRM_FBDEV_EMULATION -struct tegra_fbdev { -struct drm_fb_helper base; -}; -#endif -struct tegra_drm {struct drm_device *drm;
@@ -52,10 +46,6 @@ struct tegra_drm {struct mutex clients_lock;struct list_head clients; -#ifdef CONFIG_DRM_FBDEV_EMULATION -struct tegra_fbdev *fbdev; -#endif -unsigned int hmask, vmask;unsigned int pitch_align;unsigned int num_crtcs;
drivers/gpu/drm/tegra/fb.c +22 -37
135 lines not on this page · raw message
Signature · 1 line
2.40.0
PATCH 5/7 drm/tegra: Hide fbdev support behind config option
In reply to Thomas ZimmermannOnly build tegra's fbdev emulation if CONFIG_DRM_FBDEV_EMULATION has been enabled. As part of this change, move the code into its own source file. No functional changes.
--- drivers/gpu/drm/tegra/Makefile | 2 + drivers/gpu/drm/tegra/drm.h | 20 +++ drivers/gpu/drm/tegra/fb.c | 228 +-------------------------------- drivers/gpu/drm/tegra/fbdev.c | 226 ++++++++++++++++++++++++++++++++ 4 files changed, 252 insertions(+), 224 deletions(-) create mode 100644 drivers/gpu/drm/tegra/fbdev.c
drivers/gpu/drm/tegra/Makefile +2 -0
@@ -29,4 +29,6 @@ tegra-drm-y := \ tegra-drm-y += trace.o +tegra-drm-$(CONFIG_DRM_FBDEV_EMULATION) += fbdev.o + obj-$(CONFIG_DRM_TEGRA) += tegra-drm.o
drivers/gpu/drm/tegra/drm.h +20 -0
@@ -185,13 +185,33 @@ struct tegra_bo *tegra_fb_get_plane(struct drm_framebuffer *framebuffer,bool tegra_fb_is_bottom_up (struct drm_framebuffer *framebuffer);int tegra_fb_get_tiling (struct drm_framebuffer *framebuffer,struct tegra_bo_tiling *tiling); +struct drm_framebuffer *tegra_fb_alloc (struct drm_device *drm, +const struct drm_mode_fb_cmd2 *mode_cmd, +struct tegra_bo **planes, +unsigned int num_planes);struct drm_framebuffer *tegra_fb_create (struct drm_device *drm,struct drm_file *file,const struct drm_mode_fb_cmd2 *cmd); + +#ifdef CONFIG_DRM_FBDEV_EMULATION int tegra_drm_fb_prepare (struct drm_device *drm);void tegra_drm_fb_free (struct drm_device *drm);int tegra_drm_fb_init (struct drm_device *drm);void tegra_drm_fb_exit (struct drm_device *drm); +#else +static inline int tegra_drm_fb_prepare (struct drm_device *drm) +{ +return 0 ; +} +static inline void tegra_drm_fb_free (struct drm_device *drm) +{ } +static inline int tegra_drm_fb_init (struct drm_device *drm) +{ +return 0 ; +} +static inline void tegra_drm_fb_exit (struct drm_device *drm) +{ } +#endif extern struct platform_driver tegra_display_hub_driver;extern struct platform_driver tegra_dc_driver;
drivers/gpu/drm/tegra/fb.c +4 -224
237 lines not on this page · raw message
drivers/gpu/drm/tegra/fbdev.c new file +226 -0
226 lines not on this page · raw message
Signature · 1 line
2.40.0
PATCH 6/7 drm/tegra: Initialize fbdev DRM client
In reply to Thomas ZimmermannInitialize the fbdev client in the fbdev code with empty helper functions. Also clean up the client. The helpers will later implement various functionality of the DRM client. No functional changes.
--- drivers/gpu/drm/tegra/fbdev.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-)
drivers/gpu/drm/tegra/fbdev.c +32 -1
@@ -125,6 +125,30 @@ static const struct drm_fb_helper_funcs tegra_fb_helper_funcs = { .fb_probe = tegra_fbdev_probe, }; +/* +* struct drm_client +*/ + +static void tegra_fbdev_client_unregister (struct drm_client_dev *client) +{ } + +static int tregra_fbdev_client_restore (struct drm_client_dev *client) +{ +return 0 ; +} + +static int tegra_fbdev_client_hotplug (struct drm_client_dev *client) +{ +return 0 ; +} + +static const struct drm_client_funcs tegra_fbdev_client_funcs = { + .owner =THIS_MODULE , + .unregister = tegra_fbdev_client_unregister, + .restore = tegra_fbdev_client_restore, + .hotplug = tegra_fbdev_client_hotplug, +}; +static struct drm_fb_helper *tegra_fbdev_create (struct drm_device *drm) {struct drm_fb_helper *helper;
@@ -151,11 +175,15 @@ static int tegra_fbdev_init(struct drm_fb_helper *helper,struct drm_device *drm = helper->dev;int err; + err =drm_client_init (dev, &helper->client,"fbdev" , &tegra_fbdev_client_funcs); +if (err) +return err; + err =drm_fb_helper_init (drm, helper);if (err <0 ) {dev_err (drm->dev,"failed to initialize DRM FB helper: %d\n" , err); -return err; + goto err_drm_client_release; } err =drm_fb_helper_initial_config (helper);
@@ -169,6 +197,8 @@ static int tegra_fbdev_init(struct drm_fb_helper *helper, fini:drm_fb_helper_fini (helper); +err_drm_client_release: +drm_client_release (&helper->client);return err; }
@@ -191,6 +221,7 @@ static void tegra_fbdev_exit(struct drm_fb_helper *helper) }drm_fb_helper_fini (helper); +drm_client_release (&helper->client);tegra_fbdev_free (helper); }
Signature · 1 line
2.40.0
PATCH 7/7 drm/tegra: Implement fbdev emulation as in-kernel client
In reply to Thomas ZimmermannMove code from ad-hoc fbdev callbacks into DRM client functions and remove the old callbacks. The functions instruct the client to poll for changed output or restore the display. The DRM core calls both, the old callbacks and the new client helpers, from the same places. The new functions perform the same operation as before, so there's no change in functionality.
Replace all code that initializes or releases fbdev emulation throughout the driver. Instead initialize the fbdev client by a single call to tegra_fbdev_setup() after tegra has registered its DRM device. As in most drivers, tegra's fbdev emulation now acts like a regular DRM client.
The fbdev client setup consists of the initial preparation and the hot-plugging of the display. The latter creates the fbdev device and sets up the fbdev framebuffer. The setup performs display hot-plugging once. If no display can be detected, DRM probe helpers re-run the detection on each hotplug event.
A call to drm_dev_unregister() releases the client automatically. No further action is required within tegra. If the fbdev framebuffer has been fully set up, struct fb_ops.fb_destroy implements the release. For partially initialized emulation, the fbdev client reverts the initial setup.
--- drivers/gpu/drm/tegra/drm.c | 23 +---- drivers/gpu/drm/tegra/drm.h | 18 +--- drivers/gpu/drm/tegra/fbdev.c | 177 +++++++++++++++------------------- 3 files changed, 86 insertions(+), 132 deletions(-)
drivers/gpu/drm/tegra/drm.c +4 -19
@@ -56,9 +56,6 @@ static int tegra_atomic_check(struct drm_device *drm,static const struct drm_mode_config_funcs tegra_drm_mode_config_funcs = { .fb_create = tegra_fb_create, -#ifdef CONFIG_DRM_FBDEV_EMULATION - .output_poll_changed = drm_fb_helper_output_poll_changed, -#endif .atomic_check = tegra_atomic_check, .atomic_commit = drm_atomic_helper_commit, };
@@ -885,7 +882,6 @@ static const struct drm_driver tegra_drm_driver = { DRIVER_ATOMIC | DRIVER_RENDER | DRIVER_SYNCOBJ, .open = tegra_drm_open, .postclose = tegra_drm_postclose, - .lastclose = drm_fb_helper_lastclose,#if defined(CONFIG_DEBUG_FS ) .debugfs_init = tegra_debugfs_init,
@@ -1185,15 +1181,11 @@ static int host1x_drm_probe(struct host1x_device *dev) drm->mode_config.funcs = &tegra_drm_mode_config_funcs; drm->mode_config.helper_private = &tegra_drm_mode_config_helpers; - err =tegra_drm_fb_prepare (drm); -if (err <0 ) - goto config; -drm_kms_helper_poll_init (drm); err =host1x_device_init (dev);if (err <0 ) - goto fbdev; + goto poll;/* * Now that all display controller have been initialized, the maximum
@@ -1256,18 +1248,14 @@ static int host1x_drm_probe(struct host1x_device *dev)if (err <0 ) goto hub; - err =tegra_drm_fb_init (drm); + err =drm_dev_register (drm,0 );if (err <0 ) goto hub; - err =drm_dev_register (drm,0 ); -if (err <0 ) - goto fb; +tegra_fbdev_setup (drm);return 0 ; -fb: -tegra_drm_fb_exit (drm); hub:if (tegra->hub)tegra_display_hub_cleanup (tegra->hub);
@@ -1280,10 +1268,8 @@ static int host1x_drm_probe(struct host1x_device *dev) }host1x_device_exit (dev); -fbdev: +poll:drm_kms_helper_poll_fini (drm); -tegra_drm_fb_free (drm); -config:drm_mode_config_cleanup (drm); domain:if (tegra->domain)
@@ -1304,7 +1290,6 @@ static int host1x_drm_remove(struct host1x_device *dev)drm_dev_unregister (drm);drm_kms_helper_poll_fini (drm); -tegra_drm_fb_exit (drm);drm_atomic_helper_shutdown (drm);drm_mode_config_cleanup (drm);
drivers/gpu/drm/tegra/drm.h +2 -16
@@ -15,7 +15,6 @@#include <drm/drm_bridge.h> #include <drm/drm_edid.h> #include <drm/drm_encoder.h> -#include <drm/drm_fb_helper.h> #include <drm/drm_fixed.h> #include <drm/drm_probe_helper.h> #include <uapi/drm/tegra_drm.h>
@@ -194,22 +193,9 @@ struct drm_framebuffer *tegra_fb_create(struct drm_device *drm, const struct drm_mode_fb_cmd2 *cmd);#ifdef CONFIG_DRM_FBDEV_EMULATION -int tegra_drm_fb_prepare (struct drm_device *drm); -void tegra_drm_fb_free (struct drm_device *drm); -int tegra_drm_fb_init (struct drm_device *drm); -void tegra_drm_fb_exit (struct drm_device *drm); +void tegra_fbdev_setup (struct drm_device *drm);#else -static inline int tegra_drm_fb_prepare (struct drm_device *drm) -{ -return 0 ; -} -static inline void tegra_drm_fb_free (struct drm_device *drm) -{ } -static inline int tegra_drm_fb_init (struct drm_device *drm) -{ -return 0 ; -} -static inline void tegra_drm_fb_exit (struct drm_device *drm) +static inline void tegra_fbdev_setup (struct drm_device *drm) { }#endif
drivers/gpu/drm/tegra/fbdev.c +80 -97
223 lines not on this page · raw message
Signature · 1 line
2.40.0
Quoted 22 lines · Thomas Zimmermann
Convert tegra's fbdev code to struct
drm_client. Replaces the current ad-hoc integration. The conversion includes a number of cleanups. As with most other drivers' fbdev emulation, fbdev in tegra is now just another DRM client that runs after the DRM device has been registered.Once all drivers' fbdev emulation has been converted to struct
drm_client, we can attempt to add additional in-kernel clients. A DRM-based dmesg log or a bootsplash are commonly mentioned. DRM can then switch easily among the existing clients if/when required.I did the conversion from similar experience with other drivers. But I don't have the hardware to test this. Any testing is welcome.
Thomas Zimmermann (7):
drm/tegra: Include <linux/of.h>
drm/tegra: Include <linux/i2c.h>
drm/tegra: Removed fb from structtegra_fbdevdrm/tegra: Remove structtegra_fbdev
drm/tegra: Hide fbdev support behind config option drm/tegra: Initialize fbdev DRM client drm/tegra: Implement fbdev emulation as in-kernel client
Quoted 9 lines
drivers/gpu/drm/tegra/Makefile | 2 + drivers/gpu/drm/tegra/drm.c | 23 +--- drivers/gpu/drm/tegra/drm.h | 27 ++-- drivers/gpu/drm/tegra/fb.c | 242 +-------------------------------- drivers/gpu/drm/tegra/fbdev.c | 240 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/tegra/output.c | 3 + drivers/gpu/drm/tegra/rgb.c | 1 + 7 files changed, 265 insertions(+), 273 deletions(-) create mode 100644 drivers/gpu/drm/tegra/fbdev.c
Seems to be working just fine. Applied, thanks.
Thierry
Am 05.04.23 um 16:55 schrieb Thierry Reding:
Quoted 33 lines · Thomas Zimmermann
Quoted 30 lines
Convert tegra's fbdev code to struct
drm_client. Replaces the current ad-hoc integration. The conversion includes a number of cleanups. As with most other drivers' fbdev emulation, fbdev in tegra is now just another DRM client that runs after the DRM device has been registered.Once all drivers' fbdev emulation has been converted to struct
drm_client, we can attempt to add additional in-kernel clients. A DRM-based dmesg log or a bootsplash are commonly mentioned. DRM can then switch easily among the existing clients if/when required.I did the conversion from similar experience with other drivers. But I don't have the hardware to test this. Any testing is welcome.
Thomas Zimmermann (7):
drm/tegra: Include <linux/of.h>
drm/tegra: Include <linux/i2c.h>
drm/tegra: Removed fb from structtegra_fbdevdrm/tegra: Remove structtegra_fbdev
drm/tegra: Hide fbdev support behind config option drm/tegra: Initialize fbdev DRM client drm/tegra: Implement fbdev emulation as in-kernel clientdrivers/gpu/drm/tegra/Makefile | 2 + drivers/gpu/drm/tegra/drm.c | 23 +--- drivers/gpu/drm/tegra/drm.h | 27 ++-- drivers/gpu/drm/tegra/fb.c | 242 +-------------------------------- drivers/gpu/drm/tegra/fbdev.c | 240 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/tegra/output.c | 3 + drivers/gpu/drm/tegra/rgb.c | 1 + 7 files changed, 265 insertions(+), 273 deletions(-)Quoted 1 line
create mode 100644
drivers/gpu/drm/tegra/fbdev.c
Quoted 1 line
Seems to be working just fine. Applied, thanks.
Thanks a lot!
Quoted 2 lines
Thierry
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Thierry Reding
AppliedFrom: Thierry Reding <[email protected]>
Quoted 11 lines · Thomas Zimmermann
Convert tegra's fbdev code to struct
drm_client. Replaces the current ad-hoc integration. The conversion includes a number of cleanups. As with most other drivers' fbdev emulation, fbdev in tegra is now just another DRM client that runs after the DRM device has been registered.Once all drivers' fbdev emulation has been converted to struct
drm_client, we can attempt to add additional in-kernel clients. A DRM-based dmesg log or a bootsplash are commonly mentioned. DRM can then switch easily among the existing clients if/when required.[...]
Applied, thanks!
[1/7] drm/tegra: Include <linux/of.h>
commit: 162b2ae95e0887ea75883bc419d55dd714b8fbf5
[2/7] drm/tegra: Include <linux/i2c.h>
commit: 0e4ec6d97a2c6e96a5ec8d0edc00aa658238ed3f
[3/7] drm/tegra: Removed fb from struct tegra_fbdev
commit: 5705d5b6a21e75c095df29deec8a13aa6b59f83c
[4/7] drm/tegra: Remove struct tegra_fbdev
commit: fc5646b848222601d8be78b66b6498130437abe1
[5/7] drm/tegra: Hide fbdev support behind config option
commit: 63ab4848d1d2eda1658ae82a3cb6eb7e03d28cec
[6/7] drm/tegra: Initialize fbdev DRM client
commit: d9d1e306e70db905f29d05952c1499fd3c6ef6ef
[7/7] drm/tegra: Implement fbdev emulation as in-kernel client
commit: 8e5113c627334ed32748d95ababd548171d2333dBest regards,
Signature · 1 line
Thierry Reding <[email protected]>