From patchwork Thu Jan 24 16:20:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 2033751 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id DC92D3FDBC for ; Thu, 24 Jan 2013 16:32:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D9B34E6CB0 for ; Thu, 24 Jan 2013 08:32:53 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by gabe.freedesktop.org (Postfix) with ESMTP id 672E3E6C76 for ; Thu, 24 Jan 2013 08:21:06 -0800 (PST) Received: by mail-wi0-f171.google.com with SMTP id hn14so602076wib.4 for ; Thu, 24 Jan 2013 08:21:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=nxn81YYsm0g/Y6D8/X4zTOcKEFAUba0RjEv3C5FCK4c=; b=BTZxMhGSeB8x5MlT6E08dsi2Up3wkF0YPP/dcYOnGMnxhy0oENsD5yJSTfrZypKGMK b3XZ12J7H9aWEuFkcYYWk9j24Kd5sxCAf1DYQQSXpCtg4NRtkyG4/M+kAEkpfjvQI+iz 3yllzfj98n5cTF1EXPqa1jeXGA3W0HaCXh3dQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=nxn81YYsm0g/Y6D8/X4zTOcKEFAUba0RjEv3C5FCK4c=; b=E8aSIHfCT9CA8MnEkoRH0E/GgxjL1Q/CfE5tgvAETYH7oNgJaZTNBRz6IGUuk2Iczq puaDoaMS6MtCfaT+3Y7IqS4x68XDxw1wBs5CHBEMGwIqcfeNmvAbuQovG4CI2ePsqU7K fiZ+6s581XkJG13yui2bgerhZo9nJGd/smgA304PIgKDcEkzSUJ1OBCB+zAfLckmoDeG 1xlP6qVsTvGqm85si5ctgahLm2ZK6KsFQiIPsXrhPlcaRICHXlR0zbXH20rZR1uYRmbr eZvkad61Wc41kBbabEpr0zjjlEHCiT/E8yzg3MElZXjzvFLTWJC4VGP6jIP04W+AhWrv +qzw== X-Received: by 10.194.242.69 with SMTP id wo5mr4238883wjc.10.1359044465480; Thu, 24 Jan 2013 08:21:05 -0800 (PST) Received: from biers.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id l5sm3273370wia.10.2013.01.24.08.21.03 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Jan 2013 08:21:04 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 12/16] drm/fb-helper: directly call set_par from the hotplug handler Date: Thu, 24 Jan 2013 17:20:44 +0100 Message-Id: <1359044448-3861-13-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1359044448-3861-1-git-send-email-daniel.vetter@ffwll.ch> References: <1359044448-3861-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQm7KIrdnR2i1UzeemrRsoAVbQxTCo69GQAoO+48KZJ65VFYB87zCZLkbGnltdiCcCzsQ5KT Cc: Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org 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 Reviewed-by: Rob Clark --- 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);