linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-fbdev@vger.kernel.org
Subject: [RFC] FB_MODE_IS_* usage
Date: Thu, 08 Mar 2012 16:26:34 +0000	[thread overview]
Message-ID: <2317885.WEEKmd8lWO@avalon> (raw)

Hi everybody,

While going through users of the fb_videomode structure, I realized that some 
of the FB_MODE_IS_* flags didn't seem to be used for any practical purpose.

The flags are defined as

#define FB_MODE_IS_UNKNOWN      0
#define FB_MODE_IS_DETAILED     1
#define FB_MODE_IS_STANDARD     2
#define FB_MODE_IS_VESA         4
#define FB_MODE_IS_CALCULATED   8
#define FB_MODE_IS_FIRST        16
#define FB_MODE_IS_FROM_VAR     32

- FB_MODE_IS_UNKNOWN isn't used at all

- FB_MODE_IS_DETAILED is set by the EDID parser for modes coming from detailed 
timing descriptors, and checked right after to work around monitors that 
report the "Preferred timing mode specified in descriptor block 1" bit in 
their EDID block, but don't report any detailed timing descriptor. 
FB_MODE_IS_DETAILED is thus only used internally in the EDID parser.

- FB_MODE_IS_STANDARD, FB_MODE_IS_VESA and FB_MODE_IS_CALCULATED are set but 
never used.

- FB_MODE_IS_FIRST is set by the EDID parser on the first detailed mode, and 
checked by fb_find_best_display() and a couple of drivers (fsl-diu-fb, 
sh_mobile_hdmi, aty and riva) to locate the first detailed mode (I will check 
if I can modify those 4 drivers to use fb_find_best_display() or something 
similar).

- FB_MODE_IS_FROM_VAR is set but never used.

If I can remove direct use of the FB_MODE_IS_FIRST flag in the drivers 
mentioned above, the FB_MODE_IS_DETAILED and FB_MODE_IS_FIRST flags will only 
be used internally in the EDID parser. All the other flags are either not used 
at all, or set but never read.

I'm working on sharing the EDID parser between DRM/KMS, FB and V4L2. The 
FB_MODE_IS_FIRST and FB_MODE_IS_DETAILED flags will thus become unused. Is 
there any objection to removing them then ?

-- 
Regards,

Laurent Pinchart


             reply	other threads:[~2012-03-08 16:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-08 16:26 Laurent Pinchart [this message]
2012-03-08 16:55 ` [RFC] FB_MODE_IS_* usage James Simmons

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=2317885.WEEKmd8lWO@avalon \
    --to=laurent.pinchart@ideasonboard.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 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).