From patchwork Mon Oct 28 21:24:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paauwe, Bob J" X-Patchwork-Id: 11216621 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A98B1599 for ; Mon, 28 Oct 2019 21:25:09 +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 7166321835 for ; Mon, 28 Oct 2019 21:25:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7166321835 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 E97906EA94; Mon, 28 Oct 2019 21:25:08 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id C835A6EA95 for ; Mon, 28 Oct 2019 21:25:03 +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 fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Oct 2019 14:25:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,241,1569308400"; d="scan'208";a="224764266" Received: from bpaauwe-desk1.fm.intel.com ([10.105.128.11]) by fmsmga004.fm.intel.com with ESMTP; 28 Oct 2019 14:25:01 -0700 From: Bob Paauwe To: intel-gfx Date: Mon, 28 Oct 2019 14:24:59 -0700 Message-Id: <20191028212459.1998-1-bob.j.paauwe@intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] lib/color_encoding: Fix up support for XYUV format. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 --- 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 4adca967..fe5fa74b 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -2423,9 +2423,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; } }