{
struct device_node *np = lcdc_dev->dev->of_node;
int val;
- int mirror;
if (of_property_read_u32(np, "rockchip,prop", &val))
lcdc_dev->prop = PRMRY; /*default set it as primary */
else
lcdc_dev->prop = val;
- if (of_property_read_u32(np, "rockchip,mirror", &val))
- mirror = NO_MIRROR;
- else
- mirror = val;
-
- if (mirror == NO_MIRROR) {
- lcdc_dev->driver.screen0->x_mirror = 0;
- lcdc_dev->driver.screen0->y_mirror = 0;
- } else if (mirror == X_MIRROR) {
- lcdc_dev->driver.screen0->x_mirror = 1;
- lcdc_dev->driver.screen0->y_mirror = 0;
- } else if (mirror == Y_MIRROR) {
- lcdc_dev->driver.screen0->x_mirror = 0;
- lcdc_dev->driver.screen0->y_mirror = 1;
- } else if (mirror == X_Y_MIRROR) {
- lcdc_dev->driver.screen0->x_mirror = 1;
- lcdc_dev->driver.screen0->y_mirror = 1;
- }
-
if (of_property_read_u32(np, "rockchip,cabc_mode", &val))
lcdc_dev->driver.cabc_mode = 0; /* default set close cabc */
else
static int init_lcdc_device_driver(struct rk_fb *rk_fb,
struct rk_lcdc_win *def_win, int index)
{
+ u32 mirror = 0;
struct rk_lcdc_driver *dev_drv = rk_fb->lcdc_dev_drv[index];
struct rk_screen *screen = devm_kzalloc(dev_drv->dev,
sizeof(struct rk_screen),
screen->overscan.top = 100;
screen->overscan.right = 100;
screen->overscan.bottom = 100;
+ if (of_property_read_u32(dev_drv->dev->of_node, "rockchip,mirror", &mirror))
+ mirror = NO_MIRROR;
+
+ screen->x_mirror = mirror & X_MIRROR;
+ screen->y_mirror = mirror & Y_MIRROR;
+
dev_drv->screen0 = screen;
dev_drv->cur_screen = screen;
/* devie use one lcdc + rk61x scaler for dual display */