This project is mirrored from https://:*****@github.com/freemarkw/android_kernel_xiaomi_msm8953.git. Updated .
  1. 01 Aug, 2019 4 commits
  2. 31 Jul, 2019 2 commits
  3. 10 Jul, 2019 3 commits
  4. 05 Jul, 2019 1 commit
  5. 04 Jul, 2019 24 commits
    • Razziell's avatar
      defconfig: enable KLAPSE · 891e0ba0
      Razziell authored
      891e0ba0
    • Joshua Primero's avatar
    • engstk's avatar
      KLAPSE: change path to build with new v5.0 · 51e5db12
      engstk authored
      Signed-off-by: default avatarengstk <eng.stk@sapo.pt>
      51e5db12
    • tanish2k09's avatar
      cb2b3405
    • Tanish's avatar
      KLAPSE : Fix prototype warn · ab49cad3
      Tanish authored
      ab49cad3
    • tanish2k09's avatar
      KLAPSE : Make default flow_freq value configurable at compile time from klapse.h · 0cf17337
      tanish2k09 authored
      - NOTE : Flow freq is a device-dependent timeout value. It depends on how fast KCAL reacts to a change in values, or in other words, how fast can you change colors in KCAL without having them not appear on screen (aka "RGB frame skips")
       - NOTE : Flow freq should be reduced if KCAL reacts faster, left at 360 is unsure, increased for very high latencies (usually in MDSS)
       - NOTE : Flow freq can be changed at runtime as well, so developers can find the perfect value that isn't too slow and isn't too sudden either
       - NOTE : Flow freq is 360 (ms) by default, because of my testing on OnePlus 6 (enchilada) on stock ROM with custom display calibration
       - NOTE : More GPU pulses can help most devices refresh KCAL faster, and indirectly "flow" smoother
      0cf17337
    • tanish2k09's avatar
      K-lapse v5.0 · 4af9ad1d
      tanish2k09 authored
      - Introducing k-lapse "flow", a brightness-based scaling mode QOL enhancement that scales RGB points by 1 smoothly instant of instantly taking effect
      - Major code refactor to better match the Linux Kernel coding style (huge thanks to kdrag0n for initial overall patch and general guidance)
      - Switched from SYS ATTR to module_param_cb and kernel param structs
      - Shortened the code from 1k lines to 0.6k without compromising any logic or feature
      - Changed tunable naming for sysfs to convey the idea of the function in a better way
      - Added minute-level support for automation. Yes, you can now start or stop at, say 16:49
      - Dimmer factor (previously known as brightness_factor) is now allowed to be set as a percentage value, ranging from 10 to 100
      - Updated README documentation to match v5.0 release
      - Integrated MDSS code with a switch in klapse.h (see kcal-mdss-demo branch for full implementation in older version)
      - Changed some default config values
      - Revised dimmer logic to fix "dimmer value multiplicative effect" for some users. The issue was changing brightness_factor values multiple times stacked them on top of each other, eventually causing the RGB to hit their minimum limit (usually 20 in KCAL), and not being able to restore full RGB without a pulse
      - (self tag for notification?) @ tanish2k09
      4af9ad1d
    • tanish2k09's avatar
      K-lapse: initial implementation for MDSS kcal · 1f752d91
      tanish2k09 authored
      1f752d91
    • flar2's avatar
      msm: mdss: KCAL: disable igc update · e689ebea
      flar2 authored
      e689ebea
    • Razziell's avatar
      Revert "msm: mdss: KCAL: Send a pp display commit when changes are made" · 0c50defc
      Razziell authored
      This reverts commit 5b5b489e.
      0c50defc
    • Razziell's avatar
      Revert "msm: mdss: KCAL: disable igc update" · 2f7c6342
      Razziell authored
      This reverts commit 12322912.
      2f7c6342
    • Razziell's avatar
      Revert "drivers: disbale kcal by default and updates" · 0a2089d1
      Razziell authored
      This reverts commit 9b1f94bf.
      
      # Conflicts:
      #	drivers/video/msm/mdss/Kconfig
      0a2089d1
    • Razziell's avatar
      Revert "video: mdss: LiveDisplay driver" · 8a25149f
      Razziell authored
      This reverts commit 17ba4571.
      
      # Conflicts:
      #	drivers/video/msm/mdss/Makefile
      #	drivers/video/msm/mdss/mdss_fb.c
      8a25149f
    • Razziell's avatar
      f5da5b6d
    • flar2's avatar
      KLAPSE: adapt for markw · ac77af21
      flar2 authored
      Signed-off-by: default avatarsrfarias <erikofarias@gmail.com>
      Signed-off-by: Amar Bajpai's avataramarbajpai <bajpai.amar3@gmail.com>
      (cherry picked from commit afae0a1365afd5d6b0d07371b0f80fc352eb2ee8)
      ac77af21
    • tanish2k09's avatar
      KLAPSE v4.3 : Bug fixes and thread-safe improvements · bfa7bf71
      tanish2k09 authored
      - Fixed the issue where brightness_factor_auto_enable would keep decreasing brightness on repeated switching, thanks to @flar2 for reporting
      - Fixed the issue with fadeback_minutes not taking into account enable_klapse
      - Made pretty much all tunables more thread-safe parallel to the kernel-timer by using flush and pulse where applicable
      bfa7bf71
    • tanish2k09's avatar
      39f1f0d8
    • tanish2k09's avatar
      KLAPSE v4.2 · 38fda39e
      tanish2k09 authored
      - Modify klapse_scaling_rate to use a minute value instead of a numeric factor, now more intuitive. Suggestion credit to @flar2
      - Fix an issue with brightness_factor where increasing the value would dim the colors further until the next pulse. (brightness_factor without pulse fixes it at the cost of a maximum error of 1 RGB value)
      38fda39e
    • tanish2k09's avatar
    • tanish2k09's avatar
      c501ac91
    • tanish2k09's avatar
    • tanish2k09's avatar
      KLAPSE v4.1 : Add more dynamicity · 2bd2857c
      tanish2k09 authored
      - Reverted daytime and target rgb sets back to original split r,g,b sysfs nodes for easier interaction in kernel managers
      - Added more dynamicity by renewing a pulse after any relevant variable update from sysfs
      - Fixed a bug where changing brightness_factor would need a pulse to apply effect
      - Tweaked default pulse_freq and fadeback_minutes values
      - Optimised an if condition in klapse_pulse
      2bd2857c
    • tanish2k09's avatar
      Introducing KLapse - A kernel level livedisplay module v4.0 · 3ba30a61
      tanish2k09 authored
      Author: @ tanish2k09 (email: tanish2k09.dev@gmail.com)
      
      What is it?
      Kernel-based Lapse ("K-Lapse") is a linear RGB scaling module that 'shifts' RGB based on time (of the day/selected by user), or (since v2.0) brightness. This concept is inspired from
      LineageOS (formerly known as 'CyanogenMod') ROM's feature "livedisplay" which also changes the display settings (RGB, hue, temperature, etc) based on time.
      
      Why did you decide to make this? (Tell me a story).
      I (personally) am a big fan of the livedisplay feature found on LineageOS ROM. I used it every single day, since Android Lollipop. Starting from Android Nougat, a native night mode
      solution was added to AOSP and it felt like livedisplay was still way superior, thanks to its various options (you could say it spoiled me, sure). I also maintained a kernel (Venom
      kernel) for the device I was using at that time. It was all good until the OEM dropped support for the device at Android M, and XDA being XDA, was already working on N ROMs. The issue
      was, these ROMs weren't LineageOS or based on it, so livedisplay was... gone. I decided I'll try to bring that feature to every other ROM. How would I do that? Of course! The kernel! It
      worked on every single ROM, it was the key! I started to work on it ASAP and here it is, up on GitHub, licensed under GPL (check klapse.c), open to everyone :)
      
      How does it work?
      Think of it like a fancy night mode, but not really. Klapse is dependent on an RGB interface (like Gamma on MTK and KCAL on SD chipsets). It fetches time from the kernel, converts it to
      local time, and selects and RGB set based on the time. The result is really smooth shifting of RGB over time.
      
      How does it really work (dev)?
      Klapse mode 1 (time-based scaling) uses a method void klapse_pulse(void) that should ideally be called every minute. This can be done by injecting a pulse call inside another method that
      is called repeatedly naturally, like cpufreq or atomic or frame commits. It can be anything, whatever you like, even a kthread, as long as it is called repeatedly naturally. To execute
      every 60 seconds, use jiffies or ktime, or any similar method. The pulse function fetches the current time and makes calculations based on the current hour and the values of the tunables
      listed down below.
      
      Klapse mode 2 (brightness-based scaling) uses a method void set_rgb_slider(<type> bl_lvl) where is the data type of the brightness level used in your kernel source. (OnePlus 6 uses u32
      data type for bl_lvl) set_rgb_slider needs to be called/injected inside a function that sets brightness for your device. (OnePlus 6 uses dsi_panel.c for that, check out the diff for that
      file in /op6)
      
      What all stuff can it do?
      
      1, Emulate night mode with the proper RGB settings
      2, Smoothly scale from one set of RGB to another set of RGB in integral intervals over time.
      3, Reduce perceived brightness using brightness_factor by reducing the amount of color on screen. Allows lower apparent brightness than system permits.
      4, Scale RGB based on brightness of display (low brightness usually implies a dark environment, where yellowness is probably useful).
      5, Automate the perceived brightness independent of whether klapse is enabled, using its own set of start and stop hours.
      6, Be more efficient,faster by residing inside the kernel instead of having to use the HWC HAL like android's night mode.
      7, (On older devices) Reduce stuttering or frame lags caused by native night mode.
      8, An easier solution against overlay-based apps that run as service in userspace/Android and sometimes block apps asking for permissions.
      9, Give you a Livedisplay alternative if it doesn't work in your ROM.
      10, Impress your crush so you can get a date (Hey, don't forget to credit me if it works).
      
      Alright, so this is a replacement for night mode?
      NO! Not at all. One can say this is merely an alternative for LineageOS' Livedisplay, but inside a kernel. Night mode is a sub-function of both Livedisplay and KLapse. Most comparisons
      here were made with night mode because that's what an average user uses, and will relate to the most. There is absolutely no reason for your Android kernel to not have KLapse. Go ahead
      and add it or ask your kernel maintainer to. It's super-easy!
      
      What can it NOT do (yet)?
      
      1, Calculate scaling to the level of minutes, like "Start from 5:37pm till 7:19am". --TODO
      2, Make coffee for you.
      3, Fly you to the moon. Without a heavy suit.
      4, Get you a monthly subscription of free food, cereal included.
      
      All these following tunables are found in their respective files in /sys/klapse/
      
      1. enable_klapse : A switch to enable or disable klapse. Values : 0 = off, 1 = on (since v2.0, 2 = brightness-dependent mode)
      2. klapse_start_hour : The hour at which klapse should start scaling the RGB values from daytime to target (see next points). Values : 0-23
      3. klapse_stop_hour : The hour by which klapse should scale back the RGB values from target to daytime (see next points). Values : 0-23
      4. daytime_rgb : The RGB set that must be used for all the time outside of start and stop hour range.
      5. target_rgb : The RGB set that must be scaled towards for all the time inside of start and stop hour range.
      6. klapse_scaling_rate : Controls how soon the RGB reaches from daytime to target inside of start and stop hour range. Once target is reached, it remains constant till 30 minutes before
         stop hour, where target RGB scales back to daytime RGB.
      7. brightness_factor : From the name itself, this value has the ability to bend perception and make your display appear as if it is at a lesser brightness level than it actually is at.
         It works by reducing the RGB values by the same factor. Values : 2-10, (10 means accurate brightness, 5 means 50% of current brightness, you get it)
      8. brightness_factor_auto : A switch that allows you to automatically set the brightness factor in a set time range. Value : 0 = off, 1 = on
      9. brightness_factor_auto_start_hour : The hour at which brightness_factor should be applied. Works only if #8 is 1. Values : 0-23
      10. brightness_factor_auto_stop_hour : The hour at which brightness_factor should be reverted to 10. Works only if #8 is 1. Values : 0-23
      11. backlight_range : The brightness range within which klapse should scale from daytime to target_rgb. Works only if #1 is 2. Values : MIN_BRIGHTNESS-MAX_BRIGHTNESS
      3ba30a61
    • Razziell's avatar
      DTS: cleaned up USB type C - related code · ab301e23
      Razziell authored
      [    2.478155] TYPEC: set_property_on_battery: no batt psy found
      [    2.478161] TYPEC: qpnp_typec_handle_detach: failed to set TYPEC MODE on battery psy rc=-19
      [    2.478167] TYPEC: ufp_detach_handler: failed to handle UFP detach rc=-19
      [    2.478438] TYPEC: set_property_on_battery: no batt psy found
      [    2.478443] TYPEC: ufp_detect_handler: failed to set TYPEC MODE on battery psy rc=-19
      [    2.478707] TYPEC: set_property_on_battery: no batt psy found
      [    2.478712] TYPEC: qpnp_typec_handle_detach: failed to set TYPEC MODE on battery psy rc=-19
      [    2.478717] TYPEC: dfp_detach_handler: failed to handle DFP detach rc=-19
      [    2.479145] TYPEC: set_property_on_battery: no batt psy found
      [    2.479150] TYPEC: qpnp_typec_handle_detach: failed to set TYPEC MODE on battery psy rc=-19
      [    2.479155] TYPEC: vbus_err_handler: failed to handle VBUS_ERR rc==-19
      [    2.479413] TYPEC: vconn_oc_handler: vconn oc triggered
      [    2.479460] TYPEC: qpnp_typec_probe: TypeC successfully probed state=0 CC-line-state=2
      ab301e23
  6. 02 Jul, 2019 3 commits
  7. 28 Jun, 2019 2 commits
  8. 24 Jun, 2019 1 commit