From: Aaro Koskinen Date: Fri, 6 Apr 2012 22:13:50 +0000 (+0300) Subject: staging: xgifb: XGIfb_mode_rate_to_dclock: initialize ModeIdIndex properly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aca03bcc29b5848206985446a496f683fcccb268;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: xgifb: XGIfb_mode_rate_to_dclock: initialize ModeIdIndex properly 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 50f5b9ed2506..055acb36e1eb 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);