Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1457793

Re: [PATCH v2 2/3] drm: simpledrm: add fbdev fallback support

From Noralf Trønnes <noralf@tronnes.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/3] drm: simpledrm: add fbdev fallback support
Date 2016-08-08 15:40 +0200
Message-ID <s3SWB-1Y6-17@gated-at.bofh.it> (permalink)
References <s2PxL-YZ-3@gated-at.bofh.it> <s2PxL-YZ-1@gated-at.bofh.it> <s3k8x-4D1-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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"
>> +

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2 2/3] drm: simpledrm: add fbdev fallback support Noralf Trønnes <noralf@tronnes.org> - 2016-08-05 17:50 +0200
  Re: [PATCH v2 2/3] drm: simpledrm: add fbdev fallback support Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-08-07 02:30 +0200
    Re: [PATCH v2 2/3] drm: simpledrm: add fbdev fallback support Noralf Trønnes <noralf@tronnes.org> - 2016-08-08 15:40 +0200

csiph-web