exynos4: hwc: fix FIMC colour format selection

Change-Id: I67bc79f57cc85f428dea7d16ffccb70a1ae646ac
This commit is contained in:
Simon Shields 2017-10-13 15:03:44 +11:00 committed by Shilin Victor
parent 5a7136339c
commit d3e5b2f802

View file

@ -1001,7 +1001,6 @@ static int post_fimd(hwc_context_t *ctx, hwc_display_contents_1_t* contents)
if (win.dst_buf[win.current_buf]) {
//use geometry of layer.handle and overwrite the rest
config_handle(ctx, layer, config[window]);
config[window].format = S3C_FB_PIXEL_FORMAT_BGRA_8888;
private_handle_t* dst_hnd = private_handle_t::dynamicCast(win.dst_buf[win.current_buf]);
config[window].phys_addr = dst_hnd->paddr;
@ -1024,8 +1023,13 @@ static int post_fimd(hwc_context_t *ctx, hwc_display_contents_1_t* contents)
if (win.dst_buf[win.current_buf]) {
//use geometry of layer.handle and overwrite the rest
config_handle(ctx, layer, config[window]);
config[window].format = S3C_FB_PIXEL_FORMAT_RGBA_8888;
if (format_is_supported(hnd->format)) {
// FIMC isn't doing colour conversion
// we will get RGBA output
config[window].format = S3C_FB_PIXEL_FORMAT_RGBA_8888;
} else {
config[window].format = S3C_FB_PIXEL_FORMAT_BGRA_8888;
}
private_handle_t* dst_hnd = private_handle_t::dynamicCast(win.dst_buf[win.current_buf]);
config[window].phys_addr = dst_hnd->paddr;
config[window].offset = 0;