All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] fb: split out framebuffer initialization from allocation
Date: Mon, 21 Nov 2011 16:28:25 +0000	[thread overview]
Message-ID: <4ECA7C29.8080604@freescale.com> (raw)
In-Reply-To: <1321308088-6327-1-git-send-email-timur@freescale.com>

Bruno Prémont wrote:

> Wouldn't it even make sense to move some more of the initialization of fb_info
> out of fb registration into this new init funtion? (I'm thinking about initializing
> mutexes and the like)

I was thinking the opposite.  See my reply to Florian's message.

> This way fb_info could be used before being registered. Registration would then
> be reduced to makeing the framebuffer visible to userspace and listed in
> registered_fb[].
> 
> This way framebuffer_alloc() would be no more that kzalloc(), framebuffer_init()
> would setup all "non-zero" fields of fb_info (including setup of all mutexes, one
> of which is currently being done by framebuffer_alloc() and the rest by
> do_register_framebuffer()!).

I think the problem is that it's unclear what the difference is between framebuffer_alloc() and register_framebuffer().  The problem is that register_framebuffer() also initializes the fb_info structure.  So some initialization is done in framebuffer_alloc(), some is done in register_framebuffer(), and some is done by the driver.  Not only that, but drivers that don't call framebuffer_alloc() can't really know what needs to be initialized before calling register_framebuffer().

Why is fb_info->lock initialized in register_framebuffer(), but fb_info->bl_curve_mutex is initialized in framebuffer_alloc()?  They're both mutexes.

-- 
Timur Tabi
Linux kernel developer at Freescale


  parent reply	other threads:[~2011-11-21 16:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14 22:01 [PATCH] fb: split out framebuffer initialization from allocation Timur Tabi
2011-11-17 20:19 ` Timur Tabi
2011-11-19  5:06 ` Florian Tobias Schandinat
2011-11-19 11:47 ` [PATCH] fb: split out framebuffer initialization from Bruno Prémont
2011-11-19 12:08 ` [PATCH] fb: split out framebuffer initialization from allocation Florian Tobias Schandinat
2011-11-19 12:35 ` [PATCH] fb: split out framebuffer initialization from Bruno Prémont
2011-11-21 16:22 ` [PATCH] fb: split out framebuffer initialization from allocation Timur Tabi
2011-11-21 16:28 ` Timur Tabi [this message]
2011-11-21 17:43 ` [PATCH] fb: split out framebuffer initialization from Bruno Prémont
2011-11-21 18:37 ` [PATCH] fb: split out framebuffer initialization from allocation Timur Tabi

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=4ECA7C29.8080604@freescale.com \
    --to=timur@freescale.com \
    --cc=linux-fbdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.