[PATCH 04/25] staging: xgifb: XGIfb_mode_rate_to_dclock: initialize ModeIdIndex properly

Aaro Koskinen aaro.koskinen at iki.fi
Fri Apr 6 15:13:50 PDT 2012


Initialize ModeIdIndex according to the selected video mode. Currently
index 0 is always used and wrong clock data may be used.

Signed-off-by: Aaro Koskinen <aaro.koskinen at iki.fi>
---
 drivers/staging/xgifb/XGI_main_26.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index 993359f..dcecb87 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -159,6 +159,8 @@ static int XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr,
 	int Clock;
 	InitTo330Pointer(HwDeviceExtension->jChipType, XGI_Pr);
 
+	XGI_SearchModeID(ModeNo, &ModeIdIndex, XGI_Pr);
+
 	RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo,
 			ModeIdIndex, XGI_Pr);
 
-- 
1.7.2.5



More information about the devel mailing list