The framebuffer routines also work with the cea861 data. Move the edid reading
into the function itself, which avoids us having to read the EDID data multiple
times and allows us to pass the full EDID data to the framebuffer routines.
We always have to read the first block to determine the actual length of the
EDID data. In order to keep the reading logic the same all the time, we simply
re-read the EDID data always (even if there are no extension blocks). This
hopefully will help keep timing issues similar across all devices.
* fix bus frequency driver check for frequency (> instead of !=)
* fix VPU lockup due to misassigning a clock
* stop dvfs before reboots (otherwise it might not reboot)
* small cleanups in DVFS code for frequency changing and added spinlock
For timer based power autogating, we have to move clk_enable/disable out of
timer handler, because they become may sleep.
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
If GPU error interrupt detected, related device will be destroyed.
In the destory function, device_idle and mutex_lock may cause sleep,
which may cause kernel crash, so delay the device destroy to the
workqueue to avoid this.
Signed-off-by: Jie Zhou <b30303@freescale.com>
Cleanup the siihdmi header (which really is pointless to split out...), redefine
the fields for the sii info frame packets, and restructure sizes to be in terms
of registers.
The allocations are no longer done in the info frame setting, DVI can transmit
the info frames, and the cost is simply the i2c writes. This is an infrequent
operation, so just absorb the cost regardless of the connection type.
Use a proper edid structure definition rather than indexing into a data blob.
This also adds additional helper functions to work with the returned edid data.
There is much room for further improvements still. We should simply read the
first block, then use that to actually determine the number of blocks we need to
read from the device. We cant simply read all the potential blocks as that can
be up to 32K of data.
Once we are reading all the EDID extensions, we should iterate over the blocks
to find the CEA block rather than assuming that the device is sending the CEA
block as the first block (especially given that the VESA spec calls for block 1
to be an extension map if there are more than 1 block present).
bus_timeout depends somewhat on the output device for certain operations. As
such, it can be useful to actually change the value at runtime. To that end,
make the value a module parameter.
Bonus whitespace cleanups and centralises the value to a single location.
info frame checksumming is defined by the CEA861-E standard, and is not specific
to SII9xxx, so move that into the CEA861 header.
Don't bother allocating the info frame structures off the heap. That causes
unnecessary fragmentation and complexity. Allocate them off the stack as they
are small enough. This also helps keep everything simple.
As a bonus, fixed up the SII HDMI structures and the CEA861 InfoFrame structures
in the process as well. Also clean up the magic number in the AVI InfoFrame
assertion.