All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 12/16] drm/fb-helper: directly call set_par from the hotplug handler
Date: Thu, 24 Jan 2013 17:20:44 +0100	[thread overview]
Message-ID: <1359044448-3861-13-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1359044448-3861-1-git-send-email-daniel.vetter@ffwll.ch>

The idea behind calling down into the driver's ->fb_probe function on each
hotplug seems to be able to reallocate the backing storage (if e.g. a screen
with higher resolution gets added). But that requires quite a bit of work in the
fb helper itself, since currently we limit new screens to the currently
allocated fb. An no kms driver supports fbdev fb resizing.

So don't bother and start to simplify the code by calling drm_fb_helper_set_par
directly from the fbdev hotplug function, since that's the only thing left in
drm_fb_helper_single_fb_probe which does not concern itself with fb allocation
and initial setup. Follow-on patches will streamline the initial setup
code.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_fb_helper.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 5c73a12..90c1117 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -859,8 +859,6 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
 		dev_info(fb_helper->dev->dev, "fb%d: %s frame buffer device\n",
 				info->node, info->fix.id);
 
-	} else {
-		drm_fb_helper_set_par(info);
 	}
 
 	/* Switch back to kernel console on panic */
@@ -1436,7 +1434,9 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
 	drm_setup_crtcs(fb_helper);
 	drm_modeset_unlock_all(dev);
 
-	return drm_fb_helper_single_fb_probe(fb_helper, bpp_sel);
+	drm_fb_helper_set_par(fb_helper->fbdev);
+
+	return 0;
 }
 EXPORT_SYMBOL(drm_fb_helper_hotplug_event);
 
-- 
1.7.10.4

  parent reply	other threads:[~2013-01-24 16:21 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-24 16:20 [PATCH 00/16] [RFC] drm fb helper cleanups Daniel Vetter
2013-01-24 16:20 ` [PATCH 01/16] omapdrm: only take crtc->mutex in crtc callbacks Daniel Vetter
2013-01-24 16:45   ` Rob Clark
2013-01-24 16:20 ` [PATCH 02/16] omapdrm: simply locking in the fb debugfs file Daniel Vetter
2013-01-24 16:46   ` Rob Clark
2013-01-24 16:20 ` [PATCH 03/16] drm: review locking for drm_fb_helper_restore_fbdev_mode Daniel Vetter
2013-02-11 22:10   ` Rob Clark
2013-01-24 16:20 ` [PATCH 04/16] drm/fb-helper: kill drm_fb_helper_restore Daniel Vetter
2013-02-11 22:08   ` Rob Clark
2013-01-24 16:20 ` [PATCH 05/16] drm/fb-helper: unexport drm_fb_helper_panic Daniel Vetter
2013-02-11 22:11   ` Rob Clark
2013-01-24 16:20 ` [PATCH 06/16] drm/fb-helper: inline drm_fb_helper_single_add_all_connectors Daniel Vetter
2013-01-24 21:27   ` Dave Airlie
2013-01-24 22:50     ` Daniel Vetter
2013-01-24 16:20 ` [PATCH 07/16] drm/fb-helper: unexport drm_fb_helper_single_fb_probe Daniel Vetter
2013-02-11 22:14   ` Rob Clark
2013-01-24 16:20 ` [PATCH 08/16] drm/tegra: don't set up initial fbcon config twice Daniel Vetter
2013-01-24 16:20 ` [PATCH 09/16] drm/fb-helper: don't disable everything in initial_config Daniel Vetter
2013-01-27 17:41   ` [PATCH] " Daniel Vetter
2013-02-12  0:49     ` Rob Clark
2013-01-24 16:20 ` [PATCH 10/16] drm/i915: rip out helper->disable noop functions Daniel Vetter
2013-01-24 16:20 ` [PATCH 11/16] drm/fb-helper: fixup up set_config semantics Daniel Vetter
2013-02-11 23:15   ` Rob Clark
2013-02-12  0:24     ` [PATCH] drm/fb-helper: fixup " Daniel Vetter
2013-02-12  0:24     ` [PATCH] drm/fb-helper: remove unused members of struct drm_fb_helper Daniel Vetter
2013-02-12  0:25     ` [PATCH] drm/fb-helper: fixup set_config semantics Daniel Vetter
2013-02-12  0:33       ` Rob Clark
2013-01-24 16:20 ` Daniel Vetter [this message]
2013-02-12  0:16   ` [PATCH 12/16] drm/fb-helper: directly call set_par from the hotplug handler Rob Clark
2013-01-24 16:20 ` [PATCH 13/16] drm/fb-helper: streamline drm_fb_helper_single_fb_probe Daniel Vetter
2013-02-12  0:24   ` Rob Clark
2013-02-12  0:33     ` Daniel Vetter
2013-02-12  0:35       ` Rob Clark
2013-01-24 16:20 ` [PATCH 14/16] drm/<drivers>: simplify ->fb_probe callback Daniel Vetter
2013-02-13 21:51   ` Rob Clark
2013-01-24 16:20 ` [PATCH 15/16] drm/fb-helper: improve kerneldoc Daniel Vetter
2013-01-27 17:42   ` [PATCH] " Daniel Vetter
2013-02-01 12:21     ` Laurent Pinchart
2013-02-05 21:43       ` Daniel Vetter
2013-01-24 16:20 ` [PATCH 16/16] drm/fb-helper: don't sleep for screen unblank when an oopps is in progress Daniel Vetter
2013-01-27 17:42   ` [PATCH] " Daniel Vetter
2013-02-13 21:59     ` Rob Clark
2013-01-24 16:53 ` [PATCH 00/16] [RFC] drm fb helper cleanups Rob Clark
2013-01-24 21:00   ` Greg KH

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=1359044448-3861-13-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.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.