From: "Noralf Trønnes" <noralf@tronnes.org>
To: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: dri-devel@lists.freedesktop.org, dh.herrmann@gmail.com,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/3] drm: simpledrm: add fbdev fallback support
Date: Mon, 8 Aug 2016 15:38:00 +0200 [thread overview]
Message-ID: <4bc0551d-9d4a-5ff4-d3da-24920308b6b0@tronnes.org> (raw)
In-Reply-To: <CAP=VYLp2iEP0oDVHcpu2xF6knnVC9_MUiZL7jpNaPJteKSa3Dg@mail.gmail.com>
Den 06.08.2016 00:38, skrev Paul Gortmaker:
> On Fri, Aug 5, 2016 at 11:44 AM, Noralf Trønnes <noralf@tronnes.org> 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 <noralf@tronnes.org>
>> ---
>>
>> 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
<snip>
>> 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 <dh.herrmann@gmail.com>
>> + *
>> + * 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 <linux/console.h>
>> +#include <linux/errno.h>
>> +#include <linux/kernel.h>
>> +#include <linux/mm.h>
>> +#include <linux/module.h>
> 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 <linux/string.h>
>> +#include <linux/fb.h>
>> +#include "simpledrm.h"
>> +
next prev parent reply other threads:[~2016-08-08 13:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-05 15:44 [PATCH v2 0/3] drm: add SimpleDRM driver Noralf Trønnes
2016-08-05 15:44 ` [PATCH v2 1/3] " Noralf Trønnes
2016-08-05 15:44 ` [PATCH v2 2/3] drm: simpledrm: add fbdev fallback support Noralf Trønnes
2016-08-05 22:38 ` Paul Gortmaker
2016-08-08 13:38 ` Noralf Trønnes [this message]
2016-08-05 15:44 ` [PATCH v2 3/3] drm: simpledrm: honour remove_conflicting_framebuffers() Noralf Trønnes
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=4bc0551d-9d4a-5ff4-d3da-24920308b6b0@tronnes.org \
--to=noralf@tronnes.org \
--cc=dh.herrmann@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®