Alternative patch to fix refresh rate for kernel 3.4.113 android_kernel_oppo_msm8974 and similar
I'm posting this patch attached here if somebody with similar hardware wants to try it. I developed it by looking at 2 different kernel sources in a rather hazardous way because the trivial patch with hardcoded values doesn't work at all for me:
diff --git a/drivers/video/msm/mdss/mdss_fb.c b/drivers/video/msm/mdss/mdss_fb.c
index b37fd1e07ac1..1f091a261d22 100644
--- a/drivers/video/msm/mdss/mdss_fb.c
+++ b/drivers/video/msm/mdss/mdss_fb.c
@@ -2668,7 +2668,7 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
var->left_margin = panel_info->lcdc.h_back_porch;
var->right_margin = panel_info->lcdc.h_front_porch;
var->hsync_len = panel_info->lcdc.h_pulse_width;
- var->pixclock = panel_info->clk_rate / 1000;
+ var->pixclock = 1000000 / 60;
/*
* Store the cont splash state in the var reserved[3] field.
By applying the attached patch I've got consistent correct values of 63Hz for xorg-server framebuffer. Sadly it didn't solve my main problem that is xserver miserably segfaulting with the xf86-video-freedreno driver I've compiled, if there are any gurus around here that could give me some clues how to debug this... BTW.: if there is some interest I can try to push xf86-video-freedreno to git.