Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 4.52 KB | None | 0 0
  1. *************** static int s3cfb_probe(struct platform_d
  2. *** 1261,1267 ****
  3. --- 1309,1317 ----
  4.     }
  5.  
  6.     fbdev->dev = &pdev->dev;
  7. + #if defined(CONFIG_MACH_S5PC110_ARIES)
  8.     s3cfb_set_lcd_info(fbdev);
  9. + #endif
  10.  
  11.     /* gpio */
  12.     pdata = to_fb_plat(&pdev->dev);
  13. *************** static int s3cfb_probe(struct platform_d
  14. *** 1269,1278 ****
  15.   #if defined(CONFIG_MACH_S5PC110_P1)
  16.     fbdev->lcd = (struct s3cfb_lcd*)pdata->lcd;
  17.   #endif
  18. ! //#if !defined(CONFIG_MACH_S5PC110_ARIES)
  19.     if (pdata->cfg_gpio)
  20.         pdata->cfg_gpio(pdev);
  21. ! //#endif  /* CONFIG_MACH_S5PC110_ARIES */
  22.     if (pdata->clk_on)
  23.         pdata->clk_on(pdev, &fbdev->clock);
  24.  
  25. --- 1319,1328 ----
  26.   #if defined(CONFIG_MACH_S5PC110_P1)
  27.     fbdev->lcd = (struct s3cfb_lcd*)pdata->lcd;
  28.   #endif
  29. ! #if !defined(CONFIG_MACH_S5PC110_ARIES)
  30.     if (pdata->cfg_gpio)
  31.         pdata->cfg_gpio(pdev);
  32. ! #endif    /* CONFIG_MACH_S5PC110_ARIES */
  33.     if (pdata->clk_on)
  34.         pdata->clk_on(pdev, &fbdev->clock);
  35.  
  36. *************** static int s3cfb_probe(struct platform_d
  37. *** 1301,1308 ****
  38. --- 1351,1360 ----
  39.         goto err_io;
  40.     }
  41.  
  42. + #ifdef CONFIG_FB_S3C_MDNIE
  43.     fbdev->wq_count = 0;
  44.     init_waitqueue_head(&fbdev->wq);
  45. + #endif
  46.    
  47.     /* irq */
  48.     fbdev->irq = platform_get_irq(pdev, 0);
  49. *************** static int s3cfb_probe(struct platform_d
  50. *** 1312,1321 ****
  51. --- 1364,1375 ----
  52.         ret = -EINVAL;
  53.         goto err_irq;
  54.     }
  55. + #if 1
  56.     // added by jamie (2009.08.18)
  57.     // enable VSYNC
  58.     s3cfb_set_vsync_interrupt(fbdev, 1);
  59.     s3cfb_set_global_interrupt(fbdev, 1);
  60. + #endif
  61.  
  62.   #ifdef CONFIG_FB_S3C_TRACE_UNDERRUN
  63.     if (request_irq(platform_get_irq(pdev, 1), s3cfb_irq_fifo,
  64. *************** static int s3cfb_probe(struct platform_d
  65. *** 1328,1334 ****
  66. --- 1382,1390 ----
  67.     s3cfb_set_fifo_interrupt(fbdev, 1);
  68.     dev_info(fbdev->dev, "fifo underrun trace\n");
  69.   #endif
  70. + #ifdef CONFIG_FB_S3C_MDNIE
  71.     s3c_mdnie_setup();
  72. + #endif
  73.  
  74.     /* init global */
  75.     s3cfb_init_global();
  76. *************** static int s3cfb_probe(struct platform_d
  77. *** 1341,1363 ****
  78.         goto err_alloc;
  79.  
  80.     s3cfb_set_clock(fbdev);
  81.      mDNIe_Mode_Set();
  82.     s3cfb_enable_window(pdata->default_win);
  83.  
  84.     s3cfb_display_on(fbdev);
  85.  
  86.     /* panel control */
  87.  
  88.     fbdev->early_suspend.suspend = s3cfb_early_suspend;
  89.     fbdev->early_suspend.resume = s3cfb_late_resume;
  90.     fbdev->early_suspend.level = EARLY_SUSPEND_LEVEL_DISABLE_FB;
  91.     //if, is in USER_SLEEP status and no active auto expiring wake lock
  92.     //if (has_wake_lock(WAKE_LOCK_SUSPEND) == 0 && get_suspend_state() == PM_SUSPEND_ON)
  93.     register_early_suspend(&fbdev->early_suspend);
  94. !           ret = device_create_file(&(pdev->dev), &dev_attr_lcd_power);
  95. !   if (ret < 0)
  96. !       printk(KERN_WARNING "s3cfb: failed to add dev_attr_lcd_power\n");
  97. !
  98.  
  99.     ret = device_create_file(&(pdev->dev), &dev_attr_win_power);
  100.     if (ret < 0)
  101. --- 1397,1435 ----
  102.         goto err_alloc;
  103.  
  104.     s3cfb_set_clock(fbdev);
  105. + #ifdef CONFIG_FB_S3C_MDNIE
  106.      mDNIe_Mode_Set();
  107. + #endif
  108.     s3cfb_enable_window(pdata->default_win);
  109.  
  110.     s3cfb_display_on(fbdev);
  111.  
  112. + #ifdef CONFIG_FB_S3C_LCD_INIT
  113.     /* panel control */
  114.  
  115. + #if !defined(CONFIG_MACH_S5PC110_ARIES)
  116. + #if defined(CONFIG_FB_S3C_TL2796)
  117. +   if (pdata->backlight_on)
  118. +       pdata->backlight_on(pdev);
  119. + #elif defined(CONFIG_FB_S3C_LTE480WV)
  120. +   if (pdata->backlight_onoff)
  121. +       pdata->backlight_onoff(pdev, 1);
  122. + #endif
  123. +
  124. +   if (pdata->reset_lcd)
  125. +       pdata->reset_lcd(pdev);
  126. + #endif
  127. + #endif    /* CONFIG_MACH_S5PC110_ARIES */
  128. + #ifdef CONFIG_HAS_WAKELOCK
  129. + #ifdef CONFIG_HAS_EARLYSUSPEND
  130.     fbdev->early_suspend.suspend = s3cfb_early_suspend;
  131.     fbdev->early_suspend.resume = s3cfb_late_resume;
  132.     fbdev->early_suspend.level = EARLY_SUSPEND_LEVEL_DISABLE_FB;
  133.     //if, is in USER_SLEEP status and no active auto expiring wake lock
  134.     //if (has_wake_lock(WAKE_LOCK_SUSPEND) == 0 && get_suspend_state() == PM_SUSPEND_ON)
  135.     register_early_suspend(&fbdev->early_suspend);
  136. ! #endif
  137. ! #endif
  138.  
  139.     ret = device_create_file(&(pdev->dev), &dev_attr_win_power);
  140.     if (ret < 0)
  141. *************** static int s3cfb_probe(struct platform_d
  142. *** 1365,1370 ****
  143. --- 1437,1450 ----
  144.  
  145.     dev_info(fbdev->dev, "registered successfully\n");
  146.  
  147. + #if 0 //def CONFIG_CPU_FREQ
  148. +   fbdev->freq_transition.notifier_call = s3cfb_freq_transition;
  149. +   fbdev->freq_policy.notifier_call = s3cfb_freq_policy;
  150. +   cpufreq_register_notifier(&fbdev->freq_transition,
  151. +                       CPUFREQ_TRANSITION_NOTIFIER);
  152. +   cpufreq_register_notifier(&fbdev->freq_policy,
  153. +                       CPUFREQ_POLICY_NOTIFIER);
  154. + #endif
  155.  
  156.     return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement