From patchwork Sun Feb 17 17:59:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 2153631 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 7313B3FCA4 for ; Sun, 17 Feb 2013 18:01:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751821Ab3BQSBv (ORCPT ); Sun, 17 Feb 2013 13:01:51 -0500 Received: from mail-bk0-f45.google.com ([209.85.214.45]:60730 "EHLO mail-bk0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751709Ab3BQR7y (ORCPT ); Sun, 17 Feb 2013 12:59:54 -0500 Received: by mail-bk0-f45.google.com with SMTP id i18so2214233bkv.32 for ; Sun, 17 Feb 2013 09:59:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=OdXDhZZ2PQOoPt3LI0WFIw0UoasVwtYz5a4343WBuh0=; b=J36rtZweuOSpnkZVhmCU8q+xPDP/+GZ3gtYzqE4ea/D8fmqFhJrpHMpbumXhzmfSmR WPuhSJEeITxEFRnkwB8A1+3fZUe1ou68d89AMIyeCo7KX1tClcsKnKt2kEq9fwq1H2K7 Hrq4rflLUqfpQ4YlgLgQkJfi7AVsTxJvXkcd8lvRtyRaB7CgyC+w5KVy9oZ3UE+DgcSB aM4E8yMKsq7gOoqs+dfrdCVtSaFqx1mD+//GkeNuY0qis3+nW/W2DabFZGG50JczlClt HXUcpXAl5c+E6j5JiDeOETGKwHR3rAnQjsJeIYpnUKkhoR2kgXrWK9CsVlWvYZNPjP05 iyVA== X-Received: by 10.204.151.72 with SMTP id b8mr2995572bkw.132.1361123993121; Sun, 17 Feb 2013 09:59:53 -0800 (PST) Received: from localhost.localdomain (stgt-5f71b832.pool.mediaWays.net. [95.113.184.50]) by mx.google.com with ESMTPS id ho6sm20038738bkc.0.2013.02.17.09.59.51 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Feb 2013 09:59:52 -0800 (PST) From: David Herrmann To: linux-kernel@vger.kernel.org Cc: Florian Tobias Schandinat , linux-fbdev@vger.kernel.org, David Airlie , dri-devel@lists.freedesktop.org, David Herrmann Subject: [PATCH 3/9] video: sysfb: always provide vbefb device Date: Sun, 17 Feb 2013 18:59:05 +0100 Message-Id: <1361123951-587-4-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 1.8.1.3 In-Reply-To: <1361123951-587-1-git-send-email-dh.herrmann@gmail.com> References: <1361123951-587-1-git-send-email-dh.herrmann@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org From: David Herrmann HACK: This should be provided by architecture setup code. But to show how it is supposed to work, we now simply add a "vbefb" device during initialization. The better way to do this is by moving this into arch-code. So for instance the x86 boot initialization should create this platform-device after VBE/VESA screen detection. Other architectures can do the same or introduce other framebuffer types than SYSFB_VBE. Signed-off-by: David Herrmann --- drivers/video/sysfb.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/video/sysfb.c b/drivers/video/sysfb.c index 5b47a9a..0c0a4e7 100644 --- a/drivers/video/sysfb.c +++ b/drivers/video/sysfb.c @@ -271,6 +271,8 @@ static struct platform_driver sysfb_vbe_driver = { .remove = sysfb_vbe_remove, }; +static struct platform_device *sysfb_vbe_device; + static int __init sysfb_init(void) { int ret; @@ -287,6 +289,12 @@ static int __init sysfb_init(void) goto err_bus; } + sysfb_vbe_device = platform_device_register_data(NULL, "vbefb", -1, + &screen_info, + sizeof(screen_info)); + if (!sysfb_vbe_device) + pr_warn("cannot create vbefb device\n"); + return 0; err_bus: