From 7bdbf5f12f0bbb7cad9ad646e322709486ea48f7 Mon Sep 17 00:00:00 2001
From: Brian Johnson <brijohn@gmail.com>
Date: Sat, 2 May 2009 16:51:58 -0400
Subject: [PATCH] Fix bug when setting resolution lower than lowest available resolution

Signed-off-by: Brian Johnson <brijohn@gmail.com>
---
 sn9c20x-bridge.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/sn9c20x-bridge.c b/sn9c20x-bridge.c
index 2cfc4a7..c961489 100644
--- a/sn9c20x-bridge.c
+++ b/sn9c20x-bridge.c
@@ -1045,6 +1045,12 @@ int sn9c20x_get_closest_resolution(struct usb_sn9c20x *dev,
 {
 	int i;
 
+	if (*width < sn9c20x_modes[0].width)
+		*width = sn9c20x_modes[0].width;
+
+	if (*height < sn9c20x_modes[0].height)
+		*height = sn9c20x_modes[0].height;
+
 	for (i = SN9C20X_N_MODES - 1; i >= 0; i--) {
 		if (*width >= sn9c20x_modes[i].width
 		    && *height >= sn9c20x_modes[i].height)
-- 
1.5.6.3

