motorola-cedric: fix X11 framebuffer (!187)
This patch fixes Xorg. Adapted from the Xiaomi A1. [skip ci]: already built successfully in CI
This commit is contained in:
parent
9be5be7123
commit
4346402695
2 changed files with 100 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
pkgname="linux-motorola-cedric"
|
pkgname="linux-motorola-cedric"
|
||||||
pkgver=3.18.49
|
pkgver=3.18.49
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
pkgdesc="Motorola Moto G5 kernel fork"
|
pkgdesc="Motorola Moto G5 kernel fork"
|
||||||
arch="aarch64"
|
arch="aarch64"
|
||||||
_carch="arm64"
|
_carch="arm64"
|
||||||
|
@ -28,6 +28,7 @@ source="
|
||||||
03_fix_rndis_ipa_trace_header_not_found.patch
|
03_fix_rndis_ipa_trace_header_not_found.patch
|
||||||
05_fix_u_f_header.patch
|
05_fix_u_f_header.patch
|
||||||
06_fix_usb_gadget_function.patch
|
06_fix_usb_gadget_function.patch
|
||||||
|
fb-fixed.patch
|
||||||
"
|
"
|
||||||
builddir="$srcdir/${_repository}-${_commit}"
|
builddir="$srcdir/${_repository}-${_commit}"
|
||||||
|
|
||||||
|
@ -74,4 +75,5 @@ sha512sums="706b37cf09d23abab80ba6e8dfbd8c806e4ecb4c3a31f0b0b5ba7ac29c7922716c46
|
||||||
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
||||||
9c549714f03c7a7666e8aa7508a48cfdccab7cf3e97fb59c4df8fa97f75492365926f82c4a677c50780d68d4905504dcccbdd6de6344bd8d4b88b2331933ed46 03_fix_rndis_ipa_trace_header_not_found.patch
|
9c549714f03c7a7666e8aa7508a48cfdccab7cf3e97fb59c4df8fa97f75492365926f82c4a677c50780d68d4905504dcccbdd6de6344bd8d4b88b2331933ed46 03_fix_rndis_ipa_trace_header_not_found.patch
|
||||||
b408f157cc025d410b38f5aee9be977e670e1ac3f195f6c3a6681446fa0c3887067d62a4f729cfcd058fab42fca355b0265764dc2d21515f6e023ed025f55d41 05_fix_u_f_header.patch
|
b408f157cc025d410b38f5aee9be977e670e1ac3f195f6c3a6681446fa0c3887067d62a4f729cfcd058fab42fca355b0265764dc2d21515f6e023ed025f55d41 05_fix_u_f_header.patch
|
||||||
1f23466d1a864f2d2c67ae4250b0c166ecb7755779bbdad6732808a001cc2826cc1d013c2281d2ca1d5abd7d60d13783f0b9f11bb8359971f2b30b911e627220 06_fix_usb_gadget_function.patch"
|
1f23466d1a864f2d2c67ae4250b0c166ecb7755779bbdad6732808a001cc2826cc1d013c2281d2ca1d5abd7d60d13783f0b9f11bb8359971f2b30b911e627220 06_fix_usb_gadget_function.patch
|
||||||
|
99a3fda1246449b64d5be7cafeb287a04c234dcb3e7c8617d2aa31442974bf8788857b4935a6000fc157542f713ec253718133b92caab8932d808a760e3b667a fb-fixed.patch"
|
||||||
|
|
96
device/linux-motorola-cedric/fb-fixed.patch
Normal file
96
device/linux-motorola-cedric/fb-fixed.patch
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
diff -r -u mdss/mdss_fb.c android_kernel_motorola_msm8937/drivers/video/msm/mdss/mdss_fb.c
|
||||||
|
--- mdss/mdss_fb.c 2019-01-24 20:56:07.984371000 +0100
|
||||||
|
+++ android_kernel_motorola_msm8937/drivers/video/msm/mdss/mdss_fb.c 2019-01-24 21:06:44.513242695 +0100
|
||||||
|
@@ -1962,7 +1962,7 @@
|
||||||
|
if (is_panel_split(mfd) && pdata->next)
|
||||||
|
mdss_fb_validate_split(pdata->panel_info.xres,
|
||||||
|
pdata->next->panel_info.xres, mfd);
|
||||||
|
- mdss_panelinfo_to_fb_var(panel_info, var);
|
||||||
|
+ mdss_panelinfo_to_fb_var(mfd);
|
||||||
|
if (mdss_fb_send_panel_event(mfd, MDSS_EVENT_CHECK_PARAMS,
|
||||||
|
panel_info))
|
||||||
|
pr_err("Failed to send panel event CHECK_PARAMS\n");
|
||||||
|
@@ -2077,7 +2077,7 @@
|
||||||
|
* programmed in the controller.
|
||||||
|
* Update this info in the upstream structs.
|
||||||
|
*/
|
||||||
|
- mdss_panelinfo_to_fb_var(panel_info, var);
|
||||||
|
+ mdss_panelinfo_to_fb_var(mfd);
|
||||||
|
|
||||||
|
/* Start the work thread to signal idle time */
|
||||||
|
if (mfd->idle_time)
|
||||||
|
@@ -2807,7 +2807,7 @@
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
- mdss_panelinfo_to_fb_var(panel_info, var);
|
||||||
|
+ mdss_panelinfo_to_fb_var(mfd);
|
||||||
|
|
||||||
|
fix->type = panel_info->is_3d_panel;
|
||||||
|
if (mfd->mdp.fb_stride)
|
||||||
|
@@ -3512,7 +3512,7 @@
|
||||||
|
}
|
||||||
|
var->xres_virtual = var->xres;
|
||||||
|
var->yres_virtual = pinfo->yres * mfd->fb_page;
|
||||||
|
- mdss_panelinfo_to_fb_var(pinfo, var);
|
||||||
|
+ mdss_panelinfo_to_fb_var(mfd);
|
||||||
|
}
|
||||||
|
|
||||||
|
int mdss_fb_atomic_commit(struct fb_info *info,
|
||||||
|
@@ -3731,9 +3731,14 @@
|
||||||
|
pinfo->mipi.dsi_pclk_rate = pinfo->clk_rate;
|
||||||
|
}
|
||||||
|
|
||||||
|
-void mdss_panelinfo_to_fb_var(struct mdss_panel_info *pinfo,
|
||||||
|
- struct fb_var_screeninfo *var)
|
||||||
|
+void mdss_panelinfo_to_fb_var(struct msm_fb_data_type *mfd)
|
||||||
|
{
|
||||||
|
+ if (!mfd)
|
||||||
|
+ return -EINVAL;
|
||||||
|
+
|
||||||
|
+ struct mdss_panel_info *pinfo = mfd->panel_info;
|
||||||
|
+ struct fb_info *fbi = mfd->fbi;
|
||||||
|
+ struct fb_var_screeninfo *var = &fbi->var;
|
||||||
|
u32 frame_rate;
|
||||||
|
|
||||||
|
var->xres = mdss_fb_get_panel_xres(pinfo);
|
||||||
|
@@ -3767,7 +3772,14 @@
|
||||||
|
if (pinfo->physical_height)
|
||||||
|
var->height = pinfo->physical_height;
|
||||||
|
|
||||||
|
- pr_debug("ScreenInfo: res=%dx%d [%d, %d] [%d, %d]\n",
|
||||||
|
+ //Hack to update current fbi->mode according to fbi->var when var is updated from panel info
|
||||||
|
+ if (fbi->mode) {
|
||||||
|
+ printk("Updating mdss fb mode from fb var\n");
|
||||||
|
+ fb_var_to_videomode(fbi->mode, var);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ printk("ScreenInfo: res=%dx%d [%d, %d] [%d, %d]\n",
|
||||||
|
+
|
||||||
|
var->xres, var->yres, var->left_margin,
|
||||||
|
var->right_margin, var->upper_margin,
|
||||||
|
var->lower_margin);
|
||||||
|
diff -r -u mdss/mdss_fb.h android_kernel_motorola_msm8937/drivers/video/msm/mdss/mdss_fb.h
|
||||||
|
--- mdss/mdss_fb.h 2019-01-24 20:56:07.984371000 +0100
|
||||||
|
+++ android_kernel_motorola_msm8937/drivers/video/msm/mdss/mdss_fb.h 2019-01-24 21:07:52.105682759 +0100
|
||||||
|
@@ -449,6 +449,5 @@
|
||||||
|
|
||||||
|
u32 mdss_fb_get_mode_switch(struct msm_fb_data_type *mfd);
|
||||||
|
void mdss_fb_report_panel_dead(struct msm_fb_data_type *mfd);
|
||||||
|
-void mdss_panelinfo_to_fb_var(struct mdss_panel_info *pinfo,
|
||||||
|
- struct fb_var_screeninfo *var);
|
||||||
|
+void mdss_panelinfo_to_fb_var(struct msm_fb_data_type *mfd);
|
||||||
|
#endif /* MDSS_FB_H */
|
||||||
|
diff -r -u mdss/mdss_mdp_overlay.c android_kernel_motorola_msm8937/drivers/video/msm/mdss/mdss_mdp_overlay.c
|
||||||
|
--- mdss/mdss_mdp_overlay.c 2019-01-24 20:56:08.004371000 +0100
|
||||||
|
+++ android_kernel_motorola_msm8937/drivers/video/msm/mdss/mdss_mdp_overlay.c 2019-01-24 21:08:47.682038150 +0100
|
||||||
|
@@ -2982,7 +2982,7 @@
|
||||||
|
* data, so any further call to get the screen
|
||||||
|
* info has the updated timings.
|
||||||
|
*/
|
||||||
|
- mdss_panelinfo_to_fb_var(&pdata->panel_info, var);
|
||||||
|
+ mdss_panelinfo_to_fb_var(mfd);
|
||||||
|
|
||||||
|
MDSS_XLOG(dfps);
|
||||||
|
mutex_unlock(&mdp5_data->dfps_lock);
|
||||||
|
|
Loading…
Reference in a new issue