Commit 727bd32d authored by alex@thinkpad's avatar alex@thinkpad
Browse files

VRAM: workaround from 03c5f4366259 apparently required only on 5D3 1.2.3 and has...

VRAM: workaround from 03c5f4366259 apparently required only on 5D3 1.2.3 and has some side effects (issue #2901)

To test: play Arkanoid right after powering up the camera, without going to PLAY mode or LiveView.
If you get artifacts in background, your camera requires this workaround.

--HG--
branch : lua_fix
parent 758ea1ddc911
......@@ -2716,20 +2716,45 @@ static void grayscale_menus_step()
prev_sig = sig;
if (get_yuv422_vram()->vram == 0 && !lv)
{
/* 5D3-123 quirk: YUV422 RAM is not initialized until going to LiveView or Playback mode
* (and even there, you need a valid image first)
* Workaround: if YUV422 was not yet initialized by Canon, remove the transparency from color 0 (make it black).
*
* Any other cameras requiring this? At least 6D shows artifacts in QEMU when running benchmarks
* or playing Arkanoid. 700D and 1100D also have uninitialized buffer. 550D and 600D are OK.
* No side effects on cameras that don't need this workaround => always enabled.
*
* Note: alter_bitmap_palette will not affect color 0, so it will not break this workaround (yet).
*/
alter_bitmap_palette_entry(0, COLOR_BLACK, 256, 256);
#ifdef CONFIG_5D3_123
if (!lv)
{
static int dirty = 0;
if (get_yuv422_vram()->vram == 0)
{
/* 5D3-123 quirk: YUV422 RAM is not initialized until going to LiveView or Playback mode
* (and even there, you need a valid image first)
* Workaround: if YUV422 was not yet initialized by Canon, remove the transparency from color 0 (make it black).
*
* Any other cameras requiring this?
* Probably not, since the quirk is likely related to the dual monitor support.
* 6D shows artifacts in QEMU when running benchmarks
* or playing Arkanoid, but apparently clean when running on hardware.
* 700D and 1100D also have uninitialized buffer.
* 700D and 5D3 1.1.3 do not show any artifacts at startup; 5D3 1.2.3 does.
* 550D and 600D are OK.
*
* Side effects: issue #2901.
*
* Note: alter_bitmap_palette will not affect color 0, so it will not break this workaround (yet).
*/
if (!dirty)
{
alter_bitmap_palette_entry(0, COLOR_BLACK, 256, 256);
dirty = 1;
}
}
else
{
/* undo our hack */
if (dirty)
{
alter_bitmap_palette_entry(0, 0, 256, 256);
dirty = 0;
}
}
}
#endif
if (bmp_color_scheme || prev_b)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment