From patchwork Wed Jun 26 21:30:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 2788591 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5BD339F3A0 for ; Wed, 26 Jun 2013 21:30:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6828C20356 for ; Wed, 26 Jun 2013 21:30:34 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7E2952030B for ; Wed, 26 Jun 2013 21:30:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 49066E61FC for ; Wed, 26 Jun 2013 14:30:33 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from avon.wwwdotorg.org (avon.wwwdotorg.org [70.85.31.133]) by gabe.freedesktop.org (Postfix) with ESMTP id 67C2BE5CAB for ; Wed, 26 Jun 2013 14:30:19 -0700 (PDT) Received: from severn.wwwdotorg.org (unknown [192.168.65.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPS id A08446348; Wed, 26 Jun 2013 15:40:21 -0600 (MDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by severn.wwwdotorg.org (Postfix) with ESMTPSA id 47E02E462A; Wed, 26 Jun 2013 15:30:16 -0600 (MDT) Message-ID: <51CB5D67.3090701@wwwdotorg.org> Date: Wed, 26 Jun 2013 15:30:15 -0600 From: Stephen Warren User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: David Herrmann Subject: Re: [RFC 0/6] SimpleDRM Driver (was: dvbe driver) References: <1372112849-670-1-git-send-email-dh.herrmann@gmail.com> In-Reply-To: <1372112849-670-1-git-send-email-dh.herrmann@gmail.com> X-Enigmail-Version: 1.4.6 X-Virus-Scanned: clamav-milter 0.97.7 at avon.wwwdotorg.org X-Virus-Status: Clean Cc: linux-fbdev@vger.kernel.org, Stephen Warren , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org 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: , 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 X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 06/24/2013 04:27 PM, David Herrmann wrote: > Hi > > This is my second revision of the dvbe driver. I renamed it to SimpleDRM to > show the resemblence with the recently introduced simplefb.c fbdev driver. The > driver is supposed to be the most basic DRM driver similar to efifb.c, vesafb.c, > offb.c, simplefb.c, ... > It provides a single virtual CRTC+encoder+connector and allows user-space to > create one dumb-buffer at a time and attach it. > > The setup changed slightly. It no longer uses shadow buffers but instead maps > the framebuffer directly into userspace. Furthermore, a new infrastructure is > used to unload firmware drivers during real hardware drivers probe cycles. Only > nouveau was changed to use it, yet. > > I still have an odd problem when unloading DRM drivers (not just SimpleDRM) with > an fbdev fallback. If I call printk() directly after unregister_framebufer(), I > get a NULL-deref somewhere in the VT layer (most times hide_cursor()). I haven't > figured out exactly where that happens, but I am also very reluctant to spend > more time debugging the VT layer. I tested this on a Tegra ARM system, and it basically worked. I have one question: With the simplefb driver, and console=tty1 on the kernel command-line, I see both the penguins logo and Linux's boot messages on the LCD panel that's hooked up through simplefb. However, with simpledrm, I only see the penguins logo, but no boot messages. Is that expected? How would I solve that if so? Note: I needed to apply the following patch to get it to compile: diff --git a/drivers/gpu/drm/simpledrm/simpledrm_fbdev.c b/drivers/gpu/drm/simpledrm/simpledrm_fbdev.c index 40a2696..39885c8 100644 --- a/drivers/gpu/drm/simpledrm/simpledrm_fbdev.c +++ b/drivers/gpu/drm/simpledrm/simpledrm_fbdev.c @@ -159,7 +159,7 @@ void sdrm_fbdev_cleanup(struct sdrm_device *sdrm) { struct fb_info *info; - if (!sdrm->info) + if (!sdrm->fbdev) return; dev_info(sdrm->ddev->dev, "fbdev cleanup\n");