From patchwork Wed Dec 9 15:59:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 7809811 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 136FDBEEE1 for ; Wed, 9 Dec 2015 16:00:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 65588203C1 for ; Wed, 9 Dec 2015 16:00:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AABF2204AE for ; Wed, 9 Dec 2015 16:00:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751687AbbLIQAa (ORCPT ); Wed, 9 Dec 2015 11:00:30 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:34784 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751199AbbLIQA3 (ORCPT ); Wed, 9 Dec 2015 11:00:29 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id tB9G0RrW017396; Wed, 9 Dec 2015 10:00:27 -0600 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id tB9G0RfR029916; Wed, 9 Dec 2015 10:00:27 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.224.2; Wed, 9 Dec 2015 10:00:27 -0600 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id tB9G02KK028647; Wed, 9 Dec 2015 10:00:26 -0600 From: Tomi Valkeinen To: , Laurent Pinchart CC: Tomi Valkeinen Subject: [PATCH 17/23] OMAPDSS: fix rgb-to-yuv color conv coefs Date: Wed, 9 Dec 2015 17:59:45 +0200 Message-ID: <1449676791-26304-18-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1449676791-26304-1-git-send-email-tomi.valkeinen@ti.com> References: <1449676791-26304-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The color conversion coefficients for RGB to YUV conversion (used with writeback) don't result in the correct result. This patch sets the correct coefficients. Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dispc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index 837b1f508d79..c50bb0124d87 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -713,10 +713,12 @@ static void dispc_setup_color_conv_coef(void) int i; int num_ovl = dss_feat_get_num_ovls(); const struct color_conv_coef ctbl_bt601_5_ovl = { + /* YUV -> RGB */ 298, 409, 0, 298, -208, -100, 298, 0, 517, 0, }; const struct color_conv_coef ctbl_bt601_5_wb = { - 66, 112, -38, 129, -94, -74, 25, -18, 112, 0, + /* RGB -> YUV */ + 66, 129, 25, 112, -94, -18, -38, -74, 112, 0, }; for (i = 1; i < num_ovl; i++)