]> git.baikalelectronics.ru Git - kernel.git/commit
drm: edid: Don't add inferred modes with higher resolution
authorTakashi Iwai <tiwai@suse.de>
Tue, 3 Jul 2012 09:22:11 +0000 (11:22 +0200)
committerDave Airlie <airlied@redhat.com>
Tue, 3 Jul 2012 10:18:10 +0000 (11:18 +0100)
commit2d67b1d55de544476334ae31523fcef89d85a18e
tree37ae8513e853e32e32c5dfc01d6b734bc77fd3c6
parent4891cc7d1278d8be254d67241c5ebb1afb7e8072
drm: edid: Don't add inferred modes with higher resolution

When a monitor EDID doesn't give the preferred bit, driver assumes
that the mode with the higest resolution and rate is the preferred
mode.  Meanwhile the recent changes for allowing more modes in the
GFT/CVT ranges give actually more modes, and some modes may be over
the native size.  Thus such a mode would be picked up as the preferred
mode although it's no native resolution.

For avoiding such a problem, this patch limits the addition of
inferred modes by checking not to be greater than other modes.
Also, it checks the duplicated mode entry at the same time.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_edid.c