Git Product home page Git Product logo

glodroid_tests's People

Contributors

rsglobal avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

rsglobal andyshrk

glodroid_tests's Issues

[WIP] Allwinner DE2.0/DE3.0 mixer clock smart selection to both save power consumption and protect against mixer misuse

Currently mixer clock is always set to maximum, which affects power consumption.
Also in certain conditions mixer can produce damaged output.

How to play with pixel clock (can potentially damage the hardware, don't try if you're not ready to lose it):
Pixel clock divider control registers are located at 0x100000C address

Bits:

  • bits 3-0 - Mixer 0 divider
  • bits 7-4 - Mixer 1 divider

Values:

  • 0 - base freq / 1
  • 1 - base freq / 2

and so on

Bash example (divide base freq by 4. On OPI3 it does mean 600Mhz/4 = 150MHz):

devmem 0x100000C 32 0x3

It's safe to reduce mixer clock (MClk) down to pixel clock (PClk) once hardware down-scaling isn't used
Up-scaling does not require clocking the module faster than pixel clock.

Down-scaling has some limitation (Tested with RGBA8888):

Vertical VI downscaling up to 2x require MClk=2*PClk
Vertical VI downscaling up to 16x require MClk=4*PClk
Horizontal VI downscaling up to 4x require MClk=2*PClk
Horizontal VI downscaling up to 8x require MClk=4*PClk
Horizontal VI downscaling up to 16x require MClk=4*PClk
(TODO: Distinguish between fine/coarse modes)

Vertical UI downscaling up to 2x require MClk=2*PClk
Vertical UI downscaling up to 4x require MClk=4*PClk
Vertical UI downscaling up to 8x require MClk=8*PClk !!!
Vertical UI downscaling up to 16x require MClk=24*PClk !!!
Horizontal UI downscaling up to 4x require MClk=2*PClk
Horizontal UI downscaling up to 8x require MClk=4*PClk

Exceeding these values will cause damaged picture output and in some cases pipeline can freeze.

Power consumption measurements:

  • H6 SOC, 1920x1080@60 mode (PClk=148.5MHz, single-plane FB console case)
    Without changing the mixer clock (600MHz): 0.38A
    After changing the mixer clock (150MHz): 0.36A

  • H6 SOC, 640x480@60 mode (PClk=25.2MHz, modetest test pattern case)
    Without vhanging the mixer clock (600MHz) 0.35A
    After changing the mixer clock (37.5MHz): 0.33A

Stress testing to ensure it's safe to switch the divider while mixer is doing the work:

while true ; do devmem 0x100000c 4 0x1 ; devmem 0x100000c 4 0x0 ; done

sun8i alpha-related issues

  1. Most bottom layer alpha doesn't work
    Test source code: Link
alpha_most_bottom_broken.mp4
  1. Multi-stage blending result is invalid
    Test source code: Link
alpha_overlap_broken.mp4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.