All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Hajda <a.hajda@samsung.com>
To: dri-devel@lists.freedesktop.org
Cc: Andrzej Hajda <a.hajda@samsung.com>,
	Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	Pawel Moll <pawel.moll@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Rob Herring <robh+dt@kernel.org>,
	Kumar Gala <galak@codeaurora.org>,
	Grant Likely <grant.likely@linaro.org>,
	Sean Paul <seanpaul@chromium.org>,
	Inki Dae <inki.dae@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Denis Carikli <denis@eukrea.com>
Subject: [PATCH 1/9] drm/exynos: delay fbdev initialization until an output is connected
Date: Mon, 17 Mar 2014 11:27:17 +0100	[thread overview]
Message-ID: <1395052045-23848-2-git-send-email-a.hajda@samsung.com> (raw)
In-Reply-To: <1395052045-23848-1-git-send-email-a.hajda@samsung.com>

In case fbdev is initialized before any output is connected,
fb resolution defaults to 1024x768. After that any output with
bigger resolution is ignored and fbdev is not displayed.
The patch postpones fbdev initialization to avoid such situation.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_drv.c | 16 ++++------------
 drivers/gpu/drm/exynos/exynos_drm_fb.c  |  3 +++
 2 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index c8869de..25f45b8 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -109,24 +109,15 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
 	/* setup possible_clones. */
 	exynos_drm_encoder_setup(dev);
 
-	/*
-	 * create and configure fb helper and also exynos specific
-	 * fbdev object.
-	 */
-	ret = exynos_drm_fbdev_init(dev);
-	if (ret) {
-		DRM_ERROR("failed to initialize drm fbdev\n");
-		goto err_drm_device;
-	}
-
 	drm_vblank_offdelay = VBLANK_OFF_DELAY;
 
 	platform_set_drvdata(dev->platformdev, dev);
 
+	/* force connectors detection */
+	drm_helper_hpd_irq_event(dev);
+
 	return 0;
 
-err_drm_device:
-	exynos_drm_device_unregister(dev);
 err_vblank:
 	drm_vblank_cleanup(dev);
 err_display_cleanup:
@@ -571,6 +562,7 @@ out_hdmi:
 	platform_driver_unregister(&fimd_driver);
 out_fimd:
 #endif
+
 #ifdef CONFIG_DRM_EXYNOS_DP
 	platform_driver_unregister(&dp_driver);
 out_dp:
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c
index c7c08d0..65a22ca 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fb.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c
@@ -20,6 +20,7 @@
 
 #include "exynos_drm_drv.h"
 #include "exynos_drm_fb.h"
+#include "exynos_drm_fbdev.h"
 #include "exynos_drm_gem.h"
 #include "exynos_drm_iommu.h"
 #include "exynos_drm_crtc.h"
@@ -300,6 +301,8 @@ static void exynos_drm_output_poll_changed(struct drm_device *dev)
 
 	if (fb_helper)
 		drm_fb_helper_hotplug_event(fb_helper);
+	else
+		exynos_drm_fbdev_init(dev);
 }
 
 static const struct drm_mode_config_funcs exynos_drm_mode_config_funcs = {
-- 
1.8.3.2

  reply	other threads:[~2014-03-17 10:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17 10:27 [PATCH 0/9] Restore parallel display support for Exynos based boards Andrzej Hajda
2014-03-17 10:27 ` Andrzej Hajda [this message]
2014-03-17 10:27 ` [PATCH 2/9] drm/exynos: init kms poll after creation of connectors Andrzej Hajda
2014-03-17 10:27 ` [PATCH 3/9] drm/exynos: correct timing porch conversion Andrzej Hajda
2014-03-17 10:27 ` [PATCH 4/9] exynos/fimd: add parallel output related bindings Andrzej Hajda
2014-03-17 10:27 ` [PATCH 5/9] drm/exynos: restore parallel output interface support Andrzej Hajda
2014-03-17 12:03   ` [PATCH v2 " Andrzej Hajda
2014-03-17 10:27 ` [PATCH 6/9] ARM: dts: exynos4210-universal: add exynos/fimd node Andrzej Hajda
2014-03-17 10:27 ` [PATCH 7/9] drm/modes: add polarization handling to mode conversion Andrzej Hajda
2014-03-17 10:27 ` [PATCH 8/9] drm/exynos/fimd: use polarization flags provided by drm_display_mode Andrzej Hajda
2014-03-20  6:03   ` Inki Dae
2014-03-20  7:01     ` Andrzej Hajda
2014-03-20 13:26     ` [PATCH] ARM: dts: exynos4210-universal: add fimd polarization settings Andrzej Hajda
2014-03-21  5:36       ` Inki Dae
     [not found] ` <1395052045-23848-1-git-send-email-a.hajda-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-17 10:27   ` [PATCH 9/9] drm/exynos/fimd: remove unused variable Andrzej Hajda
2014-03-17 13:16     ` [PATCH v2 " Andrzej Hajda
2014-03-18 13:05 ` [PATCH 0/9] Restore parallel display support for Exynos based boards Tomasz Figa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1395052045-23848-2-git-send-email-a.hajda@samsung.com \
    --to=a.hajda@samsung.com \
    --cc=denis@eukrea.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=inki.dae@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=seanpaul@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.