[13/13] drm/tegra: kick out simplefb

Message ID 89e22ee1c026b40a5bfa91de282d658b56dc8ee8.1511544782.git.mirq-linux@rere.qmqm.pl
State New
Headers show
Series
  • Untitled series #15041
Related show

Commit Message

Michał Mirosław Nov. 24, 2017, 5:53 p.m.
Kick out firmware fb when loading tegra driver.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
 drivers/gpu/drm/tegra/drm.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Thierry Reding Nov. 24, 2017, 8:50 p.m. | #1
On Fri, Nov 24, 2017 at 06:53:34PM +0100, Michał Mirosław wrote:
> Kick out firmware fb when loading tegra driver.
> 
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> ---
>  drivers/gpu/drm/tegra/drm.c | 4 ++++
>  1 file changed, 4 insertions(+)

Cool. Can you provide some background on how you tested this? What is
your firmware FB? That'd be useful information to put in the commit
message. Also, nit: "tegra driver" -> "Tegra driver".

Thierry
Michał Mirosław Nov. 24, 2017, 9:42 p.m. | #2
On Fri, Nov 24, 2017 at 09:50:50PM +0100, Thierry Reding wrote:
> On Fri, Nov 24, 2017 at 06:53:34PM +0100, Michał Mirosław wrote:
> > Kick out firmware fb when loading tegra driver.
> Cool. Can you provide some background on how you tested this? What is
> your firmware FB? That'd be useful information to put in the commit
> message. Also, nit: "tegra driver" -> "Tegra driver".

I checked this on my Asus TF300T, as I use simplefb for initial
boot messages.  simplefb uses framebuffer set up by the bootloader.

Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index 943bdf88c4a2..1ec66ae29839 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -1239,6 +1239,10 @@  static int host1x_drm_probe(struct host1x_device *dev)
 
 	dev_set_drvdata(&dev->dev, drm);
 
+	err = drm_fb_helper_remove_conflicting_framebuffers(NULL, "tegradrmfb", false);
+	if (err < 0)
+		goto unref;
+
 	err = drm_dev_register(drm, 0);
 	if (err < 0)
 		goto unref;