{
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
enum of_gpio_flags flags;
u32 val = 0;
u32 debug = 0;
- u32 mirror = 0;
int ret;
INIT_LIST_HEAD(&dev_drv->pwrlist_head);
list_add_tail(&pwr_ctr->list, &dev_drv->pwrlist_head);
}
- of_property_read_u32(root, "rockchip,mirror", &mirror);
-
- if (mirror == NO_MIRROR) {
- dev_drv->screen0->x_mirror = 0;
- dev_drv->screen0->y_mirror = 0;
- } else if (mirror == X_MIRROR) {
- dev_drv->screen0->x_mirror = 1;
- dev_drv->screen0->y_mirror = 0;
- } else if (mirror == Y_MIRROR) {
- dev_drv->screen0->x_mirror = 0;
- dev_drv->screen0->y_mirror = 1;
- } else if (mirror == X_Y_MIRROR) {
- dev_drv->screen0->x_mirror = 1;
- dev_drv->screen0->y_mirror = 1;
- }
-
of_property_read_u32(root, "rockchip,debug", &debug);
if (debug) {