video: rockchip: lcdc: 3288/3368: read screen regs in uboot mode
authorZheng Yang <zhengyang@rock-chips.com>
Tue, 15 Sep 2015 03:38:21 +0000 (11:38 +0800)
committerGerrit Code Review <gerrit@rock-chips.com>
Wed, 16 Sep 2015 02:31:42 +0000 (10:31 +0800)
Change-Id: I36db50471140d041fd0220283bc4e6ce59ec9d74
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
drivers/video/rockchip/lcdc/rk3288_lcdc.c
drivers/video/rockchip/lcdc/rk3368_lcdc.c

index 112865f6f67d43c98684fd0fea558990f1d53089..83a4e460f5c5330f740684062488332d1e8f4bfe 100755 (executable)
@@ -343,6 +343,22 @@ static void lcdc_read_reg_defalut_cfg(struct lcdc_device *lcdc_dev)
                        case WIN0_CBR_MST:
                                win0->area[0].cbr_start = val;
                                break;
+                       case DSP_VACT_ST_END:
+                               if (support_uboot_display()) {
+                                       screen->mode.yres =
+                                       (val & 0x1fff) - ((val >> 16) & 0x1fff);
+                                       win0->area[0].ypos =
+                                       st_y - ((val >> 16) & 0x1fff);
+                               }
+                               break;
+                       case DSP_HACT_ST_END:
+                               if (support_uboot_display()) {
+                                       screen->mode.xres =
+                                       (val & 0x1fff) - ((val >> 16) & 0x1fff);
+                                       win0->area[0].xpos =
+                                       st_x - ((val >> 16) & 0x1fff);
+                               }
+                               break;
                        default:
                                break;
                }
index 0c37f2650b8f8dad969daf5c2f35584eb759dede..979234d31f04701c89cf47a5a351cbf03a29bde3 100755 (executable)
@@ -394,6 +394,22 @@ static void lcdc_read_reg_defalut_cfg(struct lcdc_device *lcdc_dev)
                case WIN0_CBR_MST:
                        win0->area[0].cbr_start = val;
                        break;
+               case DSP_VACT_ST_END:
+                       if (support_uboot_display()) {
+                               screen->mode.yres =
+                               (val & 0x1fff) - ((val >> 16) & 0x1fff);
+                               win0->area[0].ypos =
+                               st_y - ((val >> 16) & 0x1fff);
+                       }
+                       break;
+               case DSP_HACT_ST_END:
+                       if (support_uboot_display()) {
+                               screen->mode.xres =
+                               (val & 0x1fff) - ((val >> 16) & 0x1fff);
+                               win0->area[0].xpos =
+                               st_x - ((val >> 16) & 0x1fff);
+                       }
+                       break;
                default:
                        break;
                }