linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Paul Mundt <lethal@linux-sh.org>,
	linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH/RFC] fbdev: Add FOURCC-based format configuration API
Date: Sun, 31 Jul 2011 22:54:48 +0000	[thread overview]
Message-ID: <4E35DD38.7070609@gmx.de> (raw)
In-Reply-To: <CAMuHMdX=c=p7oASCE+GgY9AgaCPWoXRQyjEGpn4BvA9xSY6GQg@mail.gmail.com>

On 07/31/2011 08:32 PM, Geert Uytterhoeven wrote:
> On Thu, Jul 28, 2011 at 12:51, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com>  wrote:
>>> As for struct fb_var_screeninfo fields to support switching to a FOURCC
>>> mode, I also prefer an explicit dedicated flag to specify switching to it.
>>> Even though using FOURCC doesn't fit under the notion of a videomode, using
>>> one of .vmode bits is too tempting, so, I would actually take the plunge and
>>> use FB_VMODE_FOURCC.
>>
>> Another option would be to consider any grayscale>  1 value as a FOURCC. I've
>> briefly checked the in-tree drivers: they only assign grayscale with 0 or 1,
>> and check whether grayscale is 0 or different than 0. If a userspace
>> application only sets grayscale>  1 when talking to a driver that supports the
>> FOURCC-based API, we could get rid of the flag.
>>
>> What can't be easily found out is whether existing applications set grayscale
>> to a>  1 value. They would break when used with FOURCC-aware drivers if we
>> consider any grayscale>  1 value as a FOURCC. Is that a risk we can take ?
>
> I think we can. I'd expect applications to use either 1 or -1 (i.e.
> all ones), both are
> invalid FOURCC values.
>
> Still, I prefer the nonstd way.
> And limiting traditional nonstd values to the lowest 24 bits (there
> are no in-tree
> drivers using the highest 8 bits, right?).

Okay, it would be okay for me to
- write raw FOURCC values in nonstd, enable FOURCC mode if upper byte != 0
- not having an explicit flag to enable FOURCC
- in FOURCC mode drivers must set visual to FB_VISUAL_FOURCC
- making support of FOURCC visible to userspace by capabilites |= FB_CAP_FOURCC

The capabilities is not strictly necessary but I think it's very useful as
- it allows applications to make sure the extension is supported (for example to 
adjust the UI)
- it allows applications to distinguish whether a particular format is not 
supported or FOURCC at all
- it allows signaling further extensions of the API
- it does not hurt, one line per driver and still some bytes in fixinfo free


So using it would look like this:
- the driver must have capabilities |= FB_CAP_FOURCC
- the application may check capabilities to know whether FOURCC is supported
- the application may write a raw FOURCC value in nonstd to request changing to 
FOURCC mode with this format
- when the driver switches to a FOURCC mode it must have visual = 
FB_VISUAL_FOURCC and the current FOURCC format in nonstd
- the application should check visual and nonstd to make sure it gets what it wanted


So if there are no strong objections against this I think we should implement it.
I do not really care whether we use a union or not but I think if we decide to 
have one it should cover all fields that are undefined/unused in FOURCC mode.


Hope we can find anything that everyone considers acceptable,

Florian Tobias Schandinat

  reply	other threads:[~2011-07-31 22:54 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-17 22:07 [RFC] Standardize YUV support in the fbdev API Laurent Pinchart
2011-05-17 22:44 ` Felipe Contreras
2011-05-18  6:53   ` Hans Verkuil
2011-05-23 11:55     ` Marek Szyprowski
2011-05-23 12:09       ` Hans Verkuil
2011-05-18  0:21 ` Andy Walls
2011-05-18  1:09   ` Andy Walls
2011-05-20 22:33 ` Florian Tobias Schandinat
2011-05-23 21:00   ` Laurent Pinchart
2011-05-23 22:56     ` Florian Tobias Schandinat
2011-06-21 15:36       ` [PATCH/RFC] fbdev: Add FOURCC-based format configuration API Laurent Pinchart
2011-06-21 20:49         ` Geert Uytterhoeven
2011-06-21 22:31           ` Laurent Pinchart
2011-06-22  5:45             ` Florian Tobias Schandinat
2011-06-22  8:50               ` Laurent Pinchart
2011-06-23 16:08               ` Geert Uytterhoeven
2011-06-24  6:19                 ` Paul Mundt
2011-06-24 18:55                   ` Geert Uytterhoeven
2011-06-24 19:45                     ` Florian Tobias Schandinat
2011-07-11 15:32                       ` Laurent Pinchart
2011-07-25 10:30                         ` Laurent Pinchart
2011-07-28  8:31                         ` Guennadi Liakhovetski
2011-07-28 10:51                           ` Laurent Pinchart
2011-07-31 20:32                             ` Geert Uytterhoeven
2011-07-31 22:54                               ` Florian Tobias Schandinat [this message]
2011-07-31 23:28                                 ` Laurent Pinchart
2011-07-31 23:58                                   ` Florian Tobias Schandinat
2011-08-01 14:11                                     ` Laurent Pinchart
2011-08-01  9:49                                 ` Geert Uytterhoeven
2011-08-11 17:19                                   ` Laurent Pinchart
2011-08-13  9:42                                     ` Geert Uytterhoeven
2011-07-31 23:30                               ` Laurent Pinchart

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=4E35DD38.7070609@gmx.de \
    --to=florianschandinat@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=geert@linux-m68k.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-media@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).