Re: [Linux-fbdev-devel] [PATCH] fbdev: make the best-fit section offb_find_mode return the closest matching mode

From: Krzysztof Helt
Date: Sun Jan 27 2008 - 07:45:59 EST


On Sun, 27 Jan 2008 12:31:16 +0100
Michal Januszewski <spock@xxxxxxxxxx> wrote:

> From: Michal Januszewski <spock@xxxxxxxxxx>
>
> Currently, if a perfect match in terms of resolution is not found,
> fb_find_mode() only looks for a best-fit mode among modes with a
> higher resolution than the one requested. Thus, if the user
> requests a resolution higher than the largest supported one, they
> are dropped to the default mode (usually a low resolution one).
>

> Change this behaviour so that the true closest match in terms
> of the city-block metric is returned.
>

This may be not ideal solution in case there exist both lower and
higher matches. If given resolution is closer (even by few pixels)
to lower one, your method will choose the lower one.
It may be incorrect for e.g. picture viewer (the higher resolution
shows the whole picture with margins, the smaller one shows
rescaled or cut picture).

IMHO, the choice of higher resolution (if possible) should be
preferred. It is also closer to the old solution.

Kind regards,
Krzysztof


----------------------------------------------------------------------
Nadchodzi galaktyczna wojna!
Sprawdz >> http://link.interia.pl/f1ce0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/