From patchwork Wed Feb 7 21:43:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 10206177 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D627D6020F for ; Wed, 7 Feb 2018 21:44:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C510828DC9 for ; Wed, 7 Feb 2018 21:44:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B736129061; Wed, 7 Feb 2018 21:44:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 58F6228DC9 for ; Wed, 7 Feb 2018 21:44:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 31BBB6E3CF; Wed, 7 Feb 2018 21:44:12 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl0-f67.google.com (mail-pl0-f67.google.com [209.85.160.67]) by gabe.freedesktop.org (Postfix) with ESMTPS id 64D476E3CF for ; Wed, 7 Feb 2018 21:44:11 +0000 (UTC) Received: by mail-pl0-f67.google.com with SMTP id 11-v6so861679plc.9 for ; Wed, 07 Feb 2018 13:44:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0xO00F1RhuS1mcheyGzoJOy2/3ymrcyP79xZa2VYVVw=; b=NyvGCeP91lwoQZM+anVmiRGOd6ptQTbs+oli6uMJd/w46TH5CiiPVG1rEiz0fDyv6x utnclQMqM2fu+zdhpuyNCZnY5G0ooW3x8wqOMCworpknSDzwpkBm+1sZ3NlXFZF2NMrC lbA/rHlHUX3KZBRNTrIUAwdu9ZCxfw1IjlKFU2wUj3obkmzxIumrIRNBX49dL2M/wSjr keYjGDGphfhR27EgGWCgXbTVQ191UspdjMW3NnRRwMwDVZB/DKt1r72neivH/X2ZsKRv pW/H2YkENalRlQAudyVNxZVnD60bLnN2qbJSiUF2n3zeq4lzrIRDnFI4XTMT4zRnwKGw pxDg== X-Gm-Message-State: APf1xPDNPWrntJHzOJD5Q8IJ0pDKgn8Oa7Be89Z/s8D93tpTP5tzj24A V9QQONd1eZM7XToTCZzxF3qqxQ== X-Google-Smtp-Source: AH8x226A1dobN6czRbjUwmghXzlStQCSTIN9BL9C9M2068DJ+I1lbHug2gC/3NGPO43pF7ZLREolLA== X-Received: by 2002:a17:902:8546:: with SMTP id d6-v6mr7292306plo.147.1518039850450; Wed, 07 Feb 2018 13:44:10 -0800 (PST) Received: from mka.mtv.corp.google.com ([2620:0:1000:1600:5ff4:666d:2881:a60]) by smtp.gmail.com with ESMTPSA id h2sm5128010pgp.65.2018.02.07.13.44.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Feb 2018 13:44:09 -0800 (PST) From: Matthias Kaehlcke To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Zhou , David Airlie , Harry Wentland , Tony Cheng , Dmytro Laktyushkin , Anthony Koo , Yue Hin Lau , Zeyu Fan , Charlene Liu Subject: [PATCH] amdgpu/dc: Fix enum mismatch in calls to program_color_matrix() Date: Wed, 7 Feb 2018 13:43:52 -0800 Message-Id: <20180207214352.109924-1-mka@chromium.org> X-Mailer: git-send-email 2.16.0.rc1.238.g530d649a79-goog X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Craig Bergstrom , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Justin TerAvest , Matthias Kaehlcke , amd-gfx@lists.freedesktop.org, Guenter Roeck MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The driver passes GRAPHICS_CSC_ADJUST_TYPE_SW of type enum graphics_csc_adjust_type to program_color_matrix(), however the function expects a parameter of type enum grph_color_adjust_option. Supposedly the intention was to pass GRPH_COLOR_MATRIX_SW, which has the same value as GRAPHICS_CSC_ADJUST_TYPE_SW, so the mismatch didn't cause any trouble. Pass GRPH_COLOR_MATRIX_SW to program_color_matrix() instead of GRAPHICS_CSC_ADJUST_TYPE_SW, this also fixes the following warning when building the kernel with clang: drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.c:1129:24: error: implicit conversion from enumeration type 'enum graphics_csc_adjust_type' to different enumeration type 'enum grph_color_adjust_option' [-Werror,-Wenum-conversion] xfm_dce, tbl_entry, GRAPHICS_CSC_ADJUST_TYPE_SW); Signed-off-by: Matthias Kaehlcke Reviewed-by: Harry Wentland --- drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 2 +- drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c index 0f662e6ee9bd..ac28113c4d67 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c @@ -1126,7 +1126,7 @@ void dce110_opp_set_csc_adjustment( CSC_COLOR_MODE_GRAPHICS_OUTPUT_CSC; program_color_matrix( - xfm_dce, tbl_entry, GRAPHICS_CSC_ADJUST_TYPE_SW); + xfm_dce, tbl_entry, GRPH_COLOR_MATRIX_SW); /* We did everything ,now program DxOUTPUT_CSC_CONTROL */ configure_graphics_mode(xfm_dce, config, GRAPHICS_CSC_ADJUST_TYPE_SW, diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c index feb397b5c1a3..4245e1f818a3 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c @@ -727,7 +727,7 @@ void dce110_opp_v_set_csc_adjustment( CSC_COLOR_MODE_GRAPHICS_OUTPUT_CSC; program_color_matrix_v( - xfm_dce, tbl_entry, GRAPHICS_CSC_ADJUST_TYPE_SW); + xfm_dce, tbl_entry, GRPH_COLOR_MATRIX_SW); /* We did everything ,now program DxOUTPUT_CSC_CONTROL */ configure_graphics_mode_v(xfm_dce, config, GRAPHICS_CSC_ADJUST_TYPE_SW,