From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35B10C2D0DB for ; Mon, 27 Jan 2020 19:50:08 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 02AA424679 for ; Mon, 27 Jan 2020 19:50:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 02AA424679 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5568E6E983; Mon, 27 Jan 2020 19:50:07 +0000 (UTC) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 93D9A6E03A; Mon, 27 Jan 2020 19:50:05 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jan 2020 11:29:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,371,1574150400"; d="scan'208";a="252047916" Received: from bpaauwe-desk1.fm.intel.com ([10.105.128.11]) by fmsmga004.fm.intel.com with ESMTP; 27 Jan 2020 11:29:02 -0800 From: Bob Paauwe To: igt-dev@lists.freedesktop.org, intel-gfx Date: Mon, 27 Jan 2020 11:28:59 -0800 Message-Id: <20200127192859.20029-1-bob.j.paauwe@intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] lib/color_encoding: Fix up support for XYUV format X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Add XYUV8888 to the list of DRM Formats to test. Also fix the byte order for the format. Signed-off-by: Bob Paauwe Reviewed-by: Uma Shankar --- lib/igt_color_encoding.c | 1 + lib/igt_fb.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/igt_color_encoding.c b/lib/igt_color_encoding.c index 7de6d5ab..a7bd2b22 100644 --- a/lib/igt_color_encoding.c +++ b/lib/igt_color_encoding.c @@ -160,6 +160,7 @@ static const struct color_encoding_format { { DRM_FORMAT_XVYU2101010, 1023.f, 64.f, 940.f, 64.f, 512.f, 960.f }, { DRM_FORMAT_XVYU12_16161616, 65520.f, 4096.f, 60160.f, 4096.f, 32768.f, 61440.f }, { DRM_FORMAT_XVYU16161616, 65535.f, 4096.f, 60160.f, 4096.f, 32768.f, 61440.f }, + { DRM_FORMAT_XYUV8888, 255.f, 16.f, 235.f, 16.f, 128.f, 240.f }, }; static const struct color_encoding_format *lookup_fourcc(uint32_t fourcc) diff --git a/lib/igt_fb.c b/lib/igt_fb.c index c81b9de8..7409e6b3 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -2634,9 +2634,9 @@ static void get_yuv_parameters(struct igt_fb *fb, struct yuv_parameters *params) break; case DRM_FORMAT_XYUV8888: - params->y_offset = fb->offsets[0] + 1; - params->u_offset = fb->offsets[0] + 2; - params->v_offset = fb->offsets[0] + 3; + params->y_offset = fb->offsets[0] + 2; + params->u_offset = fb->offsets[0] + 1; + params->v_offset = fb->offsets[0] + 0; break; } } -- 2.21.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Bob Paauwe Date: Mon, 27 Jan 2020 11:28:59 -0800 Message-Id: <20200127192859.20029-1-bob.j.paauwe@intel.com> MIME-Version: 1.0 Subject: [igt-dev] [PATCH i-g-t] lib/color_encoding: Fix up support for XYUV format List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: igt-dev@lists.freedesktop.org, intel-gfx List-ID: Add XYUV8888 to the list of DRM Formats to test. Also fix the byte order for the format. Signed-off-by: Bob Paauwe Reviewed-by: Uma Shankar --- lib/igt_color_encoding.c | 1 + lib/igt_fb.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/igt_color_encoding.c b/lib/igt_color_encoding.c index 7de6d5ab..a7bd2b22 100644 --- a/lib/igt_color_encoding.c +++ b/lib/igt_color_encoding.c @@ -160,6 +160,7 @@ static const struct color_encoding_format { { DRM_FORMAT_XVYU2101010, 1023.f, 64.f, 940.f, 64.f, 512.f, 960.f }, { DRM_FORMAT_XVYU12_16161616, 65520.f, 4096.f, 60160.f, 4096.f, 32768.f, 61440.f }, { DRM_FORMAT_XVYU16161616, 65535.f, 4096.f, 60160.f, 4096.f, 32768.f, 61440.f }, + { DRM_FORMAT_XYUV8888, 255.f, 16.f, 235.f, 16.f, 128.f, 240.f }, }; static const struct color_encoding_format *lookup_fourcc(uint32_t fourcc) diff --git a/lib/igt_fb.c b/lib/igt_fb.c index c81b9de8..7409e6b3 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -2634,9 +2634,9 @@ static void get_yuv_parameters(struct igt_fb *fb, struct yuv_parameters *params) break; case DRM_FORMAT_XYUV8888: - params->y_offset = fb->offsets[0] + 1; - params->u_offset = fb->offsets[0] + 2; - params->v_offset = fb->offsets[0] + 3; + params->y_offset = fb->offsets[0] + 2; + params->u_offset = fb->offsets[0] + 1; + params->v_offset = fb->offsets[0] + 0; break; } } -- 2.21.0 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev