From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752514AbcHHNiK (ORCPT ); Mon, 8 Aug 2016 09:38:10 -0400 Received: from smtp.domeneshop.no ([194.63.252.55]:43785 "EHLO smtp.domeneshop.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752448AbcHHNiI (ORCPT ); Mon, 8 Aug 2016 09:38:08 -0400 Subject: Re: [PATCH v2 2/3] drm: simpledrm: add fbdev fallback support To: Paul Gortmaker References: <1470411883-3534-1-git-send-email-noralf@tronnes.org> <1470411883-3534-3-git-send-email-noralf@tronnes.org> Cc: dri-devel@lists.freedesktop.org, dh.herrmann@gmail.com, LKML From: =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= Message-ID: <4bc0551d-9d4a-5ff4-d3da-24920308b6b0@tronnes.org> Date: Mon, 8 Aug 2016 15:38:00 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Den 06.08.2016 00:38, skrev Paul Gortmaker: > On Fri, Aug 5, 2016 at 11:44 AM, Noralf Trønnes wrote: >> Create a simple fbdev device during SimpleDRM setup so legacy user-space >> and fbcon can use it. >> >> Original work by David Herrmann. >> >> Cc: dh.herrmann@gmail.com >> Signed-off-by: Noralf Trønnes >> --- >> >> Changes from version 1: >> No changes >> >> Changes from previous version: >> - Remove the DRM_SIMPLEDRM_FBDEV kconfig option and use DRM_FBDEV_EMULATION >> - Suspend fbcon/fbdev when the pipeline is enabled, resume in lastclose >> - Add FBINFO_CAN_FORCE_OUTPUT flag so we get oops'es on the console >> diff --git a/drivers/gpu/drm/simpledrm/simpledrm_fbdev.c b/drivers/gpu/drm/simpledrm/simpledrm_fbdev.c >> new file mode 100644 >> index 0000000..b83646b >> --- /dev/null >> +++ b/drivers/gpu/drm/simpledrm/simpledrm_fbdev.c >> @@ -0,0 +1,160 @@ >> +/* >> + * SimpleDRM firmware framebuffer driver >> + * Copyright (c) 2012-2014 David Herrmann >> + * >> + * This program is free software; you can redistribute it and/or modify it >> + * under the terms of the GNU General Public License as published by the Free >> + * Software Foundation; either version 2 of the License, or (at your option) >> + * any later version. >> + */ >> + >> +/* >> + * fbdev compatibility layer >> + * We provide a basic fbdev device for the same framebuffer that is used for >> + * the pseudo CRTC. >> + */ >> + >> +#include >> +#include >> +#include >> +#include >> +#include > You should not need module.h here since this file is not doing the > module_init or module_exit or MODULE_ALIAS etc etc. > > An empty file with just module.h in it outputs about 750k of goo > from cpp, so it is best avoided wherever not strictly needed. I've never thought of superfluous includes in terms of compile time before, but that makes sense, especially on a large project like this. Thanks, Noralf. > Thanks, > Paul. > -- > >> +#include >> +#include >> +#include "simpledrm.h" >> +