]> git.karo-electronics.de Git - karo-tx-linux.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)
commit7b668ebe2fce517873b0c28dd70c10fef1d3dc2f
tree37ae8513e853e32e32c5dfc01d6b734bc77fd3c6
parent1ef5325b238676c7a16bcd374250b07e77682736
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